Public report of Hypfer/Valetudo, published 15 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, 15 November 2026, 06:20 UTC · Survey ID cd_bb1e7f85bd2d4c19a60ddba91c657758

Hypfer/Valetudo

Measured 15 November 2026, 06:18 UTC, at code version 34bdfe7

CAI score 36out of 100 At risk Down 1 since the last survey

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

A medium codebase: 83,087 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Accessibility, 30

Findings by how serious they are

111 critical 734 serious 105 minor

6 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
15 November 2026, 06:18 UTC

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

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

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

82of 82 dimensions measured by tools.
915of 950 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
82dimensions across 7 lenses, read from 83,087 lines of product code in 4 projects.
Chapters

Executive summary

Hypfer/Valetudo is rated At risk because critical security findings are open. Its score is held back in part because it has images with no text description. It scores 36 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 30, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the three exposed passwords or keys and switching the old ones off, worth about 2 points. Adding text alternatives would lift Accessibility itself, worth about 4 points. Raising Accessibility to 70 would lift the score to about 41.

Thirty-nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Thirty-six known security holes in the packages the code depends on can be used by attackers, and eleven weaknesses in the code could be used by an attacker. Pinning each tool to an exact version, updating the vulnerable packages and fixing the weaknesses the scanner points to would close these risks. Limiting each secret to its own step would fix the nine secrets exposed to more of the pipeline than needed, and the three passwords or keys in the code and the two passwords or keys in the code's history need replacing, with the old ones switched off. The two images with no text description need a text description.

The product code is 83,087 lines, about €72,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 30 · counts for 46%Security and Compliance 35 · counts for 25%Production Readiness 39 · counts for 14%Code Health 43 · counts for 8%Maturity 57 · counts for 4%Performance 60 · counts for 2%Architecture 81 · counts for 1%

If Accessibility rose from 30 to 70, the lowest score rated Strong, the score would rise from 36 to about 41.

Code composition: what the lines of code are
Product code 98%Tests 2%
New since the last survey: 61 findings

These 61 critical or serious findings weren't in the previous survey, on 30 October 2026.

  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Static Analysis (SAST) · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 26, cognitive 20) frontend/src/controls/Dock.tsx
  • Cyclomatic Complexity · Complex function parseConsumablesMessage (cyclomatic 25, cognitive 38) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js
  • Cyclomatic Complexity · Complex function POST_PROCESS_BLOCKS (cyclomatic 23, cognitive 48) backend/lib/robots/roborock/RoborockMapParser.js
  • Cyclomatic Complexity · Complex function doControlLoopCycle (cyclomatic 23, cognitive 26) backend/lib/duststreaming/DuststreamerManager.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 21, cognitive 43) backend/lib/miio/MiioSocket.js
  • Cyclomatic Complexity · Complex function resetConsumable (cyclomatic 21, cognitive 28) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js
  • Cyclomatic Complexity · Complex function mix (cyclomatic 20, cognitive 49) frontend/src/util/XmPlayer.ts
  • Cyclomatic Complexity · Complex function marshalHomie (cyclomatic 20, cognitive 19) backend/lib/mqtt/handles/MqttHandle.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 16) frontend/src/map/SpectatorMapPage.tsx
  • Cyclomatic Complexity · Complex function setMapAnnotations (cyclomatic 18, cognitive 27) backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js
  • Cyclomatic Complexity · Complex function setMaterial (cyclomatic 18, cognitive 9) backend/lib/robots/dreame/capabilities/DreameMapSegmentMaterialControlCapability.js
  • Cyclomatic Complexity · Complex function PARSE_IMAGE (cyclomatic 17, cognitive 35) backend/lib/robots/dreame/DreameMapParser.js
  • Cyclomatic Complexity · Complex function handlePropertyChange (cyclomatic 17, cognitive 13) backend/lib/robots/roborock/RoborockGen4ValetudoRobot.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 11) frontend/src/map/actions/live_map_actions/ZoneActions.tsx
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 15) frontend/src/options/ValetudoActivation.tsx
  • Cyclomatic Complexity · Complex function onIncomingCloudMessage (cyclomatic 16, cognitive 12) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 10) frontend/src/map/actions/live_map_actions/SegmentActions.tsx
  • Cyclomatic Complexity · Complex function handleUserDefinedCarpetUpdate (cyclomatic 15, cognitive 28) backend/lib/robots/midea/MideaMapParser.js
  • Cyclomatic Complexity · Complex function POST_PROCESS_BLOCKS (cyclomatic 15, cognitive 26) backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 19) frontend/src/map/MapLayerManagerUtils.ts
  • Cyclomatic Complexity · Complex function storageSurvey (cyclomatic 15, cognitive 16) backend/lib/updater/lib/UpdaterUtils.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 15) backend/lib/robots/dreame/DreameMapParser.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 13) frontend/src/robot/RobotOptions.tsx
  • Large Files · frontend/src/api/hooks.ts: 1657 lines of code frontend/src/api/hooks.ts
  • Large Files · frontend/src/components/ValetudoAppBar.tsx: 614 lines of code frontend/src/components/ValetudoAppBar.tsx
  • Exception handling · Swallowed exception (empty catch) util/build_release_manifest.js
  • Exception handling · Swallowed exception (empty catch) util/build_release_manifest.js
  • Exception handling · Swallowed exception (empty catch) util/generate_build_metadata.js
  • Exception handling · Swallowed exception (empty catch) util/generate_build_metadata.js
  • Exception handling · Swallowed exception (empty catch) frontend/src/map/BaseMap.tsx
  • Exception handling · Swallowed exception (empty catch) frontend/src/map/BaseMap.tsx
  • Exception handling · Swallowed exception (empty catch) frontend/src/map/LiveMap.tsx
  • Exception handling · Swallowed exception (empty catch) frontend/src/map/LiveMap.tsx
  • Exception handling · Swallowed exception (empty catch) frontend/src/components/SplashBoundary.tsx
  • Exception handling · Swallowed exception (empty catch) frontend/src/api/hooks.ts
  • Exception handling · Swallowed exception (empty catch) frontend/src/api/hooks.ts
  • Exception handling · Swallowed exception (empty catch) frontend/src/api/hooks.ts
  • Exception handling · Swallowed exception (empty catch) frontend/src/api/hooks.ts
  • Exception handling · Swallowed exception (empty catch) backend/lib/NetworkConnectionStabilizer.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/NetworkConnectionStabilizer.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/PhoenixManager.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/PhoenixManager.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/PhoenixManager.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/updater/Updater.js
  • Exception handling · Swallowed exception (empty catch) backend/lib/updater/Updater.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Skeleton type — most members are unfinished util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js
  • Incompleteness & stubs · Empty method body — does nothing with its inputs util/generate_mqtt_docs.js

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1161 findings

These 1161 critical or serious findings were in the previous survey, on 30 October 2026, and are gone from this one. The first 100 are listed here.

  • Static Analysis (SAST) · Medium: REDACTED assets/icons/util/fan_parametric.htm
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Dependency Vulnerabilities · High CVE: REDACTED REDACTED
  • Code Duplication · Duplicated block (137 lines × 2 locations) backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js
  • Code Duplication · Duplicated block with local edits (46 matched lines × 2 locations) backend/lib/robots/dreame/capabilities/Dreame1CConsumableMonitoringCapability.js
  • Code Duplication · Duplicated block (44 lines × 2 locations) frontend/src/map/structures/client_structures/CurtainClientStructure.ts
  • Code Duplication · Duplicated block (43 lines × 6 locations) backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js
  • Code Duplication · Duplicated block (43 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js
  • Code Duplication · Duplicated block (43 lines × 3 locations) frontend/src/map/structures/map_structures/ActiveZoneMapStructure.ts
  • Code Duplication · Duplicated block (42 lines × 3 locations) backend/lib/robots/midea/capabilities/MideaCameraLightControlCapability.js
  • Code Duplication · Duplicated block (40 lines × 3 locations) backend/lib/robots/midea/MideaQuirkFactory.js
  • Code Duplication · Duplicated block (39 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyDurationControlCapabilityV1.js
  • Code Duplication · Duplicated block with local edits (38 matched lines × 2 locations) backend/lib/mqtt/handles/MapNodeMqttHandle.js
  • Code Duplication · Duplicated block (38 lines × 2 locations) backend/lib/robots/midea/MideaE20ValetudoRobot.js
  • Code Duplication · Duplicated block (37 lines × 2 locations) backend/lib/robots/midea/MideaQuirkFactory.js
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) backend/lib/robots/midea/capabilities/MideaMapSegmentationCapabilityV1.js
  • Code Duplication · Duplicated block (37 lines × 2 locations) frontend/src/map/EditMapPage.tsx
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) frontend/src/map/actions/live_map_actions/GoToActions.tsx
  • Code Duplication · Duplicated block (36 lines × 2 locations) backend/lib/robots/dreame/DreameMopValetudoRobot.js
  • Code Duplication · Duplicated block (36 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameCurrentStatisticsCapability.js
  • Code Duplication · Duplicated block (36 lines × 7 locations) backend/lib/robots/midea/capabilities/MideaMopDockMopAutoDryingControlCapability.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaCarpetSensorModeControlCapabilityV1.js
  • Code Duplication · Duplicated block (35 lines × 2 locations) frontend/src/options/connectivity/MQTTConnectivityPage.tsx
  • Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) frontend/src/options/connectivity/MQTTConnectivityPage.tsx
  • Code Duplication · Duplicated block (34 lines × 2 locations) frontend/src/map/BaseMap.tsx
  • Code Duplication · Duplicated block (34 lines × 3 locations) frontend/src/map/structures/client_structures/LineClientStructure.ts
  • Code Duplication · Duplicated block (33 lines × 2 locations) backend/lib/mqtt/capabilities/CurrentStatisticsCapabilityMqttHandle.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameAICameraObstacleAvoidanceControlCapability.js
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) backend/lib/robots/midea/capabilities/MideaMapSegmentEditCapabilityV1.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) backend/lib/robots/roborock/RoborockQuirkFactory.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaCarpetSensorModeControlCapabilityV2.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (31 lines × 7 locations) backend/lib/robots/dreame/capabilities/DreameCameraLightControlCapability.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameMopExtensionControlCapabilityV1.js
  • Code Duplication · Duplicated block (31 lines × 3 locations) backend/lib/robots/midea/capabilities/MideaCurrentStatisticsCapability.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) backend/lib/webserver/capabilityRouters/HighResolutionManualControlCapabilityRouter.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) frontend/src/options/connectivity/AuthSettingsPage.tsx
  • Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) backend/lib/mqtt/status/AttachmentStateMqttHandle.js
  • Code Duplication · Duplicated block (30 lines × 3 locations) backend/lib/robots/dreame/capabilities/DreameCleanRouteControlCapabilityV2.js
  • Code Duplication · Duplicated block (30 lines × 3 locations) backend/lib/robots/roborock/RoborockS4ValetudoRobot.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) frontend/src/map/EditMap.tsx
  • Code Duplication · Duplicated block (30 lines × 2 locations) frontend/src/valetudo/timers/TimerCard.tsx
  • Code Duplication · Duplicated block (29 lines × 2 locations) backend/lib/mqtt/capabilities/CurrentStatisticsCapabilityMqttHandle.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) backend/lib/robots/dreame/DreameP2150ValetudoRobot.js
  • Code Duplication · Duplicated block (29 lines × 3 locations) backend/lib/robots/midea/capabilities/MideaFanSpeedControlCapabilityV2.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) frontend/src/map/structures/client_structures/ThresholdClientStructure.ts
  • Code Duplication · Duplicated block (28 lines × 2 locations) backend/lib/mqtt/capabilities/AutoEmptyDockManualTriggerCapabilityMqttHandle.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameMopDockWaterUsageControlCapability.js
  • Code Duplication · Duplicated block (28 lines × 3 locations) frontend/src/map/EditMap.tsx
  • Code Duplication · Duplicated block (27 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaKeyLockCapabilityV2.js
  • Code Duplication · Duplicated block (27 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) backend/lib/robots/midea/capabilities/MideaMapResetCapabilityV1.js
  • Code Duplication · Duplicated block (26 lines × 3 locations) frontend/src/ProvisioningPage.tsx
  • Code Duplication · Duplicated block (26 lines × 5 locations) frontend/src/robot/RobotOptions.tsx
  • Code Duplication · Duplicated block (25 lines × 2 locations) backend/lib/robots/dreame/DreameQuirkFactory.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaCarpetModeControlCapabilityV2.js
  • Code Duplication · Duplicated block (25 lines × 7 locations) backend/lib/robots/midea/capabilities/MideaMopDockMopAutoDryingControlCapability.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) backend/lib/robots/mock/capabilities/MockFanSpeedControlCapability.js
  • Code Duplication · Duplicated block with local edits (25 matched lines × 2 locations) backend/lib/robots/mock/capabilities/MockTotalStatisticsCapability.js
  • Code Duplication · Duplicated block (25 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (25 lines × 2 locations) frontend/src/map/actions/edit_map_actions/SegmentActions.tsx
  • Code Duplication · Duplicated block (25 lines × 11 locations) frontend/src/robot/RobotOptions.tsx
  • Code Duplication · Duplicated block (24 lines × 2 locations) frontend/src/robot/ManualControl.tsx
  • Code Duplication · Duplicated block (23 lines × 2 locations) backend/lib/mqtt/capabilities/ZoneCleaningCapabilityMqttHandle.js
  • Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) backend/lib/robots/dreame/DreameValetudoRobot.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) backend/lib/robots/roborock/RoborockS6MaxVValetudoRobot.js
  • Code Duplication · Duplicated block (23 lines × 3 locations) backend/lib/robots/viomi/ViomiV6ValetudoRobot.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) frontend/src/components/list_menu/SelectListMenuItem.tsx
  • Code Duplication · Duplicated block (22 lines × 4 locations) backend/lib/robots/midea/MideaQuirkFactory.js
  • Code Duplication · Duplicated block (22 lines × 2 locations) backend/lib/webserver/capabilityRouters/MapSegmentMaterialControlCapabilityRouter.js
  • Code Duplication · Duplicated block (22 lines × 2 locations) frontend/src/components/ValetudoAppBar.tsx
  • Code Duplication · Duplicated block (22 lines × 2 locations) frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts
  • Code Duplication · Duplicated block (21 lines × 2 locations) backend/lib/robots/midea/MideaE20ValetudoRobot.js
  • Code Duplication · Duplicated block (21 lines × 4 locations) backend/lib/robots/midea/MideaQuirkFactory.js
  • Code Duplication · Duplicated block (21 lines × 4 locations) backend/lib/robots/midea/capabilities/MideaCurrentStatisticsCapability.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) backend/lib/robots/roborock/RoborockS4MaxValetudoRobot.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) backend/lib/robots/roborock/capabilities/RoborockConsumableMonitoringCapability.js
  • Code Duplication · Duplicated block (21 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (21 lines × 4 locations) frontend/src/components/ValetudoEventControls.tsx
  • Code Duplication · Duplicated block (20 lines × 3 locations) backend/lib/robots/dreame/DreameP2149ValetudoRobot.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) backend/lib/robots/roborock/RoborockQuirkFactory.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) backend/lib/robots/roborock/capabilities/RoborockObstacleAvoidanceControlCapability.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (20 lines × 7 locations) backend/lib/webserver/capabilityRouters/AutoEmptyDockAutoEmptyDurationControlCapabilityRouter.js
  • Code Duplication · Duplicated block (20 lines × 2 locations) frontend/src/map/structures/client_structures/LineClientStructure.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) frontend/src/map/structures/map_structures/CurtainMapStructure.ts
  • Code Duplication · Duplicated block (20 lines × 2 locations) frontend/src/options/connectivity/NTPConnectivityPage.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) backend/lib/robots/dreame/Dreame1CValetudoRobot.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) backend/lib/robots/dreame/DreameValetudoRobot.js
  • Code Duplication · Duplicated block (19 lines × 6 locations) frontend/src/api/client.ts
  • Code Duplication · Duplicated block (19 lines × 2 locations) frontend/src/controls/Dock.tsx
  • Code Duplication · Duplicated block (19 lines × 2 locations) frontend/src/map/EditMap.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) backend/lib/mqtt/MqttController.js
  • Code Duplication · Duplicated block (18 lines × 2 locations) backend/lib/robots/dreame/Dreame1CValetudoRobot.js
  • Code Duplication · Duplicated block (18 lines × 4 locations) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js
  • Code Duplication · Duplicated block (18 lines × 2 locations) backend/lib/robots/dreame/DreameMovaZ500ValetudoRobot.js
  • Code Duplication · Duplicated block (18 lines × 8 locations) backend/lib/robots/dreame/DreameQuirkFactory.js
  • Code Duplication · Duplicated block (18 lines × 3 locations) backend/lib/robots/dreame/capabilities/DreameAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js
  • Code Duplication · Duplicated block (18 lines × 3 locations) backend/lib/robots/dreame/capabilities/DreameCarpetModeControlCapability.js
  • Code Duplication · Duplicated block (18 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameMapSegmentEditCapability.js
Rebuild cost: about €72,000 · Estimate
Cost to rebuild€24,000 to €120,000, for 398 to 1,261 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 36. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 83,087 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.
Raises the score by about 2 points · Low effort · REDACTED Scanning
2
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.
Raises the score by about 4 points · Medium effort · Text alternatives
3
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 4 points · Medium effort · Keyboard semantics

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €72,000 to build again, about 0.5 person-years of work. Its weakest lens is Accessibility, at 30 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 3 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
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 6.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 4,032 lines over the last 90 days, which is about 16,352 lines a year. At that pace, the extra work comes to an estimated 1.2 to 7 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.
The tests run the code but check little · Contradiction
Code Coverage scores 9.9 out of 10, so the tests run most of the code. Test Quality looks at what the tests actually do while they run it: whether they check the results, whether they test the real code or stand-ins for it (mocks), and whether some tests are switched off. It scores 5.4 out of 10, which means many tests run the code without checking that it gives the right answer. Errors can therefore get through while every test passes, and the coverage figure promises more protection than the tests give.
Based on: Code Coverage (9.9 out of 10) · Test Quality (5.4 out of 10)
What to do: Make each test check the result it produces. Where a test replaces real code with stand-ins, use the real code wherever you can, and switch skipped tests back on or delete them, so the coverage figure means what it says.

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.

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 backend.lib.core.capabilities.Capability2 backend.lib.core.capabilities.FanSpeedControlCapability3 backend.lib.core.capabilities.WaterUsageControlCapability4 backend.lib.entities.SerializableEntity5 backend.lib.entities.state.attributes.StateAttribute6 backend.lib.mqtt.handles.RobotStateNodeMqttHandle7 backend.lib.msmart.dtos.MSmartDTO8 backend.lib.robots.dreame.DreameGen2LidarValetudoRobot9 backend.lib.robots.roborock.RoborockValetudoRobot10 backend.lib.valetudo_events.events.DismissibleValetudoEvent11 backend.lib.webserver.capabilityRouters.CapabilityRouter12 frontend.src.api.RawMapData13 frontend.src.api.types14 frontend.src.map.structures.client_structures.ClientStructure15 frontend.src.map.structures.map_structures.MapStructure16 frontend.src.map.utils.Canvas2DContextTrackingWrapper17 frontend.src.map.utils.touch_handling.TouchHandlingUtils18 frontend.src.map.utils.touch_handling.events.TouchHandlerEvent19 backend.lib.core.capabilities.AutoEmptyDockAutoEmptyIntervalControlCapability20 backend.lib.core.capabilities.BasicControlCapability21 backend.lib.core.capabilities.DoNotDisturbCapability22 backend.lib.core.capabilities.LocateCapability23 backend.lib.core.capabilities.ManualControlCapability24 backend.lib.core.capabilities.MapResetCapability25 backend.lib.core.capabilities.MapSegmentationCapability26 backend.lib.core.capabilities.SimpleToggleCapability27 backend.lib.core.capabilities.SpeakerVolumeControlCapability28 backend.lib.core.capabilities.ZoneCleaningCapability29 backend.lib.entities.core.updater.ValetudoUpdaterState30 backend.lib.mqtt.capabilities.CapabilityMqttHandle31 backend.lib.robots.dreame.DreameGen4ValetudoRobot32 backend.lib.robots.roborock.RoborockGen4ValetudoRobot33 frontend.src.api.RawRobotState34 frontend.src.map.BaseMap35 frontend.src.map.utils.touch_handling.MapCanvasEvent36 backend.lib.core.capabilities.CarpetModeControlCapability37 backend.lib.core.capabilities.ObstacleAvoidanceControlCapability38 frontend.src.api39 frontend.src.map.EditMap40 frontend.src.map.utils.touch_handling.gestures.Gesture
1 backend.lib.core.capabilities.Capability
2 backend.lib.core.capabilities.FanSpeedControlCapability
3 backend.lib.core.capabilities.WaterUsageControlCapability
4 backend.lib.entities.SerializableEntity
5 backend.lib.entities.state.attributes.StateAttribute
6 backend.lib.mqtt.handles.RobotStateNodeMqttHandle
7 backend.lib.msmart.dtos.MSmartDTO
8 backend.lib.robots.dreame.DreameGen2LidarValetudoRobot
9 backend.lib.robots.roborock.RoborockValetudoRobot
10 backend.lib.valetudo_events.events.DismissibleValetudoEvent
11 backend.lib.webserver.capabilityRouters.CapabilityRouter
12 frontend.src.api.RawMapData
13 frontend.src.api.types
14 frontend.src.map.structures.client_structures.ClientStructure
15 frontend.src.map.structures.map_structures.MapStructure
16 frontend.src.map.utils.Canvas2DContextTrackingWrapper
17 frontend.src.map.utils.touch_handling.TouchHandlingUtils
18 frontend.src.map.utils.touch_handling.events.TouchHandlerEvent
19 backend.lib.core.capabilities.AutoEmptyDockAutoEmptyIntervalControlCapability1
20 backend.lib.core.capabilities.BasicControlCapability1
21 backend.lib.core.capabilities.DoNotDisturbCapability1
22 backend.lib.core.capabilities.LocateCapability1
23 backend.lib.core.capabilities.ManualControlCapability1
24 backend.lib.core.capabilities.MapResetCapability1
25 backend.lib.core.capabilities.MapSegmentationCapability1
26 backend.lib.core.capabilities.SimpleToggleCapability1
27 backend.lib.core.capabilities.SpeakerVolumeControlCapability1
28 backend.lib.core.capabilities.ZoneCleaningCapability1
29 backend.lib.entities.core.updater.ValetudoUpdaterState1
30 backend.lib.mqtt.capabilities.CapabilityMqttHandle1
31 backend.lib.robots.dreame.DreameGen4ValetudoRobot1
32 backend.lib.robots.roborock.RoborockGen4ValetudoRobot1
33 frontend.src.api.RawRobotState1
34 frontend.src.map.BaseMap11
35 frontend.src.map.utils.touch_handling.MapCanvasEvent1
36 backend.lib.core.capabilities.CarpetModeControlCapability1
37 backend.lib.core.capabilities.ObstacleAvoidanceControlCapability1
38 frontend.src.api12801
39 frontend.src.map.EditMap111
40 frontend.src.map.utils.touch_handling.gestures.Gesture11
Uses a module listed above itPart of a loopThe module itself
1 backend.lib.core.capabilities.Capability2 backend.lib.core.capabilities.FanSpeedControlCapability3 backend.lib.core.capabilities.WaterUsageControlCapability4 backend.lib.entities.SerializableEntity5 backend.lib.entities.state.attributes.StateAttribute6 backend.lib.mqtt.handles.RobotStateNodeMqttHandle7 backend.lib.msmart.dtos.MSmartDTO8 backend.lib.robots.dreame.DreameGen2LidarValetudoRobot9 backend.lib.robots.roborock.RoborockValetudoRobot10 backend.lib.valetudo_events.events.DismissibleValetudoEvent11 backend.lib.webserver.capabilityRouters.CapabilityRouter12 frontend.src.api.RawMapData13 frontend.src.api.types14 frontend.src.map.structures.client_structures.ClientStructure15 frontend.src.map.structures.map_structures.MapStructure16 frontend.src.map.utils.Canvas2DContextTrackingWrapper17 frontend.src.map.utils.touch_handling.TouchHandlingUtils18 frontend.src.map.utils.touch_handling.events.TouchHandlerEvent19 backend.lib.core.capabilities.AutoEmptyDockAutoEmptyIntervalControlCapability20 backend.lib.core.capabilities.BasicControlCapability21 backend.lib.core.capabilities.DoNotDisturbCapability22 backend.lib.core.capabilities.LocateCapability23 backend.lib.core.capabilities.ManualControlCapability24 backend.lib.core.capabilities.MapResetCapability25 backend.lib.core.capabilities.MapSegmentationCapability26 backend.lib.core.capabilities.SimpleToggleCapability27 backend.lib.core.capabilities.SpeakerVolumeControlCapability28 backend.lib.core.capabilities.ZoneCleaningCapability29 backend.lib.entities.core.updater.ValetudoUpdaterState30 backend.lib.mqtt.capabilities.CapabilityMqttHandle31 backend.lib.robots.dreame.DreameGen4ValetudoRobot32 backend.lib.robots.roborock.RoborockGen4ValetudoRobot33 frontend.src.api.RawRobotState34 frontend.src.map.BaseMap35 frontend.src.map.utils.touch_handling.MapCanvasEvent36 backend.lib.core.capabilities.CarpetModeControlCapability37 backend.lib.core.capabilities.ObstacleAvoidanceControlCapability38 frontend.src.api39 frontend.src.map.EditMap40 frontend.src.map.utils.touch_handling.gestures.Gesturebackend.lib.core.capabilities.Capability1backend.lib.core.capabilities.FanSpeedControlCapability2backend.lib.core.capabilities.WaterUsageControlCapability3backend.lib.entities.SerializableEntity4backend.lib.entities.state.attributes.StateAttribute5backend.lib.mqtt.handles.RobotStateNodeMqttHandle6backend.lib.msmart.dtos.MSmartDTO7backend.lib.robots.dreame.DreameGen2LidarValetudoRobot8backend.lib.robots.roborock.RoborockValetudoRobot9backend.lib.valetudo_events.events.DismissibleValetudoEvent10backend.lib.webserver.capabilityRouters.CapabilityRouter11frontend.src.api.RawMapData12frontend.src.api.types13frontend.src.map.structures.client_structures.ClientStructure14frontend.src.map.structures.map_structures.MapStructure15frontend.src.map.utils.Canvas2DContextTrackingWrapper16frontend.src.map.utils.touch_handling.TouchHandlingUtils17frontend.src.map.utils.touch_handling.events.TouchHandlerEvent18backend.lib.core.capabilities.AutoEmptyDockAutoEmptyIntervalControlCapability19backend.lib.core.capabilities.BasicControlCapability20backend.lib.core.capabilities.DoNotDisturbCapability21backend.lib.core.capabilities.LocateCapability22backend.lib.core.capabilities.ManualControlCapability23backend.lib.core.capabilities.MapResetCapability24backend.lib.core.capabilities.MapSegmentationCapability25backend.lib.core.capabilities.SimpleToggleCapability26backend.lib.core.capabilities.SpeakerVolumeControlCapability27backend.lib.core.capabilities.ZoneCleaningCapability28backend.lib.entities.core.updater.ValetudoUpdaterState29backend.lib.mqtt.capabilities.CapabilityMqttHandle30backend.lib.robots.dreame.DreameGen4ValetudoRobot31backend.lib.robots.roborock.RoborockGen4ValetudoRobot32frontend.src.api.RawRobotState33frontend.src.map.BaseMap34frontend.src.map.utils.touch_handling.MapCanvasEvent35backend.lib.core.capabilities.CarpetModeControlCapability36backend.lib.core.capabilities.ObstacleAvoidanceControlCapability37frontend.src.api38frontend.src.map.EditMap39frontend.src.map.utils.touch_handling.gestures.Gesture40111111111111111111111280111111+692 more modules (most-connected shown)

At a glance — Code Health · 43% · Weak · gated by R10 ·

At a glance — Architecture · 81% · Adequate · gated by D26 ·

At a glance — Maturity · 57% · Adequate · gated by M2 ·

At a glance — Readiness · 39% · Weak · gated by D13, R4, P7 ·

At a glance — Security · 35% · Weak · gated by D29, D36, S1 ·

At a glance — Accessibility · 30% · Weak · gated by AC1, AC4 ·

At a glance — Performance · 60% · 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 — Injection146High / Critical
A03:2025 — Software Supply Chain Failures65High / Critical
A07:2025 — Authentication Failures6High / Critical
A02:2025 — Security Misconfiguration1Medium

Roadmap

Top priorities: 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; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.

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

Do thisHelpsEffortDimension
Resolve the 3 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2), REDACTED.+2.3 ptsLowREDACTED Scanning
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.+4.1 ptsMediumText alternatives
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.1 ptsMediumKeyboard semantics
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+3.3 ptsMediumForms & labels
Resolve the 1 REDACTED finding(s) in Vulnerability-disclosure Policy — start with REDACTED.+1.6 ptsLowVulnerability-disclosure Policy
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.9 ptsMediumPage structure
Resolve the 6 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+1.4 ptsLowSupply-chain Provenance & Signing
Resolve the 7 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (7).+1.3 ptsLowDependency Hygiene

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
frontend/src/components/ValetudoAppBar.tsx5.4MixedChange Coupling: Boundary-crossing change coupling: ValetudoAppBar.tsx ↔ OptionsRouter.tsx
backend/lib/robots/roborock/RoborockValetudoRobot.js5.5MixedCyclomatic Complexity: onIncomingCloudMessage (cyclomatic 47)
REDACTED5.7MixedStatic Analysis (SAST): High: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 111

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

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

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

Could not be resolved — 6

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 82 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, 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 — 82 dimensions across the health lenses
D1D2D3D5D6D8D10D11D12D13D14D15D16D17D19D20D21D23D24D26D27D28D29D30D34D35D36D37D43AC1AC2AC3AC4AC5AX10AX3AX4AX6C2GD1IC1M1M2M3M4P1P10P2P3P4P6P7P9PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X13X14X16X17X18X2X21X23X24X28X29X3X30X5

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, 915 of 950 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 01a1dddb-9592-7069-992d-aa0c7eaf554d.

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.

  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • 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.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D27 Navigability — 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. Tracing effort is measured over resolved call sites, and all 368 sampled here came from .htm/.js files. This repository's .tsx source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • 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. `docs/eleventy.config.js` 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.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AC6 Visual & motion safety — 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. Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository. Engine failure: ArgumentOutOfRangeException: startIndex cannot be larger than length of string. (Parameter 'startIndex').
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (start). the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): REDACTED has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 381 further occurrence(s) are not listed individually; the score already reflects all 421.
  • 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. 27 further occurrence(s) are not listed individually; the score already reflects all 67.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 723 further occurrence(s) are not listed individually; the score already reflects all 763.
  • X2 Cancellation propagation — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 11 further occurrence(s) are not listed individually; the score already reflects all 51.
  • 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. 22 further occurrence(s) are not listed individually; the score already reflects all 62.
  • 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 and Rust 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: 5 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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.
  • 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.
  • 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.
  • 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 Complexity5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Prevented

89 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DreameQuirkFactory.getQuirk at 137. A further 10 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 DreameValetudoRobot.DreameValetudoRobot.MAP_ERROR_CODE at 98 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: backend/lib/robots/dreame/DreameValetudoRobot.js (MAP_ERROR_CODE at 98), backend/lib/robots/dreame/DreameValetudoRobot.js (DreameValetudoRobot.DreameValetudoRobot.MAP_ERROR_CODE at 98), frontend/src/presetUtils.tsx (presetUtils.getPresetIconOrLabel at 21), backend/lib/robots/dreame/capabilities/DreameMapSegmentMaterialControlCapability.js (DreameMapSegmentMaterialControlCapability.setMaterial at 18). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

DreameQuirkFactory.getQuirk (cyclomatic 137)backend/lib/robots/dreame/DreameQuirkFactory.js:18
MideaValetudoRobot.mapErrorCode (cyclomatic 98)backend/lib/robots/midea/MideaValetudoRobot.js:522
MideaQuirkFactory.getQuirk (cyclomatic 96)backend/lib/robots/midea/MideaQuirkFactory.js:22
parseAndUpdateState (cyclomatic 89)backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452
XmPlayer.processRow (cyclomatic 79)frontend/src/util/XmPlayer.ts:682

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

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with DreameQuirkFactory.getQuirk (cyclomatic 137). — Refactoring it lifts Cyclomatic Complexity from 5.7 to about 5.8/10.

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

D2 · Cognitive Complexity5.2 / 10Adequate✓ 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 5.2 / 10 · rule-coverage 100% · ceiling Prevented

108 method(s) exceeded the cognitive complexity threshold of 15; the worst was PARSE at 168.

PARSE (cognitive 168)backend/lib/robots/dreame/DreameMapParser.js:24
XmPlayer.processRow (cognitive 155)frontend/src/util/XmPlayer.ts:682
parseAndUpdateState (cognitive 146)backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452
XmPlayer.parseXM (cognitive 137)frontend/src/util/XmPlayer.ts:100
MideaQuirkFactory.getQuirk (cognitive 126)backend/lib/robots/midea/MideaQuirkFactory.js:22

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

What to do

  1. Bring the 11 bodies over 60 down to 60 or less in Cognitive Complexity — start with PARSE (cognitive 168), XmPlayer.processRow (cognitive 155), parseAndUpdateState (cognitive 146). — 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 11 together lifts Cognitive Complexity from 5.2 to about 6.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes6.1 / 10Adequate✓ Tool-verified

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

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

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

95 god class(es) detected.

MethodTooLong: DreameQuirkFactory.getQuirk · ×39backend/lib/robots/dreame/DreameQuirkFactory.js:18
FunctionTooLong: DreameValetudoRobot.DreameValetudoRobot.MAP_ERROR_CODE · ×35backend/lib/robots/dreame/DreameValetudoRobot.js:423
FileTooLong: api/hooks.ts · ×13frontend/src/api/hooks.ts
ClassTooLong: MideaValetudoRobot · ×8backend/lib/robots/midea/MideaValetudoRobot.js:29

What to do

  1. Resolve the 39 MethodTooLong finding(s) in God Classes — start with MideaValetudoRobot.js (2), DreameGen2ValetudoRobot.js (2), BEightParser.js (2). — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 35 FunctionTooLong finding(s) in God Classes — start with ValetudoActivation.tsx (2), SegmentActions.tsx (2), SystemInformation.tsx (2). — One of this dimension's main actionable groups (35 warning-level).
  3. Resolve the 13 FileTooLong finding(s) in God Classes — start with hooks.ts, RobotOptions.tsx, MideaValetudoRobot.js. — One of this dimension's main actionable groups (13 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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.7 / 10Stronggated by 4 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

4 of 144 classes have LCOM4 above 3.

Low cohesion: RoborockValetudoRobot (LCOM4 6) · ×4backend/lib/robots/roborock/RoborockValetudoRobot.js:21

What to do

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

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

D8 · Code Coverage9.9 / 10Stronggated by 7 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.9 / 10 · rule-coverage 100% · ceiling Verified

Line coverage 77.4% — 7 file(s) below 50%. Measured from the JavaScript/TypeScript suite (node:test via `npm ci --ignore-scripts` in backend/).

Low coverage: backend/lib/miio/Codec.js · ×7backend/lib/miio/Codec.js:1

What to do

  1. Resolve the 7 Low coverage finding(s) in Code Coverage — start with Codec.js, MiioHeader.js, MiioSocket.js. — One of this dimension's main actionable groups (7 warning-level).

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

D10 · Test Quality5.4 / 10Adequate✓ Tool-verified

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

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

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

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

No assertions: parses s5 map without extra data from firmware 1886 correctly · ×30backend/test/lib/robots/roborock/RoborockMapParser_test.js:17

What to do

  1. Resolve the 30 No assertions finding(s) in Test Quality — start with DreameMapParser_test.js (16), RoborockMapParser_test.js (8), ThreeIRobotixMapParser_test.js (6). — One of this dimension's main actionable groups (30 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 backend/ (97 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene7.2 / 10Strong✓ Tool-verified

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

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

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

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

Deprecated: uuid · ×3REDACTED:60
One package at two majors across the workspace: axios
Deprecated: @babel/plugin-proposal-class-properties · ×7REDACTED:1127
Outdated (npm): @mui/icons-material · ×3REDACTED:38
Outdated (npm): @fontsource/ibm-plex-sans · ×19

What to do

  1. Resolve the 7 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (7). — One of this dimension's main actionable groups (7 recommendation-level).
  2. Resolve the 3 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 One package at two majors across the workspace finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).

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

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

2 secret(s) detected.

REDACTED

What to do

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

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

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

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 410 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 410 package(s) this repository's committed lockfile installs for a consumer — its 46 production, optional and peer dependency(ies), across 3 product REDACTED manifest(s), and everything those install in turn. Its 57 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 2 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.8 / 10Stronggated by 2 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.8 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: backend/lib/robots/dreame/DreameGen2ValetudoRobot.js (2×44=88); frontend/src/components/ValetudoAppBar.tsx (3×26=78)

Hotspot: backend/lib/robots/dreame/DreameGen2ValetudoRobot.js · ×2backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247

What to do

  1. Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with DreameGen2ValetudoRobot.js, ValetudoAppBar.tsx. — One of this dimension's main actionable groups (2 warning-level).

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

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

123 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is backend/lib/robots/midea/MideaValetudoRobot.js. Counted over 351 of the 885 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

What to do

  1. Resolve the 1 Off-boarding risk 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 / 10Stronggated by 7 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

7 deducted task-comment markers across 27756 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×7frontend/src/map/BaseMap.tsx:69

What to do

  1. Resolve the 7 TodoComment finding(s) in Explicit Debt — start with hooks.ts (5), BaseMap.tsx, FullHeightGrid.tsx. — One of this dimension's main actionable groups (7 warning-level).

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

D19 · Documentation Quality7.5 / 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 7.5 / 10 · rule-coverage 100% · ceiling Documented

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

Documentation: no build, run or usage exampleREADME.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:5

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 Consistency5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Verified

3 naming inconsistencies among 70 declarations measured against a convention their peers follow.

`ValetudoDNDConfiguration` spells `DND` where 15 names in the project spell it `Dnd`backend/lib/entities/core/ValetudoDNDConfiguration.js:5
`refreshIntervalID` spells `ID` where 32 names in the project spell it `Id`backend/lib/mqtt/MqttController.js:43
`setupMQTT` spells `MQTT` where 33 names in the project spell it `Mqtt`REDACTED:63

What to do

  1. Resolve the 1 `ValetudoDNDConfiguration` spells `DND` where 15 names in the project… finding(s) in Naming Consistency — start with ValetudoDNDConfiguration.js. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `refreshIntervalID` spells `ID` where 32 names in the project spell it… finding(s) in Naming Consistency — start with MqttController.js. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `setupMQTT` spells `MQTT` where 33 names in the project spell it `Mqtt` finding(s) in Naming Consistency — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

No domain types leak across context boundaries (3 contexts). Contexts: backend, docs, frontend.

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D24 · Comment Value10.0 9.5 / 10Exemplary○ Nothing flagged

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

0 of 552 judged comments only repeat the code they sit on (0.0 %). 53 comment(s) in another language or script were not judged.

doc comments repeat the namesbackend/lib/entities/core/ntpClient/ValetudoNTPClientDisabledState.js:5

✓ On the Gold path — maintain.

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

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

Projects may be oversized for their cohesion

What to do

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

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

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

60 % 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. Measured over the .htm/.js source only — this repository's .tsx was not sampled for call sites, so this score covers part of the tree, not all of it.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

146 finding(s): 0 critical, 60 high, 86 medium, 0 low. 39 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 4 file(s) — `backend/lib/robots/dreame/DreameValetudoRobot.js`, `backend/lib/robots/midea/MideaValetudoRobot.js`, `backend/lib/robots/roborock/RoborockValetudoRobot.js`, `docs/eleventy.config.js` (lines 62–178) — 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

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

What to do

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

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

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

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

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

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

51 finding(s): 5 critical, 31 high, 13 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness9.6 / 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 9.6 / 10 · rule-coverage 100% · ceiling Documented

13 of 351 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is backend/lib/mqtt/handles/MqttHandle.js. Counted over 351 of the 885 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×13backend/lib/mqtt/handles/MqttHandle.js:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling9.9 / 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.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: index.js↔index.js 100%; ValetudoAppBar.tsx↔OptionsRouter.tsx 77%; DreameX10PlusValetudoRobot.js↔RobotOptions.tsx 50%

Boundary-crossing change coupling: ValetudoAppBar.tsx ↔ OptionsRouter.tsx · ×2frontend/src/components/ValetudoAppBar.tsx:1
Change coupling: index.js ↔ index.jsbackend/lib/core/capabilities/index.js:1

What to do

  1. Resolve the 2 Boundary-crossing change coupling finding(s) in Change Coupling — start with ValetudoAppBar.tsx, DreameX10PlusValetudoRobot.js. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Change coupling finding(s) in Change Coupling — start with index.js. — 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 & Signing0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D37 · Vulnerability-disclosure Policy4.0 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

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

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

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

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×2) — frontend/src/components/ObstacleImage.tsx:36, frontend/src/robot/Duststream.tsx:92
  • 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. (×6) — frontend/src/map/EditMap.tsx:415, frontend/src/map/LiveMap.tsx:167, frontend/src/map/RobotCoverageMap.tsx:36, …

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 & labels4.0 / 10Weak✓ Tool-verified

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

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

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

  • A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — backend/lib/webserver/res/404/iis.html:21
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×6) — frontend/src/ProvisioningPage.tsx:325, frontend/src/components/list_menu/TextEditModalListMenuItem.tsx:139, frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:155, …
  • This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — frontend/src/components/Woodcock.tsx:252
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — frontend/src/components/list_menu/SelectListMenuItem.tsx:47
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — frontend/src/valetudo/ValetudoAI.tsx:228

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 structure4.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×7) — assets/icons/util/fan_parametric.htm:2, backend/lib/webserver/middlewares/res/egg_term.html:2, backend/lib/webserver/res/404/cf.html:2, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×2) — backend/lib/webserver/res/404/cf.html:34, backend/lib/webserver/res/404/tomcat.html:25
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it. — frontend/public/index.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — frontend/public/index.html:6

What to do

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

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

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

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

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — frontend/src/components/Woodcock.tsx:252

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.

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

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

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

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

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

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

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

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

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

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

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

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

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

C2 · Access 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. — backend/lib/webserver/capabilityRouters/DuststreamingCapabilityRouter.js:8

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✓ Tool-verified

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

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

  • A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. (×4) — backend/lib/core/capabilities/DuststreamingCapability.js:34, backend/lib/core/capabilities/SimpleToggleCapability.js:15, backend/lib/core/capabilities/SimpleToggleCapability.js:23, …
  • A placeholder string ("Valetudo is made, managed, maintained an…") is still in shipped code — typical of generated boilerplate that was never filled in. — frontend/src/valetudo/res/AboutText.ts:1

What to do

  • Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs6.6 / 10Adequate✓ 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.

  • `shutdown` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/NetworkConnectionStabilizer.js:74
  • `register` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — backend/lib/core/capabilities/DuststreamingCapability.js:34
  • `isEnabled` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — backend/lib/core/capabilities/SimpleToggleCapability.js:15
  • `enable` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — backend/lib/core/capabilities/SimpleToggleCapability.js:23
  • `disable` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — backend/lib/core/capabilities/SimpleToggleCapability.js:31
  • `handleDockPositionUpdate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/robots/midea/MideaMapParser.js:475
  • `handleVirtualWallUpdate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/robots/midea/MideaMapParser.js:489
  • `handleVirtualRestrictionZoneUpdate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/robots/midea/MideaMapParser.js:532
  • `handleActiveZonesUpdate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/robots/midea/MideaMapParser.js:577
  • `handleActiveSegmentsUpdate` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — backend/lib/robots/midea/MideaMapParser.js:609
  • `solidFillPixelPatternHandler` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/src/map/MapLayerManagerUtils.ts:48
  • `load` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — frontend/src/util/XmPlayer.ts:366
  • `onUpdate` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:76
  • `FakeHassController` has 5 unfinished members out of 6 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented. — util/generate_mqtt_docs.js:82
  • `registerNonCompliantComponent` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:98
  • `subscribe` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:101
  • `unsubscribe` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:104
  • `refresh` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:107
  • `refreshAutoconf` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:110
  • `publishHomie` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — util/generate_mqtt_docs.js:705
  • A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. (×4) — backend/lib/res/default_map.js:1, util/generate_mqtt_docs.js:1, util/generate_robot_docs.js:1, …
  • `getHassMigrationTopics` has an empty body — confirm it's an intentional no-op and not an unfinished method. — util/generate_mqtt_docs.js:727

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • 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)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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

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

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

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

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

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

P2 · Observability8.0 / 10Strong✓ 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.

  • `backend/lib/utils/Tools.js` reports through `console.*` at line 144 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — backend/lib/utils/Tools.js:144

What to do

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

  • `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:30

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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 resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `axios.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — backend/lib/updater/lib/UpdaterUtils.js:174

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
P9 · Domain vs controller coverage9.5 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether test coverage concentrates on the domain (business rules) rather than the trivial web/controller layer — a focus check a generic tool can't make.

Method: Roslyn plus test-execution analysis: domain-layer versus trivial web/controller coverage ratio. Computed metric, 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.

  • `fs.writeFileSync` in `req.on("end")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:125
  • `fs.unlinkSync` in `selfDestruct` 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. — backend/lib/robots/common/linuxCapabilities/LinuxDuststreamingCapability.js:61
  • `spawnSync` in `getWifiStatus` 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. — backend/lib/robots/common/linuxCapabilities/LinuxWifiConfigurationCapability.js:39
  • `fs.existsSync` in `isEnabled` 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. — backend/lib/robots/viomi/capabilities/ViomiCarpetModeControlCapability.js:35
  • `fs.closeSync` in `execute` 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) — backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:48, backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:69, backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:111, …
  • `fs.unlinkSync` in `execute` 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. (×5) — backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:51, backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:74, backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:75, …
  • `fs.renameSync` in `execute` 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. — backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:57
  • `spawnSync` in `execute` 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) — backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:59, backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:70
  • `fs.openSync` in `execute` 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. — backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:57

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

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

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

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

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

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

  • 64 duplicated blocks under backend/lib/robots/ have copies in at least two of the sibling directories 3irobotix, common, dreame, midea, mock, roborock (+1 more sibling(s) not listed) — 32 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 64 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 64 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 64 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. — backend/lib/robots/dreame/DreameQuirkFactory.js:832
  • 14 duplicated blocks under frontend/src/ have copies in at least two of the sibling directories components, controls, map, options, robot, valetudo — 3 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 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. — frontend/src/options/MapManagement.tsx:249
  • 13 duplicated blocks under backend/lib/ have copies in at least two of the sibling directories duststreaming, entities, mqtt, msmart, robots, scheduler (+4 more sibling(s) not listed) — 6 of them are reported below, and 7 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 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 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 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:339
  • 7 duplicated blocks under frontend/src/map/structures/ have copies in at least two of the sibling directories client_structures, map_structures — 6 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — frontend/src/map/structures/client_structures/CurtainClientStructure.ts:22
  • backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:1 · backend/lib/robots/dreame/DreameMovaZ60UltraRollerValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 262 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:1
  • frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:26 · frontend/src/map/actions/edit_map_actions/VirtualRestrictionActions.tsx:35 — the two spans are one implementation copied and then locally edited — 896 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:26
  • backend/lib/robots/dreame/DreameQuirkFactory.js:832 · backend/lib/robots/midea/MideaQuirkFactory.js:512 — the two spans are one implementation copied and then locally edited — 539 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. — backend/lib/robots/dreame/DreameQuirkFactory.js:832
  • frontend/src/map/actions/live_map_actions/SegmentActions.tsx:22 · frontend/src/map/actions/live_map_actions/ZoneActions.tsx:34 — the two spans are one implementation copied and then locally edited — 696 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/map/actions/live_map_actions/SegmentActions.tsx:22
  • backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:211 · backend/lib/robots/dreame/DreameX30UltraValetudoRobot.js:213 — 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. — backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:211
  • backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:220 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:220 · backend/lib/robots/dreame/DreameX40MasterValetudoRobot.js:220 · backend/lib/robots/dreame/DreameX40UltraValetudoRobot.js:220 — the 4 copies are spread across 4 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. — backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:220
  • backend/lib/robots/midea/MideaE20ValetudoRobot.js:190 · backend/lib/robots/midea/MideaValetudoRobot.js:512 — 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. — backend/lib/robots/midea/MideaE20ValetudoRobot.js:190
  • backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:14 · backend/lib/robots/dreame/DreameD10SProValetudoRobot.js:14 — 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. — backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:14
  • backend/lib/robots/dreame/DreameL10SProValetudoRobot.js:12 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:12 — 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. — backend/lib/robots/dreame/DreameL10SProValetudoRobot.js:12
  • backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238 · backend/lib/robots/dreame/DreameX30UltraValetudoRobot.js:234 — 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. — backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238
  • backend/lib/robots/roborock/RoborockValetudoRobot.js:314 · backend/lib/robots/viomi/ViomiValetudoRobot.js:304 — the two spans are one implementation copied and then locally edited — 659 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. — backend/lib/robots/roborock/RoborockValetudoRobot.js:314
  • backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:38 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:38 · backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:39 · backend/lib/robots/dreame/DreameX40MasterValetudoRobot.js:38 · +1 more site(s) not listed — the 5 copies are spread across 5 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. — backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:38
  • backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:226 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238 — 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. — backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:226
  • backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:10 · backend/lib/robots/dreame/DreameP2150ValetudoRobot.js:11 · backend/lib/robots/dreame/DreameZ10ProValetudoRobot.js:11 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:10
  • backend/lib/robots/dreame/Dreame1CValetudoRobot.js:11 · backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:16 — the two spans are one implementation copied and then locally edited — 506 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. — backend/lib/robots/dreame/Dreame1CValetudoRobot.js:11
  • backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:15 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:12 — 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. — backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:15
  • backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:1 · backend/lib/robots/midea/MideaJ15UltraValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 90 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:1
  • backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:16 · +3 more site(s) not listed — the 7 copies are spread across 7 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. — backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:16
  • backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:122 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:122 — 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. — backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:122
  • backend/lib/robots/roborock/RoborockG10SValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS8ProUltraValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS8ValetudoRobot.js:1 — these 3 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/roborock/RoborockG10SValetudoRobot.js:1
  • frontend/src/options/connectivity/AuthSettingsPage.tsx:58 · frontend/src/options/connectivity/NetworkAdvertisementSettingsPage.tsx:60 — the two spans are one implementation copied and then locally edited — 356 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/options/connectivity/AuthSettingsPage.tsx:58
  • backend/lib/robots/midea/MideaJ15MaxUltraValetudoRobot.js:16 · backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:11 · backend/lib/robots/midea/MideaJ15UltraValetudoRobot.js:11 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — backend/lib/robots/midea/MideaJ15MaxUltraValetudoRobot.js:16
  • backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js:19 · backend/lib/robots/dreame/capabilities/DreameManualControlCapability.js:26 — the two spans are one implementation copied and then locally edited — 450 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. — backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js:19
  • frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:138 · frontend/src/map/structures/client_structures/ZoneClientStructure.ts:120 — the two spans are one implementation copied and then locally edited — 506 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:138
  • backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV1.js:14 · backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV2.js:14 — the two spans are one implementation copied and then locally edited — 581 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. — backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV1.js:14
  • backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:11 · backend/lib/robots/roborock/RoborockS6MaxVValetudoRobot.js:10 — 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. — backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:11
  • backend/lib/robots/roborock/RoborockS5MaxValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS6MaxVValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/roborock/RoborockS5MaxValetudoRobot.js:1
  • backend/lib/robots/dreame/Dreame1TValetudoRobot.js:18 · backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:62 · backend/lib/robots/dreame/DreameD10SProValetudoRobot.js:62 · backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:55 · +2 more site(s) not listed — the 6 copies are spread across 6 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — backend/lib/robots/dreame/Dreame1TValetudoRobot.js:18
  • backend/lib/robots/dreame/DreameD9ValetudoRobot.js:56 · backend/lib/robots/dreame/DreameF9ValetudoRobot.js:17 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — backend/lib/robots/dreame/DreameD9ValetudoRobot.js:56
  • backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:246 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:192 · backend/lib/robots/dreame/DreameX10PlusValetudoRobot.js:184 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:246
  • backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS7ProUltraValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS7ValetudoRobot.js:1 — these 3 files are line-for-line copies of one another — 54 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:1
  • backend/lib/robots/dreame/DreameD9ProValetudoRobot.js:51 · backend/lib/robots/dreame/DreameMovaZ500ValetudoRobot.js:17 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — backend/lib/robots/dreame/DreameD9ProValetudoRobot.js:51
  • backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV1.js:1 · backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV3.js:1 — these 2 files are line-for-line copies of one another — 50 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV1.js:1
  • backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js:9 · backend/lib/robots/dreame/capabilities/DreameMopDockDryManualTriggerCapability.js:9 — 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. — backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js:9
  • backend/lib/robots/dreame/capabilities/DreameAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js:7 · backend/lib/robots/dreame/capabilities/DreameMopDockMopWashTemperatureControlCapabilityV2.js:7 — the two spans are one implementation copied and then locally edited — 248 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. — backend/lib/robots/dreame/capabilities/DreameAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js:7
  • backend/lib/robots/midea/capabilities/MideaCarpetModeControlCapabilityV1.js:11 · backend/lib/robots/midea/capabilities/MideaKeyLockCapabilityV1.js:10 — 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. — backend/lib/robots/midea/capabilities/MideaCarpetModeControlCapabilityV1.js:11

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 Boundaries6.3 / 10Adequate✓ 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.

  • frontend/src/robot/manual_control/ControllerVisual.tsx:4 imports react-joystick-component/build/lib/Joystick, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — frontend/src/robot/manual_control/ControllerVisual.tsx:4
  • util/build_openapi_schema.mjs:3 reaches into another package with a relative path (../backend/lib/utils/Tools.js) — import the package by name instead. — util/build_openapi_schema.mjs:3
  • util/generate_mqtt_docs.js:2 reaches into another package with a relative path (../backend/lib/robots/mock/MockValetudoRobot) — import the package by name instead. — util/generate_mqtt_docs.js:2
  • util/generate_mqtt_docs.js:3 reaches into another package with a relative path (../backend/lib/mqtt/handles/RobotMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:3
  • util/generate_mqtt_docs.js:4 reaches into another package with a relative path (../backend/lib/mqtt/MqttController) — import the package by name instead. — util/generate_mqtt_docs.js:4
  • util/generate_mqtt_docs.js:5 reaches into another package with a relative path (../backend/lib/mqtt/capabilities/CapabilityMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:5
  • util/generate_mqtt_docs.js:6 reaches into another package with a relative path (../backend/lib/mqtt/handles/NodeMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:6
  • util/generate_mqtt_docs.js:7 reaches into another package with a relative path (../backend/lib/mqtt/handles/RobotStateNodeMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:7
  • util/generate_mqtt_docs.js:8 reaches into another package with a relative path (../backend/lib/mqtt/handles/MapNodeMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:8
  • util/generate_mqtt_docs.js:9 reaches into another package with a relative path (../backend/lib/mqtt/handles/ValetudoEventsNodeMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:9
  • util/generate_mqtt_docs.js:10 reaches into another package with a relative path (../backend/lib/robots/mock/capabilities/MockConsumableMonitoringCapability) — import the package by name instead. — util/generate_mqtt_docs.js:10
  • util/generate_mqtt_docs.js:11 reaches into another package with a relative path (../backend/lib/entities/core/ValetudoConsumable) — import the package by name instead. — util/generate_mqtt_docs.js:11
  • util/generate_mqtt_docs.js:12 reaches into another package with a relative path (../backend/lib/entities/core/ValetudoMapSegment) — import the package by name instead. — util/generate_mqtt_docs.js:12
  • util/generate_mqtt_docs.js:13 reaches into another package with a relative path (../backend/lib/mqtt/handles/PropertyMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:13
  • util/generate_mqtt_docs.js:14 reaches into another package with a relative path (../backend/lib/mqtt/homie/DataType) — import the package by name instead. — util/generate_mqtt_docs.js:14
  • util/generate_mqtt_docs.js:15 reaches into another package with a relative path (../backend/lib/mqtt/homeassistant/HassController) — import the package by name instead. — util/generate_mqtt_docs.js:15
  • util/generate_mqtt_docs.js:16 reaches into another package with a relative path (../backend/lib/core/capabilities/ConsumableMonitoringCapability) — import the package by name instead. — util/generate_mqtt_docs.js:16
  • util/generate_mqtt_docs.js:17 reaches into another package with a relative path (../backend/lib/mqtt/capabilities/ConsumableMonitoringCapabilityMqttHandle) — import the package by name instead. — util/generate_mqtt_docs.js:17
  • util/generate_mqtt_docs.js:20 reaches into another package with a relative path (../backend/lib/entities/state/attributes/BatteryStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:20
  • util/generate_mqtt_docs.js:21 reaches into another package with a relative path (../backend/lib/entities/state/attributes/AttachmentStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:21
  • util/generate_mqtt_docs.js:22 reaches into another package with a relative path (../backend/lib/entities/state/attributes/StatusStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:22
  • util/generate_mqtt_docs.js:23 reaches into another package with a relative path (../backend/lib/entities/state/attributes/DockStatusStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:23
  • util/generate_mqtt_docs.js:24 reaches into another package with a relative path (../backend/lib/entities/state/attributes/PresetSelectionStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:24
  • util/generate_mqtt_docs.js:25 reaches into another package with a relative path (../backend/lib/entities/state/attributes/DockComponentStateAttribute) — import the package by name instead. — util/generate_mqtt_docs.js:25
  • util/generate_mqtt_docs.js:26 reaches into another package with a relative path (../backend/lib/mqtt/common/Unit) — import the package by name instead. — util/generate_mqtt_docs.js:26
  • util/generate_mqtt_docs.js:27 reaches into another package with a relative path (../backend/lib/mqtt/homie/HomieCommonAttributes) — import the package by name instead. — util/generate_mqtt_docs.js:27
  • util/generate_robot_docs.js:5 reaches into another package with a relative path (../backend/lib/robots) — import the package by name instead. — util/generate_robot_docs.js:5
  • util/generate_robot_docs.js:6 reaches into another package with a relative path (../backend/lib/Configuration) — import the package by name instead. — util/generate_robot_docs.js:6

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.

  • mapErrorCode has cyclomatic complexity 98 and cognitive complexity 9; 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. — backend/lib/robots/midea/MideaValetudoRobot.js:522
  • parseAndUpdateState has cyclomatic complexity 89 and cognitive complexity 146; 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. — backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452
  • processRow has cyclomatic complexity 79 and cognitive complexity 174; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/util/XmPlayer.ts:682
  • generateHandleDoc has cyclomatic complexity 66 and cognitive complexity 103; 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. — util/generate_mqtt_docs.js:311
  • PARSE has cyclomatic complexity 54 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. — backend/lib/msmart/BEightParser.js:12
  • mapErrorCode has cyclomatic complexity 50 and cognitive complexity 9; 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. — backend/lib/robots/midea/MideaE20ValetudoRobot.js:200
  • onIncomingCloudMessage has cyclomatic complexity 47 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. — backend/lib/robots/roborock/RoborockValetudoRobot.js:91
  • runEffects has cyclomatic complexity 46 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/util/XmPlayer.ts:862
  • parseAndUpdateState has cyclomatic complexity 44 and cognitive complexity 65; 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. — backend/lib/robots/roborock/RoborockValetudoRobot.js:242
  • parseAndUpdateState has cyclomatic complexity 43 and cognitive complexity 63; 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. — backend/lib/robots/viomi/ViomiValetudoRobot.js:235
  • PARSE has cyclomatic complexity 42 and cognitive complexity 83; 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. — backend/lib/robots/dreame/DreameMapParser.js:24
  • parseAndUpdateState has cyclomatic complexity 40 and cognitive complexity 60; 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. — backend/lib/robots/midea/MideaValetudoRobot.js:197
  • (anonymous) has cyclomatic complexity 40 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:207
  • parseXM has cyclomatic complexity 34 and cognitive complexity 134; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/util/XmPlayer.ts:100
  • processTick has cyclomatic complexity 33 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/util/XmPlayer.ts:522
  • handleInfoMapUpdate has cyclomatic complexity 33 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/midea/MideaMapParser.js:190
  • parseAndUpdateState has cyclomatic complexity 28 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/dreame/Dreame1CValetudoRobot.js:460
  • (anonymous) has cyclomatic complexity 26 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/controls/Dock.tsx:261
  • parseConsumablesMessage has cyclomatic complexity 25 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:235
  • POST_PROCESS_BLOCKS has cyclomatic complexity 23 and cognitive complexity 48; 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. — backend/lib/robots/roborock/RoborockMapParser.js:442
  • doControlLoopCycle has cyclomatic complexity 23 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/duststreaming/DuststreamerManager.js:129
  • (anonymous) has cyclomatic complexity 21 and cognitive complexity 43; 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. — backend/lib/miio/MiioSocket.js:52
  • resetConsumable has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:161
  • mix has cyclomatic complexity 20 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. — frontend/src/util/XmPlayer.ts:443
  • marshalHomie has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/mqtt/handles/MqttHandle.js:338
  • (anonymous) has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/map/SpectatorMapPage.tsx:63
  • setMapAnnotations has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js:40
  • setMaterial has cyclomatic complexity 18 and cognitive complexity 9; 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. — backend/lib/robots/dreame/capabilities/DreameMapSegmentMaterialControlCapability.js:41
  • PARSE_IMAGE has cyclomatic complexity 17 and cognitive complexity 35; 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. — backend/lib/robots/dreame/DreameMapParser.js:503
  • handlePropertyChange has cyclomatic complexity 17 and cognitive complexity 13; 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. — backend/lib/robots/roborock/RoborockGen4ValetudoRobot.js:143
  • (anonymous) has cyclomatic complexity 17 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/map/actions/live_map_actions/ZoneActions.tsx:33
  • (anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/options/ValetudoActivation.tsx:404
  • onIncomingCloudMessage has cyclomatic complexity 16 and cognitive complexity 12; 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. — backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247
  • (anonymous) has cyclomatic complexity 16 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/map/actions/live_map_actions/SegmentActions.tsx:21
  • handleUserDefinedCarpetUpdate has cyclomatic complexity 15 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/midea/MideaMapParser.js:688
  • POST_PROCESS_BLOCKS has cyclomatic complexity 15 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:453
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/map/MapLayerManagerUtils.ts:265
  • storageSurvey has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — backend/lib/updater/lib/UpdaterUtils.js:15
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — backend/lib/robots/dreame/DreameMapParser.js:154
  • (anonymous) has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/robot/RobotOptions.tsx:1084
R3 · Large Files8.6 / 10Strong✓ Tool-verified

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

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

  • frontend/src/api/hooks.ts has 1657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/api/hooks.ts:1
  • frontend/src/api/client.ts has 1259 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/api/client.ts:1
  • backend/lib/robots/midea/MideaValetudoRobot.js has 1199 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/midea/MideaValetudoRobot.js:1
  • frontend/src/robot/RobotOptions.tsx has 1164 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/robot/RobotOptions.tsx:1
  • backend/lib/robots/dreame/DreameQuirkFactory.js has 1055 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/DreameQuirkFactory.js:1
  • backend/lib/robots/dreame/DreameValetudoRobot.js has 969 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/DreameValetudoRobot.js:1
  • backend/lib/robots/roborock/RoborockValetudoRobot.js has 958 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/roborock/RoborockValetudoRobot.js:1
  • frontend/src/util/XmPlayer.ts has 892 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/util/XmPlayer.ts:1
  • backend/lib/robots/dreame/DreameGen2ValetudoRobot.js has 827 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:1
  • backend/lib/robots/midea/MideaMapParser.js has 783 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/midea/MideaMapParser.js:1
  • backend/lib/mqtt/MqttController.js has 778 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/mqtt/MqttController.js:1
  • backend/lib/robots/dreame/DreameMapParser.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/DreameMapParser.js:1
  • frontend/src/options/connectivity/MQTTConnectivityPage.tsx has 748 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/options/connectivity/MQTTConnectivityPage.tsx:1
  • backend/lib/robots/midea/MideaQuirkFactory.js has 745 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/midea/MideaQuirkFactory.js:1
  • backend/lib/robots/dreame/DreameMiotServices.js has 714 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/DreameMiotServices.js:1
  • util/generate_mqtt_docs.js has 657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — util/generate_mqtt_docs.js:1
  • REDACTED has 646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • backend/lib/msmart/BEightParser.js has 637 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/msmart/BEightParser.js:1
  • backend/lib/robots/viomi/ViomiValetudoRobot.js has 633 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/viomi/ViomiValetudoRobot.js:1
  • frontend/src/options/ValetudoActivation.tsx has 631 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/options/ValetudoActivation.tsx:1
  • frontend/src/map/EditMap.tsx has 627 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/map/EditMap.tsx:1
  • frontend/src/components/ValetudoAppBar.tsx has 614 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/ValetudoAppBar.tsx:1
  • backend/lib/robots/roborock/RoborockMapParser.js has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/roborock/RoborockMapParser.js:1
  • backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js has 586 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:1
  • frontend/src/map/BaseMap.tsx has 564 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/map/BaseMap.tsx:1
  • backend/lib/robots/dreame/Dreame1CValetudoRobot.js has 562 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/Dreame1CValetudoRobot.js:1
  • backend/lib/robots/midea/MideaE20ValetudoRobot.js has 559 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/midea/MideaE20ValetudoRobot.js:1
  • REDACTED has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • frontend/src/valetudo/SystemInformation.tsx has 459 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/valetudo/SystemInformation.tsx:1
  • frontend/src/map/actions/edit_map_actions/SegmentActions.tsx has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:1
  • backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:1

What to do

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

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

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

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

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness4.9 / 10Weak✓ 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.

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

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

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

R7 · Dead Code9.6 / 10Exemplary✓ Tool-verified

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

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

  • Unreachable from the 15 application, 2 tooling and 18 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 (15 application, 2 tooling, 18 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 (×9) — util/convert_obj.js, util/siencode.js, backend/lib/mqtt/handles/index.js, …
  • Nothing ultimately consumes this binding: its only referrer is the re-export in frontend/src/api/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in frontend/src/api/index.ts in the same commit, or the barrel will import a name that no longer exists. (×3) — frontend/src/api/RawRobotState.ts:3, frontend/src/api/hooks.ts:1431, frontend/src/api/hooks.ts:1450
  • Nothing imports this binding — it is safe to review for removal. (×2) — frontend/src/components/CustomIcons.tsx:5, frontend/src/hooks/useValetudoColors.ts:4
  • This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. — frontend/src/map/MapLayerManagerUtils.ts:129

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 Hygiene6.0 / 10Adequate✓ 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 only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. — frontend/src/api/hooks.ts:201
  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — frontend/src/options/ConnectivityOptionsRouter.tsx:1

What to do

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

  • frontend/src/valetudo/timers/TimerCard.tsx → frontend/src/valetudo/timers/TimerEditDialog.tsx → frontend/src/valetudo/timers/TimerCard.tsx — frontend/src/valetudo/timers/TimerCard.tsx:21

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture2.0 / 10Critical✓ 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.

  • `transportKey` is the symmetric cipher key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — REDACTED:419
  • This encryption's initialisation vector is a compile-time constant, so every message encrypted under the same key gets the same IV. An IV is not a secret and does not have to be one — its whole job is to be DIFFERENT each time, so that encrypting the same plaintext twice does not produce the same ciphertext. Fix it and CBC becomes an equality oracle: the mode XORs the IV into the first plaintext block and chains from there, so two messages encrypted with the same key and IV produce byte-identical ciphertext for exactly as long as their plaintexts agree. An observer who can see two ciphertexts — a repository of encrypted config files, a database column, a backup — learns that two records match and how many blocks in they diverge, without the key and without breaking anything. The same defect under a counter-based mode is worse and not recoverable by comparison: CTR and GCM XOR the plaintext against a keystream determined by the key and nonce, so a repeated nonce leaks the XOR of the two plaintexts outright, and under GCM it also forfeits the authentication key. Generate the IV with a cryptographic RNG for each message — `RandomNumberGenerator.Fill(iv)` in .NET, `crypto.randomBytes(16)` in Node — and write it alongside the ciphertext (prepending the block is the usual spelling); the receiver reads it back from there. Deriving the IV from the key material is the specific trap to avoid: it looks like rigour and produces a constant, because the derivation's inputs do not change between messages. — REDACTED:425
  • 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. (×4) — backend/lib/miio/Codec.js:25, backend/lib/miio/Codec.js:26, backend/lib/miio/Codec.js:54, …
  • `fdsMockServer.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.) — REDACTED:164
  • `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.) — backend/lib/webserver/WebServer.js:175

What to do

  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations.
  • Generate a fresh random IV for every encryption with `RandomNumberGenerator.Fill` and store or transmit it next to the ciphertext, rather than fixing it in the source or deriving it from the key material — a derived IV is constant, because its inputs do not vary between messages. An IV need not be secret, only unpredictable and unique per message; under CTR/GCM a repeated nonce is catastrophic rather than merely leaky.
  • 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 4 sites, not one: `backend/lib/miio/Codec.js:25` (createHash("md5")), `backend/lib/miio/Codec.js:26` (createHash("md5")), `backend/lib/miio/Codec.js:54` (createHash("md5")), `backend/lib/miio/Codec.js:146` (createHash("md5")). 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 correctness8.0 / 10Strong✓ Tool-verified

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

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

  • `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape. — util/upx_compress_valetudo.js:51

What to do

  • `async` callback passed to `forEach`
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.

X17 · Uncapped recursion over a caller-supplied document2.7 / 10Weak✓ Tool-verified

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

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

  • `getIn` is exported and takes `obj: Record<string, any>` from its caller, and it calls itself at line 40 (`getIn`) with a piece of `obj` — and nowhere in `getIn` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `getIn` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/src/api/utils.ts:40
  • `setIn` is exported and takes `obj: Record<string, any>` from its caller, and it calls itself at line 48 (`setIn`) with a piece of `obj` — and nowhere in `setIn` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `setIn` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/src/api/utils.ts:48

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • Only 1/51 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.
  • `fetchAndDecompress` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — frontend/src/options/ValetudoActivation.tsx:59
  • `updatePresetSelection` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:252
  • `sendBasicControlCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:262
  • `sendGoToCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:273
  • `sendCleanZonesCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:293
  • `sendCleanSegmentsCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:324
  • `sendJoinSegmentsCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:338
  • `sendSplitSegmentCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:351
  • `sendRenameSegmentCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:365
  • `sendSetSegmentMaterialCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:378
  • `sendLocateCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:402
  • `sendAutoEmptyDockManualTriggerCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:408
  • `sendConsumableReset` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:422
  • `sendDismissWelcomeDialogAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:460
  • `sendRestoreDefaultConfigurationAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:470
  • `sendValetudoLogLevel` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:517
  • `sendMQTTConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:551
  • `sendHTTPBasicAuthConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:585
  • `sendNetworkAdvertisementConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:603
  • `sendNTPClientConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:637
  • `deleteTimer` awaits `valetudoAPI.delete(…)` 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: `valetudoAPI.delete(url, { signal })`. — frontend/src/api/client.ts:653
  • `sendTimerCreation` awaits `valetudoAPI.post(…)` 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: `valetudoAPI.post(url, { signal })`. — frontend/src/api/client.ts:657
  • `sendTimerUpdate` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:665
  • `sendTimerAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:675
  • `sendValetudoEventInteraction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:701
  • `sendToggleMutation` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:719
  • `sendMapReset` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:735
  • `sendStartMappingPass` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:747
  • `sendSpeakerVolume` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:767
  • `sendVoicePackManagementCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:788
  • `sendSpeakerTestCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:798
  • `sendDoNotDisturbConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:873
  • `sendWifiConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:900
  • `sendManualControlInteraction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:934
  • `sendHighResolutionManualControlInteraction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:952
  • `sendCombinedVirtualRestrictionsUpdate` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:972
  • `sendUpdaterConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:989
  • `sendUpdaterCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:1007
  • `sendSetQuirkValueCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`. — frontend/src/api/client.ts:1058

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

  • `req.ip` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) 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. — REDACTED:180

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.
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 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×18) — util/build_release_manifest.js:16, util/build_release_manifest.js:66, util/generate_build_metadata.js:15, …
  • `.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. (×19) — frontend/src/ProvisioningPage.tsx:175, frontend/src/valetudo/Updater.tsx:59, frontend/src/robot/capabilities/Quirks.tsx:160, …
  • `.catch(e => {})` 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. — frontend/src/valetudo/ValetudoAI.tsx:154
  • `catch (error)` 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. — frontend/src/hooks/useLocalStorage.ts:19
  • `.then(…, () => {})` 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. — frontend/src/components/SplashBoundary.tsx:116

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types5.7 / 10Adequate✓ Tool-verified

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

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

  • 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~1.2 `!` null assertions per 1k TypeScript source lines — 38 assertion(s) across the 32012 source line(s) of the 213 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: frontend/src/util/XmPlayer.ts (19), frontend/src/map/BaseMap.tsx (8), frontend/src/components/ObstacleImage.tsx (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

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

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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

Not statically assessed — these 42 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.3, 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.7, 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 Health43%Weak — gated by R10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture81%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity57%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness39%Weak — gated by D13, R4, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security35%Weak — gated by D29, D36, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility30%Weak — gated by AC1, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateStrongest area.
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 — 21 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 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 — 44 check(s) not relevant to this codebase

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

  • AC6 Visual & motion safety — Visual & motion safety could not be assessed in this run — the check did not complete, so it is not scored. This is a gap in the analyzer, not a finding about this repository.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run start`) exited before it served a page. Likely cause (the repository): REDACTED has no "start" script, so `npm run start` could not start the app. Last output: "npm error Missing script: "start" / npm error / npm error Did you mean one of these? / npm error npm star # Mark your favorite packages / npm error npm stars # View packages marked as favorites / npm error / npm error To see a list of scripts, run: / npm error npm run / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — 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.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D25 ADR Conformance — no ADRs to check
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — This repository's production source (.js, .mjs, .ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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 only 1 of the 3 signals this lens looks for (2 domain event(s); its domain events are published by services or handlers — no domain entity raises one)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • 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
  • 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
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • 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 — 111 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 14 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×30
  • 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
  • + 5 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×2
  • <img> without a text alternative frontend/src/components/ObstacleImage.tsx:36 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative frontend/src/robot/Duststream.tsx:92 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×2
  • Boundary-crossing change coupling: ValetudoAppBar.tsx ↔ OptionsRouter.tsx frontend/src/components/ValetudoAppBar.tsx:1 — `frontend/src/components/ValetudoAppBar.tsx` (context components) and `frontend/src/options/OptionsRouter.tsx` (context options) sit in DIFFERENT parts of the tree yet change together 77% of the time (10 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — 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 10 shared commits counted here, the most recent 3 are `49a73b09` feat(ui): Analytics; `fb600a8e` chore: Upgrade react-router v5 to v6; `a9661a02` feat(ui): Add robot coverage map (at that commit the file was still `frontend/src/settings/SettingsRouter.tsx`) — run `git show` on any of them.
  • Boundary-crossing change coupling: DreameX10PlusValetudoRobot.js ↔ RobotOptions.tsx backend/lib/robots/dreame/DreameX10PlusValetudoRobot.js:1 — `backend/lib/robots/dreame/DreameX10PlusValetudoRobot.js` (context robots) and `frontend/src/robot/RobotOptions.tsx` (context robot) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `6465975d` feat: AutoEmptyDockAutoEmptyIntervalControlCapability; `7108bcaa` fix(vendor.dreame): Fix obstacle avoidance control for camera models; `a4261b64` feat: CarpetSensorModeControlCapability — run `git show` on any of them.
AC2 · Forms & labels · Custom control with no accessible name on <span> · ×1
  • Custom control with no accessible name on <span> frontend/src/components/Woodcock.tsx:252 — This <span> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom frontend/public/index.html:6 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×1
  • Click handler on a non-interactive <span> frontend/src/components/Woodcock.tsx:252 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'react-router' · ×1
  • Unlisted import 'react-router' frontend/src/options/ConnectivityOptionsRouter.tsx:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) frontend/src/valetudo/timers/TimerCard.tsx:21 — frontend/src/valetudo/timers/TimerCard.tsx → frontend/src/valetudo/timers/TimerEditDialog.tsx → frontend/src/valetudo/timers/TimerCard.tsx
S1 · Web-Security Posture · Cryptographic key material is a compile-time constant · ×1
  • Cryptographic key material is a compile-time constant REDACTED:419 — `transportKey` is the symmetric cipher key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Serious — 734 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 48 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file frontend/src/api/hooks.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/api/client.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/robot/RobotOptions.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file backend/lib/robots/midea/MideaValetudoRobot.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 backend/lib/robots/dreame/DreameQuirkFactory.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 backend/lib/robots/roborock/RoborockValetudoRobot.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 backend/lib/robots/dreame/DreameValetudoRobot.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 frontend/src/util/XmPlayer.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file backend/lib/robots/midea/MideaMapParser.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 backend/lib/robots/dreame/DreameGen2ValetudoRobot.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 backend/lib/mqtt/MqttController.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 frontend/src/options/connectivity/MQTTConnectivityPage.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file backend/lib/robots/midea/MideaQuirkFactory.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 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 util/generate_mqtt_docs.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 backend/lib/robots/viomi/ViomiValetudoRobot.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 frontend/src/map/EditMap.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/map/BaseMap.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/options/ValetudoActivation.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/api/types.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/ValetudoAppBar.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file backend/lib/robots/dreame/Dreame1CValetudoRobot.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 backend/lib/robots/midea/MideaE20ValetudoRobot.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 REDACTED:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/valetudo/SystemInformation.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×39
  • MethodTooLong: DreameQuirkFactory.getQuirk backend/lib/robots/dreame/DreameQuirkFactory.js:18 — MethodTooLong — getQuirk runs 812 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 712 over it, 8.12× 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: MideaQuirkFactory.getQuirk backend/lib/robots/midea/MideaQuirkFactory.js:22 — MethodTooLong — getQuirk runs 586 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 486 over it, 5.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MideaValetudoRobot.mapErrorCode backend/lib/robots/midea/MideaValetudoRobot.js:522 — MethodTooLong — mapErrorCode runs 580 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 480 over it, 5.80× 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: DreameGen2ValetudoRobot.parseAndUpdateState backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452 — MethodTooLong — parseAndUpdateState runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MideaE20ValetudoRobot.mapErrorCode backend/lib/robots/midea/MideaE20ValetudoRobot.js:200 — MethodTooLong — mapErrorCode runs 272 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 172 over it, 2.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DreameMapParser.PARSE backend/lib/robots/dreame/DreameMapParser.js:24 — MethodTooLong — PARSE runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× 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: EditMap.render frontend/src/map/EditMap.tsx:412 — MethodTooLong — render runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× 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: MSmartDummycloud.setupHTTP REDACTED:127 — MethodTooLong — setupHTTP runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.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: Dreame1CValetudoRobot.constructor backend/lib/robots/dreame/Dreame1CValetudoRobot.js:25 — MethodTooLong — constructor runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.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: DreameMovaZ60UltraRollerValetudoRobot.constructor backend/lib/robots/dreame/DreameMovaZ60UltraRollerValetudoRobot.js:26 — MethodTooLong — constructor 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: DreameMovaV50UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BEightParser.PARSE backend/lib/msmart/BEightParser.js:12 — MethodTooLong — PARSE runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.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.
  • MethodTooLong: DreameL40UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.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.
  • MethodTooLong: DreameX40MasterValetudoRobot.constructor backend/lib/robots/dreame/DreameX40MasterValetudoRobot.js:26 — MethodTooLong — constructor runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.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.
  • MethodTooLong: DreameX40UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameX40UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.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.
  • MethodTooLong: DreameMovaP10ProUltraValetudoRobot.constructor backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:26 — MethodTooLong — constructor runs 178 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RoborockQuirkFactory.getQuirk backend/lib/robots/roborock/RoborockQuirkFactory.js:15 — MethodTooLong — getQuirk runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DreameMovaS20UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× 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: DreameX30UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameX30UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 170 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 70 over it, 1.70× 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: DreameL20UltraValetudoRobot.constructor backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:26 — MethodTooLong — constructor runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: FakeMqttController.generateHandleDoc util/generate_mqtt_docs.js:311 — MethodTooLong — generateHandleDoc runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: DreameL10SUltraValetudoRobot.constructor backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:25 — MethodTooLong — constructor runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.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.
  • MethodTooLong: DreameL10SProUltraHeatValetudoRobot.constructor backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:25 — MethodTooLong — constructor runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DreameGen2ValetudoRobot.constructor backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:33 — MethodTooLong — constructor 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.
  • MethodTooLong: ViomiValetudoRobot.parseAndUpdateState backend/lib/robots/viomi/ViomiValetudoRobot.js:235 — MethodTooLong — parseAndUpdateState 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.
  • + 14 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×39
  • Async function without AbortSignal: fetchAndDecompress frontend/src/options/ValetudoActivation.tsx:59 — `fetchAndDecompress` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: updatePresetSelection frontend/src/api/client.ts:252 — `updatePresetSelection` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendBasicControlCommand frontend/src/api/client.ts:262 — `sendBasicControlCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendGoToCommand frontend/src/api/client.ts:273 — `sendGoToCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendCleanZonesCommand frontend/src/api/client.ts:293 — `sendCleanZonesCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendCleanSegmentsCommand frontend/src/api/client.ts:324 — `sendCleanSegmentsCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendJoinSegmentsCommand frontend/src/api/client.ts:338 — `sendJoinSegmentsCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendSplitSegmentCommand frontend/src/api/client.ts:351 — `sendSplitSegmentCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendRenameSegmentCommand frontend/src/api/client.ts:365 — `sendRenameSegmentCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendSetSegmentMaterialCommand frontend/src/api/client.ts:378 — `sendSetSegmentMaterialCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendLocateCommand frontend/src/api/client.ts:402 — `sendLocateCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendAutoEmptyDockManualTriggerCommand frontend/src/api/client.ts:408 — `sendAutoEmptyDockManualTriggerCommand` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendConsumableReset frontend/src/api/client.ts:422 — `sendConsumableReset` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendDismissWelcomeDialogAction frontend/src/api/client.ts:460 — `sendDismissWelcomeDialogAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendRestoreDefaultConfigurationAction frontend/src/api/client.ts:470 — `sendRestoreDefaultConfigurationAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendValetudoLogLevel frontend/src/api/client.ts:517 — `sendValetudoLogLevel` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendMQTTConfiguration frontend/src/api/client.ts:551 — `sendMQTTConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendHTTPBasicAuthConfiguration frontend/src/api/client.ts:585 — `sendHTTPBasicAuthConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendNetworkAdvertisementConfiguration frontend/src/api/client.ts:603 — `sendNetworkAdvertisementConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendNTPClientConfiguration frontend/src/api/client.ts:637 — `sendNTPClientConfiguration` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: deleteTimer frontend/src/api/client.ts:653 — `deleteTimer` awaits `valetudoAPI.delete(…)` 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: `valetudoAPI.delete(url, { signal })`.
  • Async function without AbortSignal: sendTimerCreation frontend/src/api/client.ts:657 — `sendTimerCreation` awaits `valetudoAPI.post(…)` 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: `valetudoAPI.post(url, { signal })`.
  • Async function without AbortSignal: sendTimerUpdate frontend/src/api/client.ts:665 — `sendTimerUpdate` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendTimerAction frontend/src/api/client.ts:675 — `sendTimerAction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • Async function without AbortSignal: sendValetudoEventInteraction frontend/src/api/client.ts:701 — `sendValetudoEventInteraction` awaits `valetudoAPI.put(…)` 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: `valetudoAPI.put(url, { signal })`.
  • + 14 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) util/build_release_manifest.js:16 — 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) util/build_release_manifest.js:66 — 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) util/generate_build_metadata.js:15 — 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) util/generate_build_metadata.js:32 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) frontend/src/ProvisioningPage.tsx:175 — `.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) frontend/src/valetudo/Updater.tsx:59 — `.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) frontend/src/valetudo/ValetudoAI.tsx:154 — `.catch(e => {})` 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) frontend/src/robot/Duststream.tsx:45 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) frontend/src/robot/manual_control/MovementSampler.tsx:30 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) frontend/src/robot/capabilities/Quirks.tsx:160 — `.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) frontend/src/options/connectivity/MQTTConnectivityPage.tsx:811 — `.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) frontend/src/options/connectivity/NTPConnectivityPage.tsx:303 — `.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) frontend/src/options/connectivity/WifiConnectivityPage.tsx:380 — `.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) frontend/src/map/BaseMap.tsx:223 — `.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) frontend/src/map/BaseMap.tsx:231 — `.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) frontend/src/map/LiveMap.tsx:59 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) frontend/src/map/LiveMap.tsx:209 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) frontend/src/components/SplashBoundary.tsx:116 — `.then(…, () => {})` 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) frontend/src/api/hooks.ts:775 — `.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) frontend/src/api/hooks.ts:1273 — `.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) frontend/src/api/hooks.ts:1416 — `.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) frontend/src/api/hooks.ts:1475 — `.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) backend/index.js:51 — `.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) backend/lib/NTPClient.js:48 — `.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) backend/lib/NTPClient.js:89 — `.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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×35
  • FunctionTooLong: DreameValetudoRobot.DreameValetudoRobot.MAP_ERROR_CODE backend/lib/robots/dreame/DreameValetudoRobot.js:423 — FunctionTooLong — DreameValetudoRobot.MAP_ERROR_CODE runs 589 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 489 over it, 5.89× 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: RoborockValetudoRobot.RoborockValetudoRobot.MAP_ERROR_CODE backend/lib/robots/roborock/RoborockValetudoRobot.js:689 — FunctionTooLong — RoborockValetudoRobot.MAP_ERROR_CODE runs 367 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 267 over it, 3.67× 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: MQTTConnectivityPage.MQTTConnectivity frontend/src/options/connectivity/MQTTConnectivityPage.tsx:433 — FunctionTooLong — MQTTConnectivity runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ValetudoActivation.ActivationListMenuItem frontend/src/options/ValetudoActivation.tsx:404 — FunctionTooLong — ActivationListMenuItem runs 254 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 154 over it, 2.54× 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: ValetudoAppBar.ValetudoAppBar frontend/src/components/ValetudoAppBar.tsx:328 — FunctionTooLong — ValetudoAppBar runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ValetudoActivation.KeygenOverlay frontend/src/options/ValetudoActivation.tsx:72 — FunctionTooLong — KeygenOverlay runs 244 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TimerEditDialog.TimerEditDialog frontend/src/valetudo/timers/TimerEditDialog.tsx:64 — FunctionTooLong — TimerEditDialog 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: RobotOptions.RobotOptions frontend/src/robot/RobotOptions.tsx:999 — FunctionTooLong — RobotOptions runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SegmentActions.SegmentActions frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:205 — FunctionTooLong — SegmentActions runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× 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: TimerCard.TimerCard frontend/src/valetudo/timers/TimerCard.tsx:68 — FunctionTooLong — TimerCard runs 209 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 109 over it, 2.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SystemInformation.SystemInformation frontend/src/valetudo/SystemInformation.tsx:220 — FunctionTooLong — SystemInformation runs 205 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 105 over it, 2.05× 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: MapAnnotationActions.MapAnnotationActions frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:37 — FunctionTooLong — MapAnnotationActions 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: VirtualRestrictionActions.VirtualRestrictionActions frontend/src/map/actions/edit_map_actions/VirtualRestrictionActions.tsx:46 — FunctionTooLong — VirtualRestrictionActions runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.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: ValetudoAI.ValetudoAI frontend/src/valetudo/ValetudoAI.tsx:22 — FunctionTooLong — ValetudoAI runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: XmPlayer.parseXM frontend/src/util/XmPlayer.ts:100 — FunctionTooLong — parseXM runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× 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: ZoneActions.ZoneActions frontend/src/map/actions/live_map_actions/ZoneActions.tsx:31 — FunctionTooLong — ZoneActions runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× 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: ActionControls.SegmentCleanupActionControls frontend/src/valetudo/timers/ActionControls.tsx:53 — FunctionTooLong — SegmentCleanupActionControls runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.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: WifiConnectivityPage.WifiConnectivity frontend/src/options/connectivity/WifiConnectivityPage.tsx:166 — FunctionTooLong — WifiConnectivity runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ProvisioningPage.ProvisioningPage frontend/src/ProvisioningPage.tsx:195 — FunctionTooLong — ProvisioningPage runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SystemInformation.SystemRuntimeInfo frontend/src/valetudo/SystemInformation.tsx:41 — FunctionTooLong — SystemRuntimeInfo runs 151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Updater.UpdaterStateComponent frontend/src/valetudo/Updater.tsx:77 — FunctionTooLong — UpdaterStateComponent 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.
  • FunctionTooLong: Dock.Dock frontend/src/controls/Dock.tsx:209 — FunctionTooLong — Dock runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: NTPConnectivityPage.NTPConnectivity frontend/src/options/connectivity/NTPConnectivityPage.tsx:122 — FunctionTooLong — NTPConnectivity runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.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: SpectatorMapPage.SpectatorMapPage frontend/src/map/SpectatorMapPage.tsx:63 — FunctionTooLong — SpectatorMapPage runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× 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: SegmentActions.SegmentActions frontend/src/map/actions/live_map_actions/SegmentActions.tsx:19 — FunctionTooLong — SegmentActions runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 10 more in this group — see findings.md.
D10 · Test Quality · No assertions · ×30
  • No assertions: parses s5 map without extra data from firmware 1886 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:17 — 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: parses s5 map with forbidden_zones,virtual_walls,currently_cleaned_zones from firmware 1886 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:26 — 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: parses s5 map with goto_target from firmware 1886 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:35 — 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: parses s5 map with forbidden_zones,virtual_walls,currently_cleaned_zones from firmware 2008 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:44 — 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: parses s5 map with segments from firmware 2008 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:53 — 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: parses s5 map with segments from firmware 2020 correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:62 — 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: parses s6 map with segments from firmware 2652 with active segments and no-mop-zones correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:71 — 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: pre-processes and parses s8 map from firmware 1286 with obstacles correctly backend/test/lib/robots/roborock/RoborockMapParser_test.js:80 — 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: parses D9 FW 1058 no-segment map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:11 — 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: parses D9 FW 1058 segment map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:21 — 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: pre-processes & parses D9 FW 1058 "custom named segment" map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:30 — 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: pre-processes & parses D9 FW 1093 "huge" map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:39 — 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: pre-processes & parses Z10 FW 1056 map with virtual restrictions correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:48 — 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: pre-processes & parses Z10 FW 1056 map with paths correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:57 — 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: pre-processes & parses 1C FW 1096 "zoned-cleanup in progress" map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js: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.
  • No assertions: pre-processes & parses 1C FW 1096 "full cleanup in progress" map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:83 — 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: pre-processes & parses 1C FW 1096 "area cleanup in progress" map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:92 — 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: pre-processes & parses 1C FW 1096 map with virtual wall & a no-go zone correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:102 — 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: pre-processes & parses L10S Ultra FW 1058 map with goto target correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:110 — 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: pre-processes & parses L10S Ultra FW 1121 map with new path correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:118 — 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: pre-processes & parses L10S Ultra FW 1121 map with carpet correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:126 — 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: pre-processes & parses monastery map with left cutoff correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:134 — 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: pre-processes & parses X10 Plus FW 1104 map with obstacle correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:142 — 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: pre-processes & parses L10S Ultra FW 3031 giant map correctly backend/test/lib/robots/dreame/DreameMapParser_test.js:150 — 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: pre-processes & parses viomi v7 fw 47 map with currently cleaned segments backend/test/lib/robots/3irobotix/ThreeIRobotixMapParser_test.js:19 — 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.
  • + 5 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×28
  • Boundary violation [package:third-party-deep-import] frontend/src/robot/manual_control/ControllerVisual.tsx:4 — frontend/src/robot/manual_control/ControllerVisual.tsx:4 imports react-joystick-component/build/lib/Joystick, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] util/build_openapi_schema.mjs:3 — util/build_openapi_schema.mjs:3 reaches into another package with a relative path (../backend/lib/utils/Tools.js) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:2 — util/generate_mqtt_docs.js:2 reaches into another package with a relative path (../backend/lib/robots/mock/MockValetudoRobot) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:3 — util/generate_mqtt_docs.js:3 reaches into another package with a relative path (../backend/lib/mqtt/handles/RobotMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:4 — util/generate_mqtt_docs.js:4 reaches into another package with a relative path (../backend/lib/mqtt/MqttController) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:5 — util/generate_mqtt_docs.js:5 reaches into another package with a relative path (../backend/lib/mqtt/capabilities/CapabilityMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:6 — util/generate_mqtt_docs.js:6 reaches into another package with a relative path (../backend/lib/mqtt/handles/NodeMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:7 — util/generate_mqtt_docs.js:7 reaches into another package with a relative path (../backend/lib/mqtt/handles/RobotStateNodeMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:8 — util/generate_mqtt_docs.js:8 reaches into another package with a relative path (../backend/lib/mqtt/handles/MapNodeMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:9 — util/generate_mqtt_docs.js:9 reaches into another package with a relative path (../backend/lib/mqtt/handles/ValetudoEventsNodeMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:10 — util/generate_mqtt_docs.js:10 reaches into another package with a relative path (../backend/lib/robots/mock/capabilities/MockConsumableMonitoringCapability) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:11 — util/generate_mqtt_docs.js:11 reaches into another package with a relative path (../backend/lib/entities/core/ValetudoConsumable) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:12 — util/generate_mqtt_docs.js:12 reaches into another package with a relative path (../backend/lib/entities/core/ValetudoMapSegment) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:13 — util/generate_mqtt_docs.js:13 reaches into another package with a relative path (../backend/lib/mqtt/handles/PropertyMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:14 — util/generate_mqtt_docs.js:14 reaches into another package with a relative path (../backend/lib/mqtt/homie/DataType) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:15 — util/generate_mqtt_docs.js:15 reaches into another package with a relative path (../backend/lib/mqtt/homeassistant/HassController) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:16 — util/generate_mqtt_docs.js:16 reaches into another package with a relative path (../backend/lib/core/capabilities/ConsumableMonitoringCapability) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:17 — util/generate_mqtt_docs.js:17 reaches into another package with a relative path (../backend/lib/mqtt/capabilities/ConsumableMonitoringCapabilityMqttHandle) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:20 — util/generate_mqtt_docs.js:20 reaches into another package with a relative path (../backend/lib/entities/state/attributes/BatteryStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:21 — util/generate_mqtt_docs.js:21 reaches into another package with a relative path (../backend/lib/entities/state/attributes/AttachmentStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:22 — util/generate_mqtt_docs.js:22 reaches into another package with a relative path (../backend/lib/entities/state/attributes/StatusStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:23 — util/generate_mqtt_docs.js:23 reaches into another package with a relative path (../backend/lib/entities/state/attributes/DockStatusStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:24 — util/generate_mqtt_docs.js:24 reaches into another package with a relative path (../backend/lib/entities/state/attributes/PresetSelectionStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:25 — util/generate_mqtt_docs.js:25 reaches into another package with a relative path (../backend/lib/entities/state/attributes/DockComponentStateAttribute) — import the package by name instead.
  • Boundary violation [package:relative-cross-package] util/generate_mqtt_docs.js:26 — util/generate_mqtt_docs.js:26 reaches into another package with a relative path (../backend/lib/mqtt/common/Unit) — import the package by name instead.
  • + 3 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×17
  • Sync-over-async blocking REDACTED:125 — `fs.writeFileSync` in `req.on("end")` 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 backend/lib/robots/common/linuxCapabilities/LinuxDuststreamingCapability.js:61 — `fs.unlinkSync` in `selfDestruct` 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 backend/lib/robots/common/linuxCapabilities/LinuxWifiConfigurationCapability.js:39 — `spawnSync` in `getWifiStatus` 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 backend/lib/robots/viomi/capabilities/ViomiCarpetModeControlCapability.js:35 — `fs.existsSync` in `isEnabled` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:48 — `fs.closeSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:51 — `fs.unlinkSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:57 — `fs.renameSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:59 — `spawnSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:70 — `spawnSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterApplyStep.js:74 — `fs.unlinkSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:57 — `fs.openSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:69 — `fs.closeSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:75 — `fs.unlinkSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:111 — `fs.closeSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:117 — `fs.unlinkSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:132 — `fs.closeSync` in `execute` 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 backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:138 — `fs.unlinkSync` in `execute` 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 · FileTooLong · ×13
  • FileTooLong: api/hooks.ts frontend/src/api/hooks.ts — FileTooLong — 1247 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 747 over it, 2.49× 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: robot/RobotOptions.tsx frontend/src/robot/RobotOptions.tsx — FileTooLong — 1003 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 503 over it, 2.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: midea/MideaValetudoRobot.js backend/lib/robots/midea/MideaValetudoRobot.js — FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MideaValetudoRobot (29-1155). The bar is 500 significant lines; this is 492 over it, 1.98× 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: api/client.ts frontend/src/api/client.ts — FileTooLong — 883 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 383 over it, 1.77× 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: dreame/DreameQuirkFactory.js backend/lib/robots/dreame/DreameQuirkFactory.js — FileTooLong — 845 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DreameQuirkFactory (6-1096). The bar is 500 significant lines; this is 345 over it, 1.69× 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: dreame/DreameValetudoRobot.js backend/lib/robots/dreame/DreameValetudoRobot.js — FileTooLong — 814 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 314 over it, 1.63× 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: roborock/RoborockValetudoRobot.js backend/lib/robots/roborock/RoborockValetudoRobot.js — FileTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 262 over it, 1.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: util/XmPlayer.ts frontend/src/util/XmPlayer.ts — FileTooLong — 704 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: XmPlayer (323-971). The bar is 500 significant lines; this is 204 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: connectivity/MQTTConnectivityPage.tsx frontend/src/options/connectivity/MQTTConnectivityPage.tsx — FileTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 142 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: midea/MideaQuirkFactory.js backend/lib/robots/midea/MideaQuirkFactory.js — FileTooLong — 613 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: MideaQuirkFactory (10-793). The bar is 500 significant lines; this is 113 over it, 1.23× 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: options/ValetudoActivation.tsx frontend/src/options/ValetudoActivation.tsx — FileTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 56 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: dreame/DreameGen2ValetudoRobot.js backend/lib/robots/dreame/DreameGen2ValetudoRobot.js — FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: DreameGen2ValetudoRobot (23-924). The bar is 500 significant lines; this is 55 over it, 1.11× 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: midea/MideaMapParser.js backend/lib/robots/midea/MideaMapParser.js — FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: MideaMapParser (8-912). The bar is 500 significant lines; this is 39 over it, 1.08× 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC3 · Page structure · Page without a main landmark · ×8
  • Page without a main landmark assets/icons/util/fan_parametric.htm:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/middlewares/res/egg_term.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/res/404/cf.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/res/404/gugl.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/res/404/iis.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/res/404/oracle.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark backend/lib/webserver/res/404/tomcat.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark frontend/public/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <div id="root">, so there is no content here to wrap — render the <main> from the component mounted into it.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: MideaValetudoRobot backend/lib/robots/midea/MideaValetudoRobot.js:29 — ClassTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 467 over it, 2.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DreameQuirkFactory backend/lib/robots/dreame/DreameQuirkFactory.js:6 — ClassTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 415 over it, 2.04× 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: MideaQuirkFactory backend/lib/robots/midea/MideaQuirkFactory.js:10 — ClassTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 189 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.
  • ClassTooLong: DreameGen2ValetudoRobot backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:23 — ClassTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 128 over it, 1.32× 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: MideaMapParser backend/lib/robots/midea/MideaMapParser.js:8 — ClassTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 109 over it, 1.27× 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: EditMap frontend/src/map/EditMap.tsx:55 — ClassTooLong — 448 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 48 over it, 1.12× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BEightParser backend/lib/msmart/BEightParser.js:7 — ClassTooLong — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 35 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FakeMqttController util/generate_mqtt_docs.js:132 — ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D17 · Explicit Debt · TodoComment · ×7
  • TodoComment frontend/src/map/BaseMap.tsx:69 — //TODO: understand wtf is going on there and replace with better state variables than this hack — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/components/FullHeightGrid.tsx:8 — //TODO: Fixme :( — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/api/hooks.ts:581 — //TODO: this should actually refetch the map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/api/hooks.ts:602 — //TODO: this should actually refetch the map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/api/hooks.ts:623 — //TODO: this should actually refetch the map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/api/hooks.ts:653 — //TODO: this should actually refetch the map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment frontend/src/api/hooks.ts:1365 — //TODO: this should actually refetch the map — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D8 · Code Coverage · Low coverage · ×7
  • Low coverage: backend/lib/miio/Codec.js backend/lib/miio/Codec.js:1 — 22.8% line coverage (36/158).
  • Low coverage: backend/lib/miio/MiioHeader.js backend/lib/miio/MiioHeader.js:1 — 47.6% line coverage (10/21).
  • Low coverage: backend/lib/miio/MiioSocket.js backend/lib/miio/MiioSocket.js:1 — 31.5% line coverage (97/308).
  • Low coverage: backend/lib/updater/lib/update_provider/GithubValetudoUpdateProvider.js backend/lib/updater/lib/update_provider/GithubValetudoUpdateProvider.js:1 — 48.1% line coverage (51/106).
  • Low coverage: backend/lib/updater/lib/UpdaterUtils.js backend/lib/updater/lib/UpdaterUtils.js:1 — 35.8% line coverage (68/190).
  • Low coverage: REDACTED REDACTED:1 — 30.6% line coverage (41/134).
  • Low coverage: backend/lib/utils/Tools.js backend/lib/utils/Tools.js:1 — 23.2% line coverage (61/263).
IC1 · Incompleteness & stubs · Fake-async · ×7
  • Fake-async — async method never awaits backend/lib/NetworkConnectionStabilizer.js:74 — `shutdown` 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 backend/lib/robots/midea/MideaMapParser.js:475 — `handleDockPositionUpdate` 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 backend/lib/robots/midea/MideaMapParser.js:489 — `handleVirtualWallUpdate` 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 backend/lib/robots/midea/MideaMapParser.js:532 — `handleVirtualRestrictionZoneUpdate` 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 backend/lib/robots/midea/MideaMapParser.js:577 — `handleActiveZonesUpdate` 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 backend/lib/robots/midea/MideaMapParser.js:609 — `handleActiveSegmentsUpdate` 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 frontend/src/util/XmPlayer.ts:366 — `load` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
IC1 · Incompleteness & stubs · Empty method body · ×7
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:76 — `onUpdate` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:98 — `registerNonCompliantComponent` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:101 — `subscribe` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:104 — `unsubscribe` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:107 — `refresh` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:110 — `refreshAutoconf` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs util/generate_mqtt_docs.js:705 — `publishHomie` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
AC1 · Text alternatives · <canvas> without a text alternative · ×6
  • <canvas> without a text alternative frontend/src/map/EditMap.tsx:415 — 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.
  • <canvas> without a text alternative frontend/src/map/LiveMap.tsx:167 — 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.
  • <canvas> without a text alternative frontend/src/map/RobotCoverageMap.tsx:36 — 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.
  • <canvas> without a text alternative frontend/src/map/SpectatorMapPage.tsx:38 — 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.
  • <canvas> without a text alternative frontend/src/options/ValetudoActivation.tsx:362 — 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.
  • <canvas> without a text alternative frontend/src/robot/Duststream.tsx:58 — 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.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <Input> field component without a label · ×4
  • <Input> field component without a label frontend/src/ProvisioningPage.tsx:325 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label frontend/src/components/list_menu/TextEditModalListMenuItem.tsx:139 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label frontend/src/options/connectivity/AuthSettingsPage.tsx:94 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label frontend/src/options/connectivity/WifiConnectivityPage.tsx:236 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D6 · Cohesion (LCOM4) · Low cohesion · ×4
  • Low cohesion: RoborockValetudoRobot (LCOM4 6) backend/lib/robots/roborock/RoborockValetudoRobot.js:21 — RoborockValetudoRobot's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MiioValetudoRobot (LCOM4 5) REDACTED:21 — MiioValetudoRobot's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: FourColorTheoremSolver (LCOM4 4) frontend/src/map/utils/colors/FourColorTheoremSolver.ts:6 — FourColorTheoremSolver's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: DreameValetudoRobot (LCOM4 4) backend/lib/robots/dreame/DreameValetudoRobot.js:24 — DreameValetudoRobot's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
GD1 · Unfinished & placeholder code · Unfinished stub · ×4
  • Unfinished stub — throws a "not implemented" error backend/lib/core/capabilities/DuststreamingCapability.js:34 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error backend/lib/core/capabilities/SimpleToggleCapability.js:15 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error backend/lib/core/capabilities/SimpleToggleCapability.js:23 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error backend/lib/core/capabilities/SimpleToggleCapability.js:31 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×4
  • Unfinished stub — throws a "not implemented" exception backend/lib/core/capabilities/DuststreamingCapability.js:34 — `register` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception backend/lib/core/capabilities/SimpleToggleCapability.js:15 — `isEnabled` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception backend/lib/core/capabilities/SimpleToggleCapability.js:23 — `enable` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception backend/lib/core/capabilities/SimpleToggleCapability.js:31 — `disable` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
S1 · Web-Security Posture · Weak hash algorithm · ×4
  • Weak hash algorithm backend/lib/miio/Codec.js:25 — 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 backend/lib/miio/Codec.js:26 — 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 backend/lib/miio/Codec.js:54 — 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 backend/lib/miio/Codec.js:146 — 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.
D12 · Dependency Hygiene · Deprecated · ×3
  • Deprecated: uuid REDACTED:60 — uuid 10.0.0, declared in REDACTED, is marked deprecated by its publisher: "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: @babel/plugin-proposal-private-property-in-object REDACTED:61 — @babel/plugin-proposal-private-property-in-object 7.21.11, declared in REDACTED, is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:35 — eslint 8.56.0, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
R7 · Dead Code · Dead file (~4 LoC) · ×3
  • Dead file (~4 LoC) backend/lib/mqtt/common/index.js — no import path from any entry point (15 application, 2 tooling, 18 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~4 LoC) backend/lib/mqtt/index.js — no import path from any entry point (15 application, 2 tooling, 18 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~4 LoC) backend/lib/robots/common/linuxCapabilities/index.js — no import path from any entry point (15 application, 2 tooling, 18 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
AC3 · Page structure · Heading level jumps from h1 to h3 · ×2
  • Heading level jumps from h1 to h3 backend/lib/webserver/res/404/cf.html:34 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 backend/lib/webserver/res/404/tomcat.html:25 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D15 · Churn × Complexity Hotspots · Hotspot · ×2
  • Hotspot: backend/lib/robots/dreame/DreameGen2ValetudoRobot.js backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247 — backend/lib/robots/dreame/DreameGen2ValetudoRobot.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in DreameGen2ValetudoRobot.onIncomingCloudMessage 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 11:26:57 +01:00' --until='2026-11-12 11:26:57 +01:00' --full-history --no-merges -- backend/lib/robots/dreame/DreameGen2ValetudoRobot.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: frontend/src/components/ValetudoAppBar.tsx frontend/src/components/ValetudoAppBar.tsx:328 — frontend/src/components/ValetudoAppBar.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ValetudoAppBar.ValetudoAppBar at line 328. 1 of those changes was a fix/bug commit, and the other 2 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 11:26:57 +01:00' --until='2026-11-12 11:26:57 +01:00' --full-history --no-merges -- frontend/src/components/ValetudoAppBar.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block with local edits (72 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (72 matched lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js:19 — backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js:19 · backend/lib/robots/dreame/capabilities/DreameManualControlCapability.js:26 — the two spans are one implementation copied and then locally edited — 450 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 (72 matched lines × 2 locations) frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:138 — frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:138 · frontend/src/map/structures/client_structures/ZoneClientStructure.ts:120 — the two spans are one implementation copied and then locally edited — 506 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.
R7 · Dead Code · Dead file (~5 LoC) · ×2
  • Dead file (~5 LoC) backend/lib/mqtt/homeassistant/components/index.js — no import path from any entry point (15 application, 2 tooling, 18 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~5 LoC) backend/lib/mqtt/homie/index.js — no import path from any entry point (15 application, 2 tooling, 18 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
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×2
  • Recursive walk over a caller-supplied document has no depth cap frontend/src/api/utils.ts:40 — `getIn` is exported and takes `obj: Record<string, any>` from its caller, and it calls itself at line 40 (`getIn`) with a piece of `obj` — and nowhere in `getIn` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `getIn` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap frontend/src/api/utils.ts:48 — `setIn` is exported and takes `obj: Record<string, any>` from its caller, and it calls itself at line 48 (`setIn`) with a piece of `obj` — and nowhere in `setIn` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `setIn` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC2 · Forms & labels · <fieldset> without a <legend> · ×1
  • <fieldset> without a <legend> backend/lib/webserver/res/404/iis.html:21 — A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one.
AC2 · Forms & labels · <Select> field component without a label · ×1
  • <Select> field component without a label frontend/src/components/list_menu/SelectListMenuItem.tsx:47 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <RadioGroup> field component without a label · ×1
  • <RadioGroup> field component without a label frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:155 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <Slider> field component without a label · ×1
  • <Slider> field component without a label frontend/src/robot/capabilities/Speaker.tsx:43 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <TextField> field component without a label · ×1
  • <TextField> field component without a label frontend/src/valetudo/ValetudoAI.tsx:228 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · DreameQuirkFactory.getQuirk (cyclomatic 137) · ×1
  • DreameQuirkFactory.getQuirk (cyclomatic 137) backend/lib/robots/dreame/DreameQuirkFactory.js:18 — DreameQuirkFactory.getQuirk has cyclomatic complexity 137 (threshold 15). Of this number, 25 points are the body's own statements and 112 belong to 44 function literals inside it that branch. 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MideaValetudoRobot.mapErrorCode (cyclomatic 98) · ×1
  • MideaValetudoRobot.mapErrorCode (cyclomatic 98) backend/lib/robots/midea/MideaValetudoRobot.js:522 — MideaValetudoRobot.mapErrorCode has cyclomatic complexity 98 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MideaQuirkFactory.getQuirk (cyclomatic 96) · ×1
  • MideaQuirkFactory.getQuirk (cyclomatic 96) backend/lib/robots/midea/MideaQuirkFactory.js:22 — MideaQuirkFactory.getQuirk has cyclomatic complexity 96 (threshold 15). Most of this is not in the body itself: 15 of the 96 points are its own statements and the rest belongs to 28 function literals inside it that branch (lines 480, 509, 641, …). 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 · parseAndUpdateState (cyclomatic 89) · ×1
  • parseAndUpdateState (cyclomatic 89) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452 — parseAndUpdateState has cyclomatic complexity 89 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · XmPlayer.processRow (cyclomatic 79) · ×1
  • XmPlayer.processRow (cyclomatic 79) frontend/src/util/XmPlayer.ts:682 — XmPlayer.processRow has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PARSE (cyclomatic 74) · ×1
  • PARSE (cyclomatic 74) backend/lib/robots/dreame/DreameMapParser.js:24 — PARSE has cyclomatic complexity 74 (threshold 15). Of this number, 42 points are the body's own statements and 32 belong to 11 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 · generateHandleDoc (cyclomatic 66) · ×1
  • generateHandleDoc (cyclomatic 66) util/generate_mqtt_docs.js:311 — generateHandleDoc has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BEightParser.PARSE (cyclomatic 54) · ×1
  • BEightParser.PARSE (cyclomatic 54) backend/lib/msmart/BEightParser.js:12 — BEightParser.PARSE has cyclomatic complexity 54 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MideaE20ValetudoRobot.mapErrorCode (cyclomatic 50) · ×1
  • MideaE20ValetudoRobot.mapErrorCode (cyclomatic 50) backend/lib/robots/midea/MideaE20ValetudoRobot.js:200 — MideaE20ValetudoRobot.mapErrorCode has cyclomatic complexity 50 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · onIncomingCloudMessage (cyclomatic 48) · ×1
  • onIncomingCloudMessage (cyclomatic 48) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247 — onIncomingCloudMessage has cyclomatic complexity 48 (threshold 15). Of this number, 16 points are the body's own statements and 32 belong to 5 function literals inside it that branch. 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · onIncomingCloudMessage (cyclomatic 47) · ×1
  • onIncomingCloudMessage (cyclomatic 47) backend/lib/robots/roborock/RoborockValetudoRobot.js:91 — onIncomingCloudMessage has cyclomatic complexity 47 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MAP_ERROR_CODE (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · XmPlayer.runEffects (cyclomatic 46) · ×1
  • XmPlayer.runEffects (cyclomatic 46) frontend/src/util/XmPlayer.ts:862 — XmPlayer.runEffects 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 · SegmentActions.SegmentActions (cyclomatic 46) · ×1
  • SegmentActions.SegmentActions (cyclomatic 46) frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:205 — SegmentActions.SegmentActions has cyclomatic complexity 46 (threshold 15). Of this number, 37 points are the body's own statements and 9 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · parseAndUpdateState (cyclomatic 44) · ×1
  • parseAndUpdateState (cyclomatic 44) backend/lib/robots/roborock/RoborockValetudoRobot.js:242 — parseAndUpdateState has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MAP_ERROR_CODE (cyclomatic 62) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · parseAndUpdateState (cyclomatic 43) · ×1
  • parseAndUpdateState (cyclomatic 43) backend/lib/robots/viomi/ViomiValetudoRobot.js:235 — parseAndUpdateState has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · parseAndUpdateState (cyclomatic 40) · ×1
  • parseAndUpdateState (cyclomatic 40) backend/lib/robots/midea/MideaValetudoRobot.js:197 — parseAndUpdateState 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 · RobotOptions.RobotOptions (cyclomatic 39) · ×1
  • RobotOptions.RobotOptions (cyclomatic 39) frontend/src/robot/RobotOptions.tsx:999 — RobotOptions.RobotOptions has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 1084, 1246, 1197, …). 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 · RoborockQuirkFactory.getQuirk (cyclomatic 37) · ×1
  • RoborockQuirkFactory.getQuirk (cyclomatic 37) backend/lib/robots/roborock/RoborockQuirkFactory.js:15 — RoborockQuirkFactory.getQuirk has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 6 of the 37 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 71, 102, 23, …). 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 · handleInfoMapUpdate (cyclomatic 37) · ×1
  • handleInfoMapUpdate (cyclomatic 37) backend/lib/robots/midea/MideaMapParser.js:190 — handleInfoMapUpdate has cyclomatic complexity 37 (threshold 15). 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, 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 · XmPlayer.parseXM (cyclomatic 36) · ×1
  • XmPlayer.parseXM (cyclomatic 36) frontend/src/util/XmPlayer.ts:100 — XmPlayer.parseXM has cyclomatic complexity 36 (threshold 15). Of this number, 34 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 · XmPlayer.processTick (cyclomatic 33) · ×1
  • XmPlayer.processTick (cyclomatic 33) frontend/src/util/XmPlayer.ts:522 — XmPlayer.processTick 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 · ValetudoAI.ValetudoAI (cyclomatic 33) · ×1
  • ValetudoAI.ValetudoAI (cyclomatic 33) frontend/src/valetudo/ValetudoAI.tsx:22 — ValetudoAI.ValetudoAI has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 6 function items inside it that branch (handleSend, a function literal at line 168, handleKeyPress, …). 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 · RoborockMapParser.POST_PROCESS_BLOCKS (cyclomatic 30) · ×1
  • RoborockMapParser.POST_PROCESS_BLOCKS (cyclomatic 30) backend/lib/robots/roborock/RoborockMapParser.js:442 — RoborockMapParser.POST_PROCESS_BLOCKS has cyclomatic complexity 30 (threshold 15). Of this number, 23 points are the body's own statements and 7 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 · Dock.Dock (cyclomatic 30) · ×1
  • Dock.Dock (cyclomatic 30) frontend/src/controls/Dock.tsx:209 — Dock.Dock has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 261, 303, 323). 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 · ValetudoActivation.KeygenOverlay (cyclomatic 30) · ×1
  • ValetudoActivation.KeygenOverlay (cyclomatic 30) frontend/src/options/ValetudoActivation.tsx:72 — ValetudoActivation.KeygenOverlay has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 171, 188, 85, …). 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 · parseAndUpdateState (cyclomatic 28) · ×1
  • parseAndUpdateState (cyclomatic 28) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:460 — parseAndUpdateState has cyclomatic complexity 28 (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 · Updater.UpdaterStateComponent (cyclomatic 27) · ×1
  • Updater.UpdaterStateComponent (cyclomatic 27) frontend/src/valetudo/Updater.tsx:77 — Updater.UpdaterStateComponent has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 2 function items inside it that branch (getContentForState, getIconForState). 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 · ValetudoAppBar.ValetudoAppBar (cyclomatic 26) · ×1
  • ValetudoAppBar.ValetudoAppBar (cyclomatic 26) frontend/src/components/ValetudoAppBar.tsx:328 — ValetudoAppBar.ValetudoAppBar has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 430, 376, 351, …). 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 · initRoutes (cyclomatic 26) · ×1
  • initRoutes (cyclomatic 26) REDACTED:31 — initRoutes has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 113, 77, 36, …). 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 · DreameConsumableMonitoringCapability.parseConsumablesMessage (cyclomatic 25) · ×1
  • DreameConsumableMonitoringCapability.parseConsumablesMessage (cyclomatic 25) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:235 — DreameConsumableMonitoringCapability.parseConsumablesMessage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ValetudoActivation.ActivationListMenuItem (cyclomatic 25) · ×1
  • ValetudoActivation.ActivationListMenuItem (cyclomatic 25) frontend/src/options/ValetudoActivation.tsx:404 — ValetudoActivation.ActivationListMenuItem has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardInput.KeyboardInput (cyclomatic 24) · ×1
  • KeyboardInput.KeyboardInput (cyclomatic 24) frontend/src/robot/manual_control/KeyboardInput.tsx:13 — KeyboardInput.KeyboardInput has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 40, 91, 113, …). 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 · DuststreamerManager.doControlLoopCycle (cyclomatic 23) · ×1
  • DuststreamerManager.doControlLoopCycle (cyclomatic 23) backend/lib/duststreaming/DuststreamerManager.js:129 — DuststreamerManager.doControlLoopCycle 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 · SpectatorMapPage.SpectatorMapPage (cyclomatic 23) · ×1
  • SpectatorMapPage.SpectatorMapPage (cyclomatic 23) frontend/src/map/SpectatorMapPage.tsx:63 — SpectatorMapPage.SpectatorMapPage has cyclomatic complexity 23 (threshold 15). 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: 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 · setupHTTP (cyclomatic 22) · ×1
  • setupHTTP (cyclomatic 22) REDACTED:127 — setupHTTP has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 29 function items inside it that branch (a function literal at line 540, a function literal at line 172, a function literal at line 186, …). 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 · constructor (cyclomatic 22) · ×1
  • constructor (cyclomatic 22) backend/lib/miio/MiioSocket.js:25 — constructor has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 52). 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 · DreameConsumableMonitoringCapability.resetConsumable (cyclomatic 21) · ×1
  • DreameConsumableMonitoringCapability.resetConsumable (cyclomatic 21) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:161 — DreameConsumableMonitoringCapability.resetConsumable has cyclomatic complexity 21 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MqttHandle.marshalHomie (cyclomatic 20) · ×1
  • MqttHandle.marshalHomie (cyclomatic 20) backend/lib/mqtt/handles/MqttHandle.js:338 — MqttHandle.marshalHomie 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 · ValetudoRouter.initRoutes (cyclomatic 20) · ×1
  • ValetudoRouter.initRoutes (cyclomatic 20) REDACTED:37 — ValetudoRouter.initRoutes has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 150, 46, 200, …). 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 · ZoneActions.ZoneActions (cyclomatic 20) · ×1
  • ZoneActions.ZoneActions (cyclomatic 20) frontend/src/map/actions/live_map_actions/ZoneActions.tsx:31 — ZoneActions.ZoneActions has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · XmPlayer.mix (cyclomatic 20) · ×1
  • XmPlayer.mix (cyclomatic 20) frontend/src/util/XmPlayer.ts:443 — XmPlayer.mix 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 · onIncomingCloudMessage (cyclomatic 20) · ×1
  • onIncomingCloudMessage (cyclomatic 20) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:342 — onIncomingCloudMessage has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 6 function literals inside it that branch. 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DreameMapParser.PARSE_IMAGE (cyclomatic 19) · ×1
  • DreameMapParser.PARSE_IMAGE (cyclomatic 19) backend/lib/robots/dreame/DreameMapParser.js:503 — DreameMapParser.PARSE_IMAGE 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, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SegmentActions.SegmentActions (cyclomatic 19) · ×1
  • SegmentActions.SegmentActions (cyclomatic 19) frontend/src/map/actions/live_map_actions/SegmentActions.tsx:19 — SegmentActions.SegmentActions has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WifiConnectivityPage.WifiStatusComponent (cyclomatic 19) · ×1
  • WifiConnectivityPage.WifiStatusComponent (cyclomatic 19) frontend/src/options/connectivity/WifiConnectivityPage.tsx:51 — WifiConnectivityPage.WifiStatusComponent has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (getIconForState, getContentForState). 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 · DreameMapAnnotationsCapability.setMapAnnotations (cyclomatic 18) · ×1
  • DreameMapAnnotationsCapability.setMapAnnotations (cyclomatic 18) backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js:40 — DreameMapAnnotationsCapability.setMapAnnotations has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Dock.DockComponents (cyclomatic 18) · ×1
  • Dock.DockComponents (cyclomatic 18) frontend/src/controls/Dock.tsx:76 — Dock.DockComponents has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 83, 150). 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 · ActionControls.SegmentCleanupActionControls (cyclomatic 18) · ×1
  • ActionControls.SegmentCleanupActionControls (cyclomatic 18) frontend/src/valetudo/timers/ActionControls.tsx:53 — ActionControls.SegmentCleanupActionControls has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TimerEditDialog.TimerEditDialog (cyclomatic 18) · ×1
  • TimerEditDialog.TimerEditDialog (cyclomatic 18) frontend/src/valetudo/timers/TimerEditDialog.tsx:64 — TimerEditDialog.TimerEditDialog has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 126, 282, 81, …). 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 · setMaterial (cyclomatic 18) · ×1
  • setMaterial (cyclomatic 18) backend/lib/robots/dreame/capabilities/DreameMapSegmentMaterialControlCapability.js:41 — setMaterial has cyclomatic complexity 18 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RoborockGen4ValetudoRobot.handlePropertyChange (cyclomatic 17) · ×1
  • RoborockGen4ValetudoRobot.handlePropertyChange (cyclomatic 17) backend/lib/robots/roborock/RoborockGen4ValetudoRobot.js:143 — RoborockGen4ValetudoRobot.handlePropertyChange has cyclomatic complexity 17 (threshold 15). 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. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MQTTConnectivityPage.MQTTConnectivity (cyclomatic 17) · ×1
  • MQTTConnectivityPage.MQTTConnectivity (cyclomatic 17) frontend/src/options/connectivity/MQTTConnectivityPage.tsx:433 — MQTTConnectivityPage.MQTTConnectivity has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VirtualRestrictionActions.VirtualRestrictionActions (cyclomatic 17) · ×1
  • VirtualRestrictionActions.VirtualRestrictionActions (cyclomatic 17) frontend/src/map/actions/edit_map_actions/VirtualRestrictionActions.tsx:46 — VirtualRestrictionActions.VirtualRestrictionActions has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MapAnnotationActions.MapAnnotationActions (cyclomatic 17) · ×1
  • MapAnnotationActions.MapAnnotationActions (cyclomatic 17) frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:37 — MapAnnotationActions.MapAnnotationActions 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, 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 · connect (cyclomatic 17) · ×1
  • connect (cyclomatic 17) backend/lib/mqtt/MqttController.js:314 — connect 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 13 function items inside it that branch (a function literal at line 402, a function literal at line 373, a function literal at line 336, …). 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 · pollTime (cyclomatic 17) · ×1
  • pollTime (cyclomatic 17) backend/lib/NTPClient.js:60 — pollTime has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 4 function literals 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 · ViomiQuirkFactory.getQuirk (cyclomatic 16) · ×1
  • ViomiQuirkFactory.getQuirk (cyclomatic 16) backend/lib/robots/viomi/ViomiQuirkFactory.js:15 — ViomiQuirkFactory.getQuirk has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 63, 23, 40, …). 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 · MapManagement.MapManagement (cyclomatic 16) · ×1
  • MapManagement.MapManagement (cyclomatic 16) frontend/src/options/MapManagement.tsx:163 — MapManagement.MapManagement 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 2 function literals inside it that branch (lines 195, 278). 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 · RobotOptions.CleanRouteControlCapabilitySelectListMenuItem (cyclomatic 16) · ×1
  • RobotOptions.CleanRouteControlCapabilitySelectListMenuItem (cyclomatic 16) frontend/src/robot/RobotOptions.tsx:699 — RobotOptions.CleanRouteControlCapabilitySelectListMenuItem has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 750, 726, 715). 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.
D12 · Dependency Hygiene · One package at two majors across the workspace · ×1
  • One package at two majors across the workspace: axios — `axios` is maintained at 2 different major versions inside this one repository — major 0 in REDACTED; major 1 in REDACTED. Every major carries its own breaking changes, advisories and upgrade path, so the cost of keeping current is paid more than once; and where the packages are installed together, the resolver cannot dedupe them, so both copies ship.
D2 · Cognitive Complexity · PARSE (cognitive 168) · ×1
  • PARSE (cognitive 168) backend/lib/robots/dreame/DreameMapParser.js:24 — PARSE has cognitive complexity 168 (threshold 15). Drivers by points: if/else 50 (138 pts), boolean chains 10, loops 3 (10 pts), match/switch 1 (4 pts), ternaries 1 (3 pts), error handling 1 (2 pts), other 1 (nesting depth added 101). Of this number, 83 points are the body's own statements and 85 belong to 11 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · XmPlayer.processRow (cognitive 155) · ×1
  • XmPlayer.processRow (cognitive 155) frontend/src/util/XmPlayer.ts:682 — XmPlayer.processRow has cognitive complexity 155 (threshold 15). Drivers by points: if/else 50 (140 pts), boolean chains 12, match/switch 1 (2 pts), loops 1 (nesting depth added 91). 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 · parseAndUpdateState (cognitive 146) · ×1
  • parseAndUpdateState (cognitive 146) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452 — parseAndUpdateState has cognitive complexity 146 (threshold 15). Drivers by points: if/else 30 (88 pts), match/switch 10 (37 pts), error handling 2 (10 pts), boolean chains 5, other 5, loops 1 (nesting depth added 93). 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 · XmPlayer.parseXM (cognitive 137) · ×1
  • XmPlayer.parseXM (cognitive 137) frontend/src/util/XmPlayer.ts:100 — XmPlayer.parseXM has cognitive complexity 137 (threshold 15). Drivers by points: if/else 22 (88 pts), loops 14 (37 pts), ternaries 3 (12 pts) (nesting depth added 98). Of this number, 134 points are the body's own statements and 3 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 · MideaQuirkFactory.getQuirk (cognitive 126) · ×1
  • MideaQuirkFactory.getQuirk (cognitive 126) backend/lib/robots/midea/MideaQuirkFactory.js:22 — MideaQuirkFactory.getQuirk has cognitive complexity 126 (threshold 15). Drivers by points: if/else 39 (61 pts), match/switch 18 (41 pts), ternaries 8 (24 pts) (nesting depth added 61). Most of this is not in the body itself: 1 of the 126 points is its own statement and the rest belongs to 28 function literals inside it that branch (lines 30, 86, 132, …). 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 · generateHandleDoc (cognitive 103) · ×1
  • generateHandleDoc (cognitive 103) util/generate_mqtt_docs.js:311 — generateHandleDoc has cognitive complexity 103 (threshold 15). Drivers by points: if/else 47 (74 pts), boolean chains 12, loops 4 (8 pts), match/switch 1 (4 pts), error handling 1 (2 pts), ternaries 1 (2 pts), other 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DreameQuirkFactory.getQuirk (cognitive 93) · ×1
  • DreameQuirkFactory.getQuirk (cognitive 93) backend/lib/robots/dreame/DreameQuirkFactory.js:18 — DreameQuirkFactory.getQuirk has cognitive complexity 93 (threshold 15). Drivers by points: match/switch 41 (81 pts), if/else 6 (12 pts) (nesting depth added 46). Most of this is not in the body itself: 1 of the 93 points is its own statement and the rest belongs to 44 function literals inside it that branch (lines 644, 26, 43, …). 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 · XmPlayer.runEffects (cognitive 73) · ×1
  • XmPlayer.runEffects (cognitive 73) frontend/src/util/XmPlayer.ts:862 — XmPlayer.runEffects has cognitive complexity 73 (threshold 15). Drivers by points: if/else 35 (55 pts), ternaries 5 (10 pts), boolean chains 8 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseAndUpdateState (cognitive 65) · ×1
  • parseAndUpdateState (cognitive 65) backend/lib/robots/roborock/RoborockValetudoRobot.js:242 — parseAndUpdateState has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (49 pts), boolean chains 8, ternaries 2 (4 pts), match/switch 1 (3 pts), other 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · parseAndUpdateState (cognitive 63) · ×1
  • parseAndUpdateState (cognitive 63) backend/lib/robots/viomi/ViomiValetudoRobot.js:235 — parseAndUpdateState has cognitive complexity 63 (threshold 15). Drivers by points: if/else 28 (46 pts), boolean chains 10, ternaries 2 (4 pts), match/switch 1 (2 pts), other 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 · POST_PROCESS_BLOCKS (cognitive 63) · ×1
  • POST_PROCESS_BLOCKS (cognitive 63) backend/lib/robots/roborock/RoborockMapParser.js:442 — POST_PROCESS_BLOCKS has cognitive complexity 63 (threshold 15). Drivers by points: if/else 25 (56 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 33). Of this number, 48 points are the body's own statements and 15 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parseAndUpdateState (cognitive 60) · ×1
  • parseAndUpdateState (cognitive 60) backend/lib/robots/midea/MideaValetudoRobot.js:197 — parseAndUpdateState has cognitive complexity 60 (threshold 15). Drivers by points: if/else 33 (50 pts), boolean chains 4, other 3, ternaries 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XmPlayer.processTick (cognitive 57) · ×1
  • XmPlayer.processTick (cognitive 57) frontend/src/util/XmPlayer.ts:522 — XmPlayer.processTick has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (42 pts), boolean chains 9, loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XmPlayer.mix (cognitive 49) · ×1
  • XmPlayer.mix (cognitive 49) frontend/src/util/XmPlayer.ts:443 — XmPlayer.mix has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (43 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · handleInfoMapUpdate (cognitive 45) · ×1
  • handleInfoMapUpdate (cognitive 45) backend/lib/robots/midea/MideaMapParser.js:190 — handleInfoMapUpdate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (10 pts), match/switch 2 (8 pts), boolean chains 2, other 1 (nesting depth added 24). Of this number, 40 points are the body's own statements and 5 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 · constructor (cognitive 44) · ×1
  • constructor (cognitive 44) backend/lib/miio/MiioSocket.js:25 — constructor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 5, other 2, ternaries 1 (nesting depth added 17). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to one function literal inside it that branches (line 52). 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 · DreameConsumableMonitoringCapability.parseConsumablesMessage (cognitive 38) · ×1
  • DreameConsumableMonitoringCapability.parseConsumablesMessage (cognitive 38) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:235 — DreameConsumableMonitoringCapability.parseConsumablesMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 4 (7 pts), boolean chains 6 (nesting depth added 16). 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 · RobotOptions.RobotOptions (cognitive 38) · ×1
  • RobotOptions.RobotOptions (cognitive 38) frontend/src/robot/RobotOptions.tsx:999 — RobotOptions.RobotOptions has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30 (33 pts), boolean chains 5 (nesting depth added 3). None of this is in the body itself: all 38 points belong to 7 function literals inside it that branch (lines 1084, 1246, 1197, …). 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 · DreameMapParser.PARSE_IMAGE (cognitive 37) · ×1
  • DreameMapParser.PARSE_IMAGE (cognitive 37) backend/lib/robots/dreame/DreameMapParser.js:503 — DreameMapParser.PARSE_IMAGE has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 1 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 21). Of this number, 35 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 · initRoutes (cognitive 37) · ×1
  • initRoutes (cognitive 37) REDACTED:31 — initRoutes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (28 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 7). None of this is in the body itself: all 37 points belong to 9 function literals inside it that branch (lines 113, 77, 154, …). 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 · onIncomingCloudMessage (cognitive 34) · ×1
  • onIncomingCloudMessage (cognitive 34) backend/lib/robots/roborock/RoborockValetudoRobot.js:91 — onIncomingCloudMessage has cognitive complexity 34 (threshold 15). Drivers by points: error handling 10 (20 pts), if/else 4 (6 pts), loops 1 (3 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 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 · BEightParser.PARSE (cognitive 33) · ×1
  • BEightParser.PARSE (cognitive 33) backend/lib/msmart/BEightParser.js:12 — BEightParser.PARSE has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 8 (19 pts), if/else 7 (12 pts), boolean chains 2 (nesting depth added 16). 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 · ValetudoActivation.KeygenOverlay (cognitive 32) · ×1
  • ValetudoActivation.KeygenOverlay (cognitive 32) frontend/src/options/ValetudoActivation.tsx:72 — ValetudoActivation.KeygenOverlay has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 4, ternaries 4, loops 2 (3 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 171, 105, 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.
D2 · Cognitive Complexity · ValetudoActivation.ActivationListMenuItem (cognitive 32) · ×1
  • ValetudoActivation.ActivationListMenuItem (cognitive 32) frontend/src/options/ValetudoActivation.tsx:404 — ValetudoActivation.ActivationListMenuItem has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 8, error handling 3 (5 pts), boolean chains 4, loops 2 (nesting depth added 5). Of this number, 18 points are the body's own statements and 14 belong to 5 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 · ValetudoAppBar.ValetudoAppBar (cognitive 31) · ×1
  • ValetudoAppBar.ValetudoAppBar (cognitive 31) frontend/src/components/ValetudoAppBar.tsx:328 — ValetudoAppBar.ValetudoAppBar has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, match/switch 3 (4 pts), ternaries 2 (3 pts) (nesting depth added 10). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 376, 430, 351, …). 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 · ValetudoAI.ValetudoAI (cognitive 31) · ×1
  • ValetudoAI.ValetudoAI (cognitive 31) frontend/src/valetudo/ValetudoAI.tsx:22 — ValetudoAI.ValetudoAI has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11, ternaries 9 (10 pts), boolean chains 9, error handling 1 (nesting depth added 1). 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 items inside it that branch (handleSend, a function literal at line 168, renderMessage, …). 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 · connect (cognitive 31) · ×1
  • connect (cognitive 31) backend/lib/mqtt/MqttController.js:314 — connect has cognitive complexity 31 (threshold 15). Drivers by points: error handling 6 (14 pts), if/else 6 (11 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 14). Most of this is not in the body itself: 6 of the 31 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 402, a function literal at line 373, a function literal at line 336, …). 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 · parseAndUpdateState (cognitive 31) · ×1
  • parseAndUpdateState (cognitive 31) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:460 — parseAndUpdateState has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (8 pts), boolean chains 5, ternaries 1 (3 pts), loops 1, other 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · initRoutes (cognitive 31) · ×1
  • initRoutes (cognitive 31) REDACTED:37 — initRoutes has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 4, error handling 1, match/switch 1 (nesting depth added 6). None of this is in the body itself: all 31 points belong to 16 function literals inside it that branch (lines 150, 46, 200, …). 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 · ValetudoUpdaterDownloadStep.execute (cognitive 29) · ×1
  • ValetudoUpdaterDownloadStep.execute (cognitive 29) backend/lib/updater/lib/steps/ValetudoUpdaterDownloadStep.js:37 — ValetudoUpdaterDownloadStep.execute has cognitive complexity 29 (threshold 15). Drivers by points: error handling 8 (20 pts), if/else 6 (9 pts) (nesting depth added 15). Of this number, 28 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 · SegmentActions.SegmentActions (cognitive 29) · ×1
  • SegmentActions.SegmentActions (cognitive 29) frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:205 — SegmentActions.SegmentActions has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 25, if/else 4. Of this number, 21 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DreameConsumableMonitoringCapability.resetConsumable (cognitive 28) · ×1
  • DreameConsumableMonitoringCapability.resetConsumable (cognitive 28) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:161 — DreameConsumableMonitoringCapability.resetConsumable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 6 (13 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 · MideaMapParser.handleUserDefinedCarpetUpdate (cognitive 28) · ×1
  • MideaMapParser.handleUserDefinedCarpetUpdate (cognitive 28) backend/lib/robots/midea/MideaMapParser.js:688 — MideaMapParser.handleUserDefinedCarpetUpdate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (10 pts), error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoborockMapParser.PARSE_IMAGE_BLOCK (cognitive 28) · ×1
  • RoborockMapParser.PARSE_IMAGE_BLOCK (cognitive 28) backend/lib/robots/roborock/RoborockMapParser.js:199 — RoborockMapParser.PARSE_IMAGE_BLOCK has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 17). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. 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 · RoborockQuirkFactory.getQuirk (cognitive 28) · ×1
  • RoborockQuirkFactory.getQuirk (cognitive 28) backend/lib/robots/roborock/RoborockQuirkFactory.js:15 — RoborockQuirkFactory.getQuirk has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 9 (18 pts), if/else 6 (10 pts) (nesting depth added 13). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 71, 23, 37, …). 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 · setMapAnnotations (cognitive 27) · ×1
  • setMapAnnotations (cognitive 27) backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js:40 — setMapAnnotations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (10 pts), match/switch 2 (4 pts), boolean chains 3 (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 · KeyboardInput.KeyboardInput (cognitive 26) · ×1
  • KeyboardInput.KeyboardInput (cognitive 26) frontend/src/robot/manual_control/KeyboardInput.tsx:13 — KeyboardInput.KeyboardInput has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 3 (nesting depth added 2). None of this is in the body itself: all 26 points belong to 4 function literals inside it that branch (lines 40, 91, 113, …). 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 · TimerEditDialog.TimerEditDialog (cognitive 26) · ×1
  • TimerEditDialog.TimerEditDialog (cognitive 26) frontend/src/valetudo/timers/TimerEditDialog.tsx:64 — TimerEditDialog.TimerEditDialog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 3, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 126, 81, 92, …). 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 · POST_PROCESS_BLOCKS (cognitive 26) · ×1
  • POST_PROCESS_BLOCKS (cognitive 26) backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:453 — POST_PROCESS_BLOCKS has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), other 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · doControlLoopCycle (cognitive 26) · ×1
  • doControlLoopCycle (cognitive 26) backend/lib/duststreaming/DuststreamerManager.js:129 — doControlLoopCycle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 6, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · performFullProvisioningSequence (cognitive 25) · ×1
  • performFullProvisioningSequence (cognitive 25) backend/lib/robots/midea/capabilities/MideaWifiConfigurationCapability.js:54 — performFullProvisioningSequence has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 3, error handling 1 (2 pts), loops 1 (nesting depth added 8). None of this is in the body itself: all 25 points belong to 9 function items inside it that branch (a function literal at line 113, a function literal at line 87, a function literal at line 94, …). 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 · onIncomingCloudMessage (cognitive 23) · ×1
  • onIncomingCloudMessage (cognitive 23) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:342 — onIncomingCloudMessage has cognitive complexity 23 (threshold 15). Drivers by points: error handling 4 (11 pts), match/switch 4 (8 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 12). Of this number, 18 points are the body's own statements and 5 belong to 6 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 · ThreeIRobotixMapParser.PARSE_IMAGE_BLOCK (cognitive 22) · ×1
  • ThreeIRobotixMapParser.PARSE_IMAGE_BLOCK (cognitive 22) backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:225 — ThreeIRobotixMapParser.PARSE_IMAGE_BLOCK has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setupHTTP (cognitive 22) · ×1
  • setupHTTP (cognitive 22) REDACTED:127 — setupHTTP has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (16 pts), other 3, boolean chains 2, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 22 points belong to 29 function items inside it that branch (a function literal at line 540, a function literal at line 172, a function literal at line 186, …). 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 · MSmartDummycloud.handleIncomingCloudMessage (cognitive 21) · ×1
  • MSmartDummycloud.handleIncomingCloudMessage (cognitive 21) REDACTED:571 — MSmartDummycloud.handleIncomingCloudMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, error handling 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 · RampClientStructure.translate (cognitive 21) · ×1
  • RampClientStructure.translate (cognitive 21) frontend/src/map/structures/client_structures/RampClientStructure.ts:246 — RampClientStructure.translate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Updater.UpdaterStateComponent (cognitive 21) · ×1
  • Updater.UpdaterStateComponent (cognitive 21) frontend/src/valetudo/Updater.tsx:77 — Updater.UpdaterStateComponent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6, ternaries 2 (6 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 6). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (getContentForState, getIconForState). 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 · onIncomingCloudMessage (cognitive 21) · ×1
  • onIncomingCloudMessage (cognitive 21) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247 — onIncomingCloudMessage has cognitive complexity 21 (threshold 15). Drivers by points: error handling 4 (11 pts), match/switch 3 (6 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 11). Of this number, 12 points are the body's own statements and 9 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 · constructor (cognitive 21) · ×1
  • constructor (cognitive 21) REDACTED:27 — constructor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 2 (5 pts), other 5, loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 119, a function literal at line 85, a function literal at line 107, …). 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 · ViomiQuirkFactory.getQuirk (cognitive 19) · ×1
  • ViomiQuirkFactory.getQuirk (cognitive 19) backend/lib/robots/viomi/ViomiQuirkFactory.js:15 — ViomiQuirkFactory.getQuirk has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 4 (6 pts), boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 23, 63, 40, …). 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 · EditMap.onTap (cognitive 19) · ×1
  • EditMap.onTap (cognitive 19) frontend/src/map/EditMap.tsx:369 — EditMap.onTap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), boolean chains 2 (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 · marshalHomie (cognitive 19) · ×1
  • marshalHomie (cognitive 19) backend/lib/mqtt/handles/MqttHandle.js:338 — marshalHomie has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 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 · DreameValetudoRobot.executeMapPoll (cognitive 18) · ×1
  • DreameValetudoRobot.executeMapPoll (cognitive 18) backend/lib/robots/dreame/DreameValetudoRobot.js:67 — DreameValetudoRobot.executeMapPoll has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · evaluateTimers (cognitive 18) · ×1
  • evaluateTimers (cognitive 18) backend/lib/scheduler/Scheduler.js:34 — evaluateTimers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 1 (3 pts), loops 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 6 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, 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 · Codec.decodeIncomingMiioPacket (cognitive 17) · ×1
  • Codec.decodeIncomingMiioPacket (cognitive 17) backend/lib/miio/Codec.js:37 — Codec.decodeIncomingMiioPacket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapLayerManagerUtils.PROCESS_LAYERS (cognitive 17) · ×1
  • MapLayerManagerUtils.PROCESS_LAYERS (cognitive 17) frontend/src/map/MapLayerManagerUtils.ts:237 — MapLayerManagerUtils.PROCESS_LAYERS has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 1 (2 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 265). 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 · BaseMap.onTap (cognitive 17) · ×1
  • BaseMap.onTap (cognitive 17) frontend/src/map/BaseMap.tsx:371 — BaseMap.onTap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 379, 418, 459). 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 · XmPlayer.getEnv (cognitive 17) · ×1
  • XmPlayer.getEnv (cognitive 17) frontend/src/util/XmPlayer.ts:653 — XmPlayer.getEnv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapManagement.MapManagement (cognitive 17) · ×1
  • MapManagement.MapManagement (cognitive 17) frontend/src/options/MapManagement.tsx:163 — MapManagement.MapManagement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 2 function literals inside it that branch (lines 195, 278). 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 · ActionControls.SegmentCleanupActionControls (cognitive 17) · ×1
  • ActionControls.SegmentCleanupActionControls (cognitive 17) frontend/src/valetudo/timers/ActionControls.tsx:53 — ActionControls.SegmentCleanupActionControls has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 1 (2 pts), loops 1 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 6 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 · handleSemanticDataUpdate (cognitive 17) · ×1
  • handleSemanticDataUpdate (cognitive 17) backend/lib/robots/midea/MideaMapParser.js:618 — handleSemanticDataUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1, other 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 · setupMemoryManagement (cognitive 17) · ×1
  • setupMemoryManagement (cognitive 17) backend/lib/Valetudo.js:131 — setupMemoryManagement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 1 (4 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 160, 199, 201). 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 · constructor (cognitive 17) · ×1
  • constructor (cognitive 17) backend/lib/webserver/WebServer.js:45 — constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 92, superBasicValidationMiddleware, a function literal at line 161, …). 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 · HassAnchorProvider.resolve (cognitive 16) · ×1
  • HassAnchorProvider.resolve (cognitive 16) backend/lib/mqtt/homeassistant/HassAnchorProvider.js:73 — HassAnchorProvider.resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UpdaterUtils.storageSurvey (cognitive 16) · ×1
  • UpdaterUtils.storageSurvey (cognitive 16) backend/lib/updater/lib/UpdaterUtils.js:15 — UpdaterUtils.storageSurvey has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), error handling 2, boolean chains 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 · ZoneClientStructure.translate (cognitive 16) · ×1
  • ZoneClientStructure.translate (cognitive 16) frontend/src/map/structures/client_structures/ZoneClientStructure.ts:160 — ZoneClientStructure.translate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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 · DuststreamingListMenuItem.DuststreamingListMenuItem (cognitive 16) · ×1
  • DuststreamingListMenuItem.DuststreamingListMenuItem (cognitive 16) frontend/src/components/list_menu/DuststreamingListMenuItem.tsx:216 — DuststreamingListMenuItem.DuststreamingListMenuItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (6 pts), boolean chains 3 (nesting depth added 3). Of this number, 10 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · RestrictedZoneClientStructure.translate (cognitive 16) · ×1
  • RestrictedZoneClientStructure.translate (cognitive 16) frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:178 — RestrictedZoneClientStructure.translate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 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 · SpectatorMapPage.SpectatorMapPage (cognitive 16) · ×1
  • SpectatorMapPage.SpectatorMapPage (cognitive 16) frontend/src/map/SpectatorMapPage.tsx:63 — SpectatorMapPage.SpectatorMapPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 13 points are the body's own statements and 3 belong to 3 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 · handleTrackUpdate (cognitive 16) · ×1
  • handleTrackUpdate (cognitive 16) backend/lib/robots/midea/MideaMapParser.js:351 — handleTrackUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, boolean chains 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 2 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 · isEnabled (cognitive 16) · ×1
  • isEnabled (cognitive 16) backend/lib/robots/viomi/capabilities/ViomiCarpetModeControlCapability.js:27 — isEnabled has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: index.js ↔ index.js backend/lib/core/capabilities/index.js:1 — `backend/lib/core/capabilities/index.js` and `backend/lib/webserver/capabilityRouters/index.js` change together 100% of the time (28 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 28 shared commits counted here, the most recent 3 are `fb39d939` feat(core): Duststreaming; `f1db08b8` feat(core): MapAnnotationsCapability; `448e3adb` feat(core): AutoEmptyDockAutoEmptyDurationControlCapability — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Hollow method · ×1
  • Hollow method — returns a constant without doing the work frontend/src/map/MapLayerManagerUtils.ts:48 — `solidFillPixelPatternHandler` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • Skeleton type — most members are unfinished util/generate_mqtt_docs.js:82 — `FakeHassController` has 5 unfinished members out of 6 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience backend/lib/updater/lib/UpdaterUtils.js:174 — `axios.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (64 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (64 clone groups) backend/lib/robots/dreame/DreameQuirkFactory.js:832 — 64 duplicated blocks under backend/lib/robots/ have copies in at least two of the sibling directories 3irobotix, common, dreame, midea, mock, roborock (+1 more sibling(s) not listed) — 32 of them are reported below, and 32 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 64 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 64 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 64 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (14 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (14 clone groups) frontend/src/options/MapManagement.tsx:249 — 14 duplicated blocks under frontend/src/ have copies in at least two of the sibling directories components, controls, map, options, robot, valetudo — 3 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 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 10 sibling directories (13 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (13 clone groups) REDACTED:339 — 13 duplicated blocks under backend/lib/ have copies in at least two of the sibling directories duststreaming, entities, mqtt, msmart, robots, scheduler (+4 more sibling(s) not listed) — 6 of them are reported below, and 7 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 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 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 13 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 (7 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (7 clone groups) frontend/src/map/structures/client_structures/CurtainClientStructure.ts:22 — 7 duplicated blocks under frontend/src/map/structures/ have copies in at least two of the sibling directories client_structures, map_structures — 6 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Wholesale file copy (262 identical lines × 2 files) · ×1
  • Wholesale file copy (262 identical lines × 2 files) backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:1 — backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:1 · backend/lib/robots/dreame/DreameMovaZ60UltraRollerValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 262 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (200 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (200 matched lines × 2 locations) frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:26 — frontend/src/map/actions/edit_map_actions/MapAnnotationActions.tsx:26 · frontend/src/map/actions/edit_map_actions/VirtualRestrictionActions.tsx:35 — the two spans are one implementation copied and then locally edited — 896 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 (145 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (145 matched lines × 2 locations) backend/lib/robots/dreame/DreameQuirkFactory.js:832 — backend/lib/robots/dreame/DreameQuirkFactory.js:832 · backend/lib/robots/midea/MideaQuirkFactory.js:512 — the two spans are one implementation copied and then locally edited — 539 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 (141 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (141 matched lines × 2 locations) frontend/src/map/actions/live_map_actions/SegmentActions.tsx:22 — frontend/src/map/actions/live_map_actions/SegmentActions.tsx:22 · frontend/src/map/actions/live_map_actions/ZoneActions.tsx:34 — the two spans are one implementation copied and then locally edited — 696 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (132 lines × 2 locations) · ×1
  • Duplicated block (132 lines × 2 locations) backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:211 — backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:211 · backend/lib/robots/dreame/DreameX30UltraValetudoRobot.js:213 — 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 (131 lines × 4 locations) · ×1
  • Duplicated block (131 lines × 4 locations) backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:220 — backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:220 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:220 · backend/lib/robots/dreame/DreameX40MasterValetudoRobot.js:220 · backend/lib/robots/dreame/DreameX40UltraValetudoRobot.js:220 — the 4 copies are spread across 4 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 (130 lines × 2 locations) · ×1
  • Duplicated block (130 lines × 2 locations) backend/lib/robots/midea/MideaE20ValetudoRobot.js:190 — backend/lib/robots/midea/MideaE20ValetudoRobot.js:190 · backend/lib/robots/midea/MideaValetudoRobot.js:512 — 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 (127 lines × 2 locations) · ×1
  • Duplicated block (127 lines × 2 locations) backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:14 — backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:14 · backend/lib/robots/dreame/DreameD10SProValetudoRobot.js:14 — 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 (126 lines × 2 locations) · ×1
  • Duplicated block (126 lines × 2 locations) backend/lib/robots/dreame/DreameL10SProValetudoRobot.js:12 — backend/lib/robots/dreame/DreameL10SProValetudoRobot.js:12 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:12 — 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 (116 lines × 2 locations) · ×1
  • Duplicated block (116 lines × 2 locations) backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238 — backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238 · backend/lib/robots/dreame/DreameX30UltraValetudoRobot.js:234 — 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 (115 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (115 matched lines × 2 locations) backend/lib/robots/roborock/RoborockValetudoRobot.js:314 — backend/lib/robots/roborock/RoborockValetudoRobot.js:314 · backend/lib/robots/viomi/ViomiValetudoRobot.js:304 — the two spans are one implementation copied and then locally edited — 659 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 (114 lines × 5 locations) · ×1
  • Duplicated block (114 lines × 5 locations) backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:38 — backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:38 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:38 · backend/lib/robots/dreame/DreameMovaV50UltraValetudoRobot.js:39 · backend/lib/robots/dreame/DreameX40MasterValetudoRobot.js:38 · +1 more site(s) not listed — the 5 copies are spread across 5 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 (112 lines × 2 locations) · ×1
  • Duplicated block (112 lines × 2 locations) backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:226 — backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:226 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:238 — 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 (104 lines × 3 locations) · ×1
  • Duplicated block (104 lines × 3 locations) backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:10 — backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:10 · backend/lib/robots/dreame/DreameP2150ValetudoRobot.js:11 · backend/lib/robots/dreame/DreameZ10ProValetudoRobot.js:11 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (103 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (103 matched lines × 2 locations) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:11 — backend/lib/robots/dreame/Dreame1CValetudoRobot.js:11 · backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:16 — the two spans are one implementation copied and then locally edited — 506 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 (90 lines × 2 locations) · ×1
  • Duplicated block (90 lines × 2 locations) backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:15 — backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:15 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:12 — 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 · Wholesale file copy (90 identical lines × 2 files) · ×1
  • Wholesale file copy (90 identical lines × 2 files) backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:1 — backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:1 · backend/lib/robots/midea/MideaJ15UltraValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 90 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (88 lines × 7 locations) · ×1
  • Duplicated block (88 lines × 7 locations) backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:16 — backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:16 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:16 · +3 more site(s) not listed — the 7 copies are spread across 7 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 (88 lines × 2 locations) · ×1
  • Duplicated block (88 lines × 2 locations) backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:122 — backend/lib/robots/dreame/DreameMovaP10ProUltraValetudoRobot.js:122 · backend/lib/robots/dreame/DreameMovaS20UltraValetudoRobot.js:122 — 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 · Wholesale file copy (77 identical lines × 3 files) · ×1
  • Wholesale file copy (77 identical lines × 3 files) backend/lib/robots/roborock/RoborockG10SValetudoRobot.js:1 — backend/lib/robots/roborock/RoborockG10SValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS8ProUltraValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS8ValetudoRobot.js:1 — these 3 files are line-for-line copies of one another — 77 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (76 matched lines × 2 locations) frontend/src/options/connectivity/AuthSettingsPage.tsx:58 — frontend/src/options/connectivity/AuthSettingsPage.tsx:58 · frontend/src/options/connectivity/NetworkAdvertisementSettingsPage.tsx:60 — the two spans are one implementation copied and then locally edited — 356 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 (74 lines × 3 locations) · ×1
  • Duplicated block (74 lines × 3 locations) backend/lib/robots/midea/MideaJ15MaxUltraValetudoRobot.js:16 — backend/lib/robots/midea/MideaJ15MaxUltraValetudoRobot.js:16 · backend/lib/robots/midea/MideaJ15ProUltraValetudoRobot.js:11 · backend/lib/robots/midea/MideaJ15UltraValetudoRobot.js:11 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (63 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (63 matched lines × 2 locations) backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV1.js:14 — backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV1.js:14 · backend/lib/robots/midea/capabilities/MideaCombinedVirtualRestrictionsCapabilityV2.js:14 — the two spans are one implementation copied and then locally edited — 581 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 (62 lines × 2 locations) · ×1
  • Duplicated block (62 lines × 2 locations) backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:11 — backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:11 · backend/lib/robots/roborock/RoborockS6MaxVValetudoRobot.js:10 — 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 · Wholesale file copy (61 identical lines × 2 files) · ×1
  • Wholesale file copy (61 identical lines × 2 files) backend/lib/robots/roborock/RoborockS5MaxValetudoRobot.js:1 — backend/lib/robots/roborock/RoborockS5MaxValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS6MaxVValetudoRobot.js:1 — these 2 files are line-for-line copies of one another — 61 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (57 lines × 6 locations) · ×1
  • Duplicated block (57 lines × 6 locations) backend/lib/robots/dreame/Dreame1TValetudoRobot.js:18 — backend/lib/robots/dreame/Dreame1TValetudoRobot.js:18 · backend/lib/robots/dreame/DreameD10SPlusValetudoRobot.js:62 · backend/lib/robots/dreame/DreameD10SProValetudoRobot.js:62 · backend/lib/robots/dreame/DreameL10ProValetudoRobot.js:55 · +2 more site(s) not listed — the 6 copies are spread across 6 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) backend/lib/robots/dreame/DreameD9ValetudoRobot.js:56 — backend/lib/robots/dreame/DreameD9ValetudoRobot.js:56 · backend/lib/robots/dreame/DreameF9ValetudoRobot.js:17 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (57 lines × 3 locations) · ×1
  • Duplicated block (57 lines × 3 locations) backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:246 — backend/lib/robots/dreame/DreameL10SUltraValetudoRobot.js:246 · backend/lib/robots/dreame/DreameL10UltraValetudoRobot.js:192 · backend/lib/robots/dreame/DreameX10PlusValetudoRobot.js:184 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Wholesale file copy (54 identical lines × 3 files) · ×1
  • Wholesale file copy (54 identical lines × 3 files) backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:1 — backend/lib/robots/roborock/RoborockQ7MaxValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS7ProUltraValetudoRobot.js:1 · backend/lib/robots/roborock/RoborockS7ValetudoRobot.js:1 — these 3 files are line-for-line copies of one another — 54 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (52 lines × 2 locations) · ×1
  • Duplicated block (52 lines × 2 locations) backend/lib/robots/dreame/DreameD9ProValetudoRobot.js:51 — backend/lib/robots/dreame/DreameD9ProValetudoRobot.js:51 · backend/lib/robots/dreame/DreameMovaZ500ValetudoRobot.js:17 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Wholesale file copy (50 identical lines × 2 files) · ×1
  • Wholesale file copy (50 identical lines × 2 files) backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV1.js:1 — backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV1.js:1 · backend/lib/robots/midea/capabilities/MideaAutoEmptyDockAutoEmptyIntervalControlCapabilityV3.js:1 — these 2 files are line-for-line copies of one another — 50 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (49 lines × 2 locations) · ×1
  • Duplicated block (49 lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js:9 — backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js:9 · backend/lib/robots/dreame/capabilities/DreameMopDockDryManualTriggerCapability.js:9 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (47 matched lines × 2 locations) backend/lib/robots/dreame/capabilities/DreameAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js:7 — backend/lib/robots/dreame/capabilities/DreameAutoEmptyDockAutoEmptyIntervalControlCapabilityV2.js:7 · backend/lib/robots/dreame/capabilities/DreameMopDockMopWashTemperatureControlCapabilityV2.js:7 — the two spans are one implementation copied and then locally edited — 248 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 (47 lines × 2 locations) · ×1
  • Duplicated block (47 lines × 2 locations) backend/lib/robots/midea/capabilities/MideaCarpetModeControlCapabilityV1.js:11 — backend/lib/robots/midea/capabilities/MideaCarpetModeControlCapabilityV1.js:11 · backend/lib/robots/midea/capabilities/MideaKeyLockCapabilityV1.js:10 — 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.
R2 · Cyclomatic Complexity · Complex function mapErrorCode (cyclomatic 98, cognitive 9) · ×1
  • Complex function mapErrorCode (cyclomatic 98, cognitive 9) backend/lib/robots/midea/MideaValetudoRobot.js:522 — mapErrorCode has cyclomatic complexity 98 and cognitive complexity 9; 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 parseAndUpdateState (cyclomatic 89, cognitive 146) · ×1
  • Complex function parseAndUpdateState (cyclomatic 89, cognitive 146) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:452 — parseAndUpdateState has cyclomatic complexity 89 and cognitive complexity 146; 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 processRow (cyclomatic 79, cognitive 174) · ×1
  • Complex function processRow (cyclomatic 79, cognitive 174) frontend/src/util/XmPlayer.ts:682 — processRow has cyclomatic complexity 79 and cognitive complexity 174; 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 generateHandleDoc (cyclomatic 66, cognitive 103) · ×1
  • Complex function generateHandleDoc (cyclomatic 66, cognitive 103) util/generate_mqtt_docs.js:311 — generateHandleDoc has cyclomatic complexity 66 and cognitive complexity 103; 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 PARSE (cyclomatic 54, cognitive 33) · ×1
  • Complex function PARSE (cyclomatic 54, cognitive 33) backend/lib/msmart/BEightParser.js:12 — PARSE has cyclomatic complexity 54 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 mapErrorCode (cyclomatic 50, cognitive 9) · ×1
  • Complex function mapErrorCode (cyclomatic 50, cognitive 9) backend/lib/robots/midea/MideaE20ValetudoRobot.js:200 — mapErrorCode has cyclomatic complexity 50 and cognitive complexity 9; 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 onIncomingCloudMessage (cyclomatic 47, cognitive 34) · ×1
  • Complex function onIncomingCloudMessage (cyclomatic 47, cognitive 34) backend/lib/robots/roborock/RoborockValetudoRobot.js:91 — onIncomingCloudMessage has cyclomatic complexity 47 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 runEffects (cyclomatic 46, cognitive 73) · ×1
  • Complex function runEffects (cyclomatic 46, cognitive 73) frontend/src/util/XmPlayer.ts:862 — runEffects has cyclomatic complexity 46 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseAndUpdateState (cyclomatic 44, cognitive 65) · ×1
  • Complex function parseAndUpdateState (cyclomatic 44, cognitive 65) backend/lib/robots/roborock/RoborockValetudoRobot.js:242 — parseAndUpdateState has cyclomatic complexity 44 and cognitive complexity 65; 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 parseAndUpdateState (cyclomatic 43, cognitive 63) · ×1
  • Complex function parseAndUpdateState (cyclomatic 43, cognitive 63) backend/lib/robots/viomi/ViomiValetudoRobot.js:235 — parseAndUpdateState has cyclomatic complexity 43 and cognitive complexity 63; 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 PARSE (cyclomatic 42, cognitive 83) · ×1
  • Complex function PARSE (cyclomatic 42, cognitive 83) backend/lib/robots/dreame/DreameMapParser.js:24 — PARSE has cyclomatic complexity 42 and cognitive complexity 83; 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 parseAndUpdateState (cyclomatic 40, cognitive 60) · ×1
  • Complex function parseAndUpdateState (cyclomatic 40, cognitive 60) backend/lib/robots/midea/MideaValetudoRobot.js:197 — parseAndUpdateState has cyclomatic complexity 40 and cognitive complexity 60; 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 40, cognitive 26) · ×1
  • Complex function (anonymous) (cyclomatic 40, cognitive 26) frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:207 — (anonymous) has cyclomatic complexity 40 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseXM (cyclomatic 34, cognitive 134) · ×1
  • Complex function parseXM (cyclomatic 34, cognitive 134) frontend/src/util/XmPlayer.ts:100 — parseXM has cyclomatic complexity 34 and cognitive complexity 134; 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 processTick (cyclomatic 33, cognitive 59) · ×1
  • Complex function processTick (cyclomatic 33, cognitive 59) frontend/src/util/XmPlayer.ts:522 — processTick has cyclomatic complexity 33 and cognitive complexity 59; 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 handleInfoMapUpdate (cyclomatic 33, cognitive 40) · ×1
  • Complex function handleInfoMapUpdate (cyclomatic 33, cognitive 40) backend/lib/robots/midea/MideaMapParser.js:190 — handleInfoMapUpdate has cyclomatic complexity 33 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseAndUpdateState (cyclomatic 28, cognitive 31) · ×1
  • Complex function parseAndUpdateState (cyclomatic 28, cognitive 31) backend/lib/robots/dreame/Dreame1CValetudoRobot.js:460 — parseAndUpdateState has cyclomatic complexity 28 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 26, cognitive 20) · ×1
  • Complex function (anonymous) (cyclomatic 26, cognitive 20) frontend/src/controls/Dock.tsx:261 — (anonymous) has cyclomatic complexity 26 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseConsumablesMessage (cyclomatic 25, cognitive 38) · ×1
  • Complex function parseConsumablesMessage (cyclomatic 25, cognitive 38) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:235 — parseConsumablesMessage has cyclomatic complexity 25 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function POST_PROCESS_BLOCKS (cyclomatic 23, cognitive 48) · ×1
  • Complex function POST_PROCESS_BLOCKS (cyclomatic 23, cognitive 48) backend/lib/robots/roborock/RoborockMapParser.js:442 — POST_PROCESS_BLOCKS has cyclomatic complexity 23 and cognitive complexity 48; 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 doControlLoopCycle (cyclomatic 23, cognitive 26) · ×1
  • Complex function doControlLoopCycle (cyclomatic 23, cognitive 26) backend/lib/duststreaming/DuststreamerManager.js:129 — doControlLoopCycle has cyclomatic complexity 23 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 21, cognitive 43) · ×1
  • Complex function (anonymous) (cyclomatic 21, cognitive 43) backend/lib/miio/MiioSocket.js:52 — (anonymous) has cyclomatic complexity 21 and cognitive complexity 43; 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 resetConsumable (cyclomatic 21, cognitive 28) · ×1
  • Complex function resetConsumable (cyclomatic 21, cognitive 28) backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:161 — resetConsumable has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mix (cyclomatic 20, cognitive 49) · ×1
  • Complex function mix (cyclomatic 20, cognitive 49) frontend/src/util/XmPlayer.ts:443 — mix has cyclomatic complexity 20 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 marshalHomie (cyclomatic 20, cognitive 19) · ×1
  • Complex function marshalHomie (cyclomatic 20, cognitive 19) backend/lib/mqtt/handles/MqttHandle.js:338 — marshalHomie has cyclomatic complexity 20 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 16) frontend/src/map/SpectatorMapPage.tsx:63 — (anonymous) has cyclomatic complexity 20 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setMapAnnotations (cyclomatic 18, cognitive 27) · ×1
  • Complex function setMapAnnotations (cyclomatic 18, cognitive 27) backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js:40 — setMapAnnotations has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setMaterial (cyclomatic 18, cognitive 9) · ×1
  • Complex function setMaterial (cyclomatic 18, cognitive 9) backend/lib/robots/dreame/capabilities/DreameMapSegmentMaterialControlCapability.js:41 — setMaterial has cyclomatic complexity 18 and cognitive complexity 9; 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 PARSE_IMAGE (cyclomatic 17, cognitive 35) · ×1
  • Complex function PARSE_IMAGE (cyclomatic 17, cognitive 35) backend/lib/robots/dreame/DreameMapParser.js:503 — PARSE_IMAGE has cyclomatic complexity 17 and cognitive complexity 35; 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 handlePropertyChange (cyclomatic 17, cognitive 13) · ×1
  • Complex function handlePropertyChange (cyclomatic 17, cognitive 13) backend/lib/robots/roborock/RoborockGen4ValetudoRobot.js:143 — handlePropertyChange has cyclomatic complexity 17 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 17, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 17, cognitive 11) frontend/src/map/actions/live_map_actions/ZoneActions.tsx:33 — (anonymous) has cyclomatic complexity 17 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 15) · ×1
  • Complex function (anonymous) (cyclomatic 16, cognitive 15) frontend/src/options/ValetudoActivation.tsx:404 — (anonymous) has cyclomatic complexity 16 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onIncomingCloudMessage (cyclomatic 16, cognitive 12) · ×1
  • Complex function onIncomingCloudMessage (cyclomatic 16, cognitive 12) backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:247 — onIncomingCloudMessage has cyclomatic complexity 16 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 16, cognitive 10) · ×1
  • Complex function (anonymous) (cyclomatic 16, cognitive 10) frontend/src/map/actions/live_map_actions/SegmentActions.tsx:21 — (anonymous) has cyclomatic complexity 16 and cognitive complexity 10; 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 handleUserDefinedCarpetUpdate (cyclomatic 15, cognitive 28) · ×1
  • Complex function handleUserDefinedCarpetUpdate (cyclomatic 15, cognitive 28) backend/lib/robots/midea/MideaMapParser.js:688 — handleUserDefinedCarpetUpdate has cyclomatic complexity 15 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function POST_PROCESS_BLOCKS (cyclomatic 15, cognitive 26) · ×1
  • Complex function POST_PROCESS_BLOCKS (cyclomatic 15, cognitive 26) backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:453 — POST_PROCESS_BLOCKS has cyclomatic complexity 15 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 19) frontend/src/map/MapLayerManagerUtils.ts:265 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 storageSurvey (cyclomatic 15, cognitive 16) · ×1
  • Complex function storageSurvey (cyclomatic 15, cognitive 16) backend/lib/updater/lib/UpdaterUtils.js:15 — storageSurvey has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 15, cognitive 15) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 15) backend/lib/robots/dreame/DreameMapParser.js:154 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 15, cognitive 13) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 13) frontend/src/robot/RobotOptions.tsx:1084 — (anonymous) has cyclomatic complexity 15 and cognitive complexity 13; 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.
R3 · Large Files · frontend/src/api/hooks.ts · ×1
  • frontend/src/api/hooks.ts: 1657 lines of code frontend/src/api/hooks.ts:1 — frontend/src/api/hooks.ts has 1657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/api/client.ts · ×1
  • frontend/src/api/client.ts: 1259 lines of code frontend/src/api/client.ts:1 — frontend/src/api/client.ts has 1259 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 · backend/lib/robots/midea/MideaValetudoRobot.js · ×1
  • backend/lib/robots/midea/MideaValetudoRobot.js: 1199 lines of code backend/lib/robots/midea/MideaValetudoRobot.js:1 — backend/lib/robots/midea/MideaValetudoRobot.js has 1199 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/robot/RobotOptions.tsx · ×1
  • frontend/src/robot/RobotOptions.tsx: 1164 lines of code frontend/src/robot/RobotOptions.tsx:1 — frontend/src/robot/RobotOptions.tsx has 1164 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 · backend/lib/robots/dreame/DreameQuirkFactory.js · ×1
  • backend/lib/robots/dreame/DreameQuirkFactory.js: 1055 lines of code backend/lib/robots/dreame/DreameQuirkFactory.js:1 — backend/lib/robots/dreame/DreameQuirkFactory.js has 1055 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 · backend/lib/robots/dreame/DreameValetudoRobot.js · ×1
  • backend/lib/robots/dreame/DreameValetudoRobot.js: 969 lines of code backend/lib/robots/dreame/DreameValetudoRobot.js:1 — backend/lib/robots/dreame/DreameValetudoRobot.js has 969 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 · backend/lib/robots/roborock/RoborockValetudoRobot.js · ×1
  • backend/lib/robots/roborock/RoborockValetudoRobot.js: 958 lines of code backend/lib/robots/roborock/RoborockValetudoRobot.js:1 — backend/lib/robots/roborock/RoborockValetudoRobot.js has 958 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/util/XmPlayer.ts · ×1
  • frontend/src/util/XmPlayer.ts: 892 lines of code frontend/src/util/XmPlayer.ts:1 — frontend/src/util/XmPlayer.ts has 892 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 · backend/lib/robots/dreame/DreameGen2ValetudoRobot.js · ×1
  • backend/lib/robots/dreame/DreameGen2ValetudoRobot.js: 827 lines of code backend/lib/robots/dreame/DreameGen2ValetudoRobot.js:1 — backend/lib/robots/dreame/DreameGen2ValetudoRobot.js has 827 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 · backend/lib/robots/midea/MideaMapParser.js · ×1
  • backend/lib/robots/midea/MideaMapParser.js: 783 lines of code backend/lib/robots/midea/MideaMapParser.js:1 — backend/lib/robots/midea/MideaMapParser.js has 783 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 · backend/lib/mqtt/MqttController.js · ×1
  • backend/lib/mqtt/MqttController.js: 778 lines of code backend/lib/mqtt/MqttController.js:1 — backend/lib/mqtt/MqttController.js has 778 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 · backend/lib/robots/dreame/DreameMapParser.js · ×1
  • backend/lib/robots/dreame/DreameMapParser.js: 766 lines of code backend/lib/robots/dreame/DreameMapParser.js:1 — backend/lib/robots/dreame/DreameMapParser.js has 766 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/options/connectivity/MQTTConnectivityPage.tsx · ×1
  • frontend/src/options/connectivity/MQTTConnectivityPage.tsx: 748 lines of code frontend/src/options/connectivity/MQTTConnectivityPage.tsx:1 — frontend/src/options/connectivity/MQTTConnectivityPage.tsx has 748 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 · backend/lib/robots/midea/MideaQuirkFactory.js · ×1
  • backend/lib/robots/midea/MideaQuirkFactory.js: 745 lines of code backend/lib/robots/midea/MideaQuirkFactory.js:1 — backend/lib/robots/midea/MideaQuirkFactory.js has 745 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 · backend/lib/robots/dreame/DreameMiotServices.js · ×1
  • backend/lib/robots/dreame/DreameMiotServices.js: 714 lines of code backend/lib/robots/dreame/DreameMiotServices.js:1 — backend/lib/robots/dreame/DreameMiotServices.js has 714 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 · util/generate_mqtt_docs.js · ×1
  • util/generate_mqtt_docs.js: 657 lines of code util/generate_mqtt_docs.js:1 — util/generate_mqtt_docs.js has 657 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: 646 lines of code REDACTED:1 — REDACTED has 646 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · backend/lib/msmart/BEightParser.js · ×1
  • backend/lib/msmart/BEightParser.js: 637 lines of code backend/lib/msmart/BEightParser.js:1 — backend/lib/msmart/BEightParser.js has 637 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 · backend/lib/robots/viomi/ViomiValetudoRobot.js · ×1
  • backend/lib/robots/viomi/ViomiValetudoRobot.js: 633 lines of code backend/lib/robots/viomi/ViomiValetudoRobot.js:1 — backend/lib/robots/viomi/ViomiValetudoRobot.js has 633 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/options/ValetudoActivation.tsx · ×1
  • frontend/src/options/ValetudoActivation.tsx: 631 lines of code frontend/src/options/ValetudoActivation.tsx:1 — frontend/src/options/ValetudoActivation.tsx has 631 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/map/EditMap.tsx · ×1
  • frontend/src/map/EditMap.tsx: 627 lines of code frontend/src/map/EditMap.tsx:1 — frontend/src/map/EditMap.tsx has 627 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/ValetudoAppBar.tsx · ×1
  • frontend/src/components/ValetudoAppBar.tsx: 614 lines of code frontend/src/components/ValetudoAppBar.tsx:1 — frontend/src/components/ValetudoAppBar.tsx has 614 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 · backend/lib/robots/roborock/RoborockMapParser.js · ×1
  • backend/lib/robots/roborock/RoborockMapParser.js: 597 lines of code backend/lib/robots/roborock/RoborockMapParser.js:1 — backend/lib/robots/roborock/RoborockMapParser.js has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js · ×1
  • backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js: 586 lines of code backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js:1 — backend/lib/robots/3irobotix/ThreeIRobotixMapParser.js has 586 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/map/BaseMap.tsx · ×1
  • frontend/src/map/BaseMap.tsx: 564 lines of code frontend/src/map/BaseMap.tsx:1 — frontend/src/map/BaseMap.tsx has 564 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 · backend/lib/robots/dreame/Dreame1CValetudoRobot.js · ×1
  • backend/lib/robots/dreame/Dreame1CValetudoRobot.js: 562 lines of code backend/lib/robots/dreame/Dreame1CValetudoRobot.js:1 — backend/lib/robots/dreame/Dreame1CValetudoRobot.js has 562 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 · backend/lib/robots/midea/MideaE20ValetudoRobot.js · ×1
  • backend/lib/robots/midea/MideaE20ValetudoRobot.js: 559 lines of code backend/lib/robots/midea/MideaE20ValetudoRobot.js:1 — backend/lib/robots/midea/MideaE20ValetudoRobot.js has 559 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: 473 lines of code REDACTED:1 — REDACTED has 473 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/valetudo/SystemInformation.tsx · ×1
  • frontend/src/valetudo/SystemInformation.tsx: 459 lines of code frontend/src/valetudo/SystemInformation.tsx:1 — frontend/src/valetudo/SystemInformation.tsx has 459 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/map/actions/edit_map_actions/SegmentActions.tsx · ×1
  • frontend/src/map/actions/edit_map_actions/SegmentActions.tsx: 448 lines of code frontend/src/map/actions/edit_map_actions/SegmentActions.tsx:1 — frontend/src/map/actions/edit_map_actions/SegmentActions.tsx has 448 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 · backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js · ×1
  • backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js: 436 lines of code backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:1 — backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js has 436 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R5 · Dependency Freshness · Dependency Freshness · ×1
  • Dependency Freshness — 51 outdated package(s); JS/npm CVEs scored in D30
R7 · Dead Code · Dead file (~95 LoC) · ×1
  • Dead file (~95 LoC) util/convert_obj.js — no import path from any entry point (15 application, 2 tooling, 18 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 (~17 LoC) · ×1
  • Dead file (~17 LoC) util/siencode.js — no import path from any entry point (15 application, 2 tooling, 18 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 (~6 LoC) · ×1
  • Dead file (~6 LoC) backend/lib/mqtt/handles/index.js — no import path from any entry point (15 application, 2 tooling, 18 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 (~0 LoC) · ×1
  • Dead file (~0 LoC) backend/lib/res/roodkcab.js — no import path from any entry point (15 application, 2 tooling, 18 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 · Unlisted import '@tanstack/query-core' · ×1
  • Unlisted import '@tanstack/query-core' frontend/src/api/hooks.ts:201 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
S1 · Web-Security Posture · The encryption IV is the same for every message · ×1
  • The encryption IV is the same for every message REDACTED:425 — This encryption's initialisation vector is a compile-time constant, so every message encrypted under the same key gets the same IV. An IV is not a secret and does not have to be one — its whole job is to be DIFFERENT each time, so that encrypting the same plaintext twice does not produce the same ciphertext. Fix it and CBC becomes an equality oracle: the mode XORs the IV into the first plaintext block and chains from there, so two messages encrypted with the same key and IV produce byte-identical ciphertext for exactly as long as their plaintexts agree. An observer who can see two ciphertexts — a repository of encrypted config files, a database column, a backup — learns that two records match and how many blocks in they diverge, without the key and without breaking anything. The same defect under a counter-based mode is worse and not recoverable by comparison: CTR and GCM XOR the plaintext against a keystream determined by the key and nonce, so a repeated nonce leaks the XOR of the two plaintexts outright, and under GCM it also forfeits the authentication key. Generate the IV with a cryptographic RNG for each message — `RandomNumberGenerator.Fill(iv)` in .NET, `crypto.randomBytes(16)` in Node — and write it alongside the ciphertext (prepending the block is the usual spelling); the receiver reads it back from there. Deriving the IV from the key material is the specific trap to avoid: it looks like rigour and produces a constant, because the derivation's inputs do not change between messages.
X1 · Async correctness · `async` callback passed to `forEach` · ×1
  • `async` callback passed to `forEach` util/upx_compress_valetudo.js:51 — `forEach` ignores what its callback returns, so the Promise each `async` call returns is dropped: nothing can await it, the code after this loop runs before any of the awaited work has finished (a function that `await`s around this loop still returns early), and a rejection is never handled — in Node.js an unhandled rejection terminates the process by default, and in a browser it is lost. Iterate with `for (const item of items) { await … }` when the work must run in order, or `await Promise.all(items.map(async (item) => { … }))` when it may run concurrently, so the enclosing function finishes only when the work does and its failures reach the caller. Where firing and forgetting is genuinely intended, make the callback's whole body a `try { … } catch (e) { … }` that handles the failure, so it cannot escape.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×1
  • Untrusted text written into markup unescaped REDACTED:180 — `req.ip` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) frontend/src/hooks/useLocalStorage.ts:19 — `catch (error)` 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.
Minor — 85 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×21
  • Duplicated predicate frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:194 — `!this.isResizing && isInsideBox(lastCoordinates, scaleButtonHitbox)` appears character-identically in 2 files — frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts, frontend/src/map/structures/client_structures/ZoneClientStructure.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate frontend/src/map/EditMapPage.tsx:84 — `(!mapData && mapIsPending) || (!robotStatus && robotStatusPending)` appears character-identically in 2 files — frontend/src/map/EditMapPage.tsx, frontend/src/map/RobotCoverageMapPage.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/midea/capabilities/MideaBasicControlCapabilityV1.js:37 — `StatusStateAttribute && StatusStateAttribute.value === stateAttrs.StatusStateAttribute.VALUE.PAUSED` appears character-identically in 2 files — backend/lib/robots/midea/capabilities/MideaBasicControlCapabilityV1.js, backend/lib/robots/midea/capabilities/MideaBasicControlCapabilityV2.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 backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js:36 — `StatusStateAttribute?.value === entities.state.attributes.StatusStateAttribute.VALUE.DOCKED && DockStatusStateAttribute?.value === entities.…` appears character-identically in 2 files — backend/lib/robots/dreame/capabilities/DreameMopDockCleanManualTriggerCapability.js, backend/lib/robots/dreame/capabilities/DreameMopDockDryManualTriggerCapability.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 frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts:206 — `currentInMapSpace.x > this.x0 + pixelSize && this.x1 + dx > this.x0 + pixelSize` appears character-identically in 2 files — frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts, frontend/src/map/structures/client_structures/ZoneClientStructure.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/dreame/DreameD9ValetudoRobot.js:133 — `deviceConf && deviceConf.model === "dreame.vacuum.p2009"` appears character-identically in 2 files — backend/lib/robots/dreame/DreameD9ValetudoRobot.js, backend/lib/robots/dreame/DreameValetudoRobot.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 backend/lib/robots/dreame/DreameD9ProPlusValetudoRobot.js:27 — `deviceConf && deviceConf.model === "dreame.vacuum.p2187"` appears character-identically in 2 files — backend/lib/robots/dreame/DreameD9ProPlusValetudoRobot.js, backend/lib/robots/dreame/DreameD9ProValetudoRobot.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 frontend/src/options/MapManagementOptionsRouter.tsx:35 — `duststreamingSupported && duststreamingConfiguration?.enabled !== false` appears character-identically in 2 files — frontend/src/options/MapManagementOptionsRouter.tsx, frontend/src/robot/RobotRouter.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js:277 — `e.siid === DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.SIID && e.piid === DreameGen2ValetudoRobot.MIOT_SERVICES.VACUUM_2.PROPERTIES.WATER…` appears character-identically in 11 files — backend/lib/robots/dreame/DreameL10SProUltraHeatValetudoRobot.js, backend/lib/robots/dreame/DreameL20UltraValetudoRobot.js, backend/lib/robots/dreame/DreameL40UltraValetudoRobot.js, backend/lib/robots/dreame/DreameMopValetudoRobot.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 frontend/src/map/BaseMap.tsx:250 — `e.type === RawMapEntityType.Path || e.type === RawMapEntityType.PredictedPath` appears character-identically in 2 files — frontend/src/map/BaseMap.tsx, frontend/src/map/RobotCoverageMap.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js:33 — `eventType === AttributeSubscriber.EVENT_TYPE.CHANGE && status.value !== StatusStateAttribute.VALUE.MANUAL_CONTROL && prevStatus && prevStatu…` appears character-identically in 3 files — backend/lib/robots/dreame/capabilities/DreameHighResolutionManualControlCapability.js, backend/lib/robots/dreame/capabilities/DreameManualControlCapability.js, backend/lib/robots/midea/capabilities/MideaManualControlCapability.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 frontend/src/options/MapManagement.tsx:230 — `mapSegmentEditCapabilitySupported || mapSegmentRenameCapabilitySupported` appears character-identically in 2 files — frontend/src/options/MapManagement.tsx, frontend/src/options/MapManagementOptionsRouter.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/dreame/capabilities/DreameCurrentStatisticsCapability.js:64 — `msg.siid === this.miot_properties.area.siid && msg.piid === this.miot_properties.area.piid` appears character-identically in 2 files — backend/lib/robots/dreame/capabilities/DreameCurrentStatisticsCapability.js, backend/lib/robots/dreame/capabilities/DreameTotalStatisticsCapability.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 backend/lib/robots/dreame/capabilities/DreameCurrentStatisticsCapability.js:59 — `msg.siid === this.miot_properties.time.siid && msg.piid === this.miot_properties.time.piid` appears character-identically in 2 files — backend/lib/robots/dreame/capabilities/DreameCurrentStatisticsCapability.js, backend/lib/robots/dreame/capabilities/DreameTotalStatisticsCapability.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 backend/lib/robots/roborock/RoborockG10SValetudoRobot.js:95 — `parsedFile !== null && parsedFile.groups && parsedFile.groups.version` appears character-identically in 5 files — backend/lib/robots/roborock/RoborockG10SValetudoRobot.js, backend/lib/robots/roborock/RoborockS8ProUltraValetudoRobot.js, backend/lib/robots/roborock/RoborockS8ValetudoRobot.js, backend/lib/robots/roborock/RoborockValetudoRobot.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 backend/lib/robots/dreame/capabilities/DreameCombinedVirtualRestrictionsCapability.js:114 — `res && res.siid === this.miot_actions.map_edit.siid && res.aiid === this.miot_actions.map_edit.aiid && Array.isArray(res.out) && res.out.len…` appears character-identically in 7 files — backend/lib/robots/dreame/capabilities/DreameCombinedVirtualRestrictionsCapability.js, backend/lib/robots/dreame/capabilities/DreameMapAnnotationsCapability.js, backend/lib/robots/dreame/capabilities/DreameMapResetCapability.js, backend/lib/robots/dreame/capabilities/DreameMapSegmentEditCapability.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 frontend/src/map/actions/live_map_actions/GoToActions.tsx:43 — `status === "idle" || status === "docked" || status === "paused" || status === "returning" || status === "error"` appears character-identically in 3 files — frontend/src/map/actions/live_map_actions/GoToActions.tsx, frontend/src/map/actions/live_map_actions/SegmentActions.tsx, frontend/src/map/actions/live_map_actions/ZoneActions.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/viomi/capabilities/ViomiBasicControlCapability.js:187 — `statusAttribute && statusAttribute.value === stateAttrs.StatusStateAttribute.VALUE.DOCKED` appears character-identically in 2 files — backend/lib/robots/viomi/capabilities/ViomiBasicControlCapability.js, backend/lib/updater/lib/steps/ValetudoUpdaterCheckStep.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 backend/lib/core/ValetudoRobot.js:200 — `statusStateAttribute && statusStateAttribute.isActiveState` appears character-identically in 2 files — backend/lib/core/ValetudoRobot.js, backend/lib/robots/mock/capabilities/MockConsumableMonitoringCapability.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 frontend/src/map/structures/client_structures/LineClientStructure.ts:138 — `this.active && isInsideBox(tappedPoint, deleteButtonHitbox)` appears character-identically in 2 files — frontend/src/map/structures/client_structures/LineClientStructure.ts, frontend/src/map/structures/client_structures/RestrictedZoneClientStructure.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate backend/lib/robots/common/miioCapabilities/MiioWifiConfigurationCapability.js:45 — `wifiConfig?.ssid !== undefined && wifiConfig.credentials?.type === ValetudoWifiConfiguration.CREDENTIALS_TYPE.WPA2_PSK && wifiConfig.credent…` appears character-identically in 2 files — backend/lib/robots/common/miioCapabilities/MiioWifiConfigurationCapability.js, backend/lib/robots/midea/capabilities/MideaWifiConfigurationCapability.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.
D34 · Knowledge Freshness · Orphaned file · ×13
  • Orphaned file backend/lib/mqtt/handles/MqttHandle.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/viomi/capabilities/ViomiBasicControlCapability.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/mqtt/homeassistant/components/HassComponent.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frontend/src/robot/capabilities/DoNotDisturb.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frontend/src/robot/capabilities/VoicePackManagement.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/mqtt/handles/PropertyMqttHandle.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frontend/src/components/ValetudoEvents.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/dreame/capabilities/Dreame1CVoicePackManagementCapability.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/mock/capabilities/MockManualControlCapability.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/viomi/capabilities/ViomiVoicePackManagementCapability.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file frontend/src/robot/capabilities/Speaker.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/viomi/capabilities/ViomiCarpetModeControlCapability.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file backend/lib/robots/viomi/ViomiCommonAttributes.js:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D12 · Dependency Hygiene · Deprecated · ×7
  • Deprecated: @babel/plugin-proposal-class-properties REDACTED:1127 — @babel/plugin-proposal-class-properties 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-nullish-coalescing-operator REDACTED:1163 — @babel/plugin-proposal-nullish-coalescing-operator 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-numeric-separator REDACTED:1180 — @babel/plugin-proposal-numeric-separator 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-optional-chaining REDACTED:1197 — @babel/plugin-proposal-optional-chaining 7.21.0 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @babel/plugin-proposal-private-methods REDACTED:1215 — @babel/plugin-proposal-private-methods 7.18.6 is resolved in REDACTED and is marked deprecated by its publisher: "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/object-schema REDACTED:4341 — @humanwhocodes/object-schema 2.0.3 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/object-schema instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/config-array REDACTED:10109 — @humanwhocodes/config-array 0.11.14 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/config-array instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
IC1 · Incompleteness & stubs · Blanket warning suppression · ×4
  • Blanket warning suppression backend/lib/res/default_map.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression util/generate_mqtt_docs.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression util/generate_robot_docs.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression util/upx_compress_valetudo.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
D12 · Dependency Hygiene · Outdated (npm) · ×3
  • Outdated (npm): @mui/icons-material REDACTED:38 — @mui/icons-material is pinned at 6.5.0; registry.npmjs.org publishes 9.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @mui/material REDACTED:39 — @mui/material is pinned at 6.5.0; registry.npmjs.org publishes 9.5.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): uuid REDACTED:60 — uuid is pinned at 10.0.0; registry.npmjs.org publishes 14.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch backend/lib/robots/dreame/capabilities/Dreame1CConsumableMonitoringCapability.js:65 — `getConsumables` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch backend/lib/robots/dreame/capabilities/DreameConsumableMonitoringCapability.js:137 — `getConsumables` 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 docs/assets/js/si.js:47 — `parseMetricId` (in `document.addEventListener("DOMContentLoaded")`) 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.
D30 · Dependency Vulnerabilities · Low CVE · ×2
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×2
  • No app-layer HTTPS enforcement detected REDACTED:164 — `fdsMockServer.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 backend/lib/webserver/WebServer.js:175 — `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.)
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies backend/lib/webserver/capabilityRouters/DuststreamingCapabilityRouter.js:8 — 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 · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 123 significant file(s) lose their only recent owner: backend/lib/robots/midea/MideaValetudoRobot.js, frontend/src/api/hooks.ts, backend/lib/robots/dreame/DreameQuirkFactory.js, frontend/src/components/CustomIcons.tsx, backend/lib/robots/dreame/DreameValetudoRobot.js, frontend/src/api/client.ts, frontend/src/robot/RobotOptions.tsx, backend/lib/robots/dreame/DreameGen2ValetudoRobot.js (+115 more). Pair on, review, or document these before any departure.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no build, run or usage example README.md:1 — the repository is a published package (`REDACTED` without `"private": true`) and neither `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:5 — 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 5).
D21 · Naming Consistency · `ValetudoDNDConfiguration` spells `DND` where 15 names in the project spell it `Dnd` · ×1
  • `ValetudoDNDConfiguration` spells `DND` where 15 names in the project spell it `Dnd` backend/lib/entities/core/ValetudoDNDConfiguration.js:5 — 15 of 16 names in project valetudo spell the token `Dnd` (15 of 16; unit: names in project valetudo containing `Dnd`). Peers: DoNotDisturbCapability.getDndConfiguration (backend/lib/core/capabilities/DoNotDisturbCapability.js:14); DoNotDisturbCapability.setDndConfiguration (backend/lib/core/capabilities/DoNotDisturbCapability.js:23); backend.lib.msmart.dtos.MSmartDNDConfigurationDTO.MSmartDndConfigurationDTO (backend/lib/msmart/dtos/MSmartDNDConfigurationDTO.js:3); DreameDoNotDisturbCapability.getDndConfiguration (backend/lib/robots/dreame/capabilities/DreameDoNotDisturbCapability.js:36); DreameDoNotDisturbCapability.setDndConfiguration (backend/lib/robots/dreame/capabilities/DreameDoNotDisturbCapability.js:81). Rename to `ValetudoDndConfiguration`. [rule N6]
D21 · Naming Consistency · `refreshIntervalID` spells `ID` where 32 names in the project spell it `Id` · ×1
  • `refreshIntervalID` spells `ID` where 32 names in the project spell it `Id` backend/lib/mqtt/MqttController.js:43 — 32 of 33 names in project valetudo spell the token `Id` (32 of 33; unit: names in project valetudo containing `Id`). Peers: ValetudoEventStore.getById (backend/lib/ValetudoEventStore.js:30); ObstacleImagesCapability.getStreamForId (backend/lib/core/capabilities/ObstacleImagesCapability.js:58); Codec.encodeOutgoingMiioPacket(deviceId) (backend/lib/miio/Codec.js:120); DecodedMiioPacket.deviceId (backend/lib/miio/DecodedMiioPacket.js:11); MiioSocket.deviceId (backend/lib/miio/MiioSocket.js:27). Rename to `refreshIntervalId`. [rule N6]
D21 · Naming Consistency · `setupMQTT` spells `MQTT` where 33 names in the project spell it `Mqtt` · ×1
  • `setupMQTT` spells `MQTT` where 33 names in the project spell it `Mqtt` REDACTED:63 — 33 of 34 names in project valetudo spell the token `Mqtt` (33 of 34; unit: names in project valetudo containing `Mqtt`). Peers: MqttController.getMqttOptions (backend/lib/mqtt/MqttController.js:279); backend.lib.mqtt.capabilities.AutoEmptyDockManualTriggerCapabilityMqttHandle.AutoEmptyDockManualTriggerCapabilityMqttHandle (backend/lib/mqtt/capabilities/AutoEmptyDockManualTriggerCapabilityMqttHandle.js:9); backend.lib.mqtt.capabilities.BasicControlCapabilityMqttHandle.BasicControlCapabilityMqttHandle (backend/lib/mqtt/capabilities/BasicControlCapabilityMqttHandle.js:8); backend.lib.mqtt.capabilities.CapabilityMqttHandle.CapabilityMqttHandle (backend/lib/mqtt/capabilities/CapabilityMqttHandle.js:3); backend.lib.mqtt.capabilities.CarpetModeControlCapabilityMqttHandle.CarpetModeControlCapabilityMqttHandle (backend/lib/mqtt/capabilities/CarpetModeControlCapabilityMqttHandle.js:4). Rename to `setupMqtt`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 2 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `backend` (53833 LoC, 616 module-visible types across 53 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 13 of 351 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 351 of the 885 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: backend/lib/mqtt/handles/MqttHandle.js, backend/lib/robots/viomi/capabilities/ViomiBasicControlCapability.js, backend/lib/mqtt/homeassistant/components/HassComponent.js, frontend/src/robot/capabilities/DoNotDisturb.tsx, frontend/src/robot/capabilities/VoicePackManagement.tsx, backend/lib/mqtt/handles/PropertyMqttHandle.js, frontend/src/components/ValetudoEvents.tsx, backend/lib/robots/dreame/capabilities/Dreame1CVoicePackManagementCapability.js (and 5 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D37 · Vulnerability-disclosure Policy · REDACTED · ×1
  • REDACTED
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×1
  • Placeholder literal left in code frontend/src/valetudo/res/AboutText.ts:1 — A placeholder string ("Valetudo is made, managed, maintained an…") is still in shipped code — typical of generated boilerplate that was never filled in.
IC1 · Incompleteness & stubs · Empty method body · ×1
  • Empty method body util/generate_mqtt_docs.js:727 — `getHassMigrationTopics` 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.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P2 · Observability · Console output used as the logging channel · ×1
  • Console output used as the logging channel backend/lib/utils/Tools.js:144 — `backend/lib/utils/Tools.js` reports through `console.*` at line 144 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:30 — `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
R7 · Dead Code · Unused export 'RawRobotState' · ×1
  • Unused export 'RawRobotState' frontend/src/api/RawRobotState.ts:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in frontend/src/api/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in frontend/src/api/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'useCurrentStatisticsPropertiesQuery' · ×1
  • Unused export 'useCurrentStatisticsPropertiesQuery' frontend/src/api/hooks.ts:1431 — Nothing ultimately consumes this binding: its only referrer is the re-export in frontend/src/api/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in frontend/src/api/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'useTotalStatisticsPropertiesQuery' · ×1
  • Unused export 'useTotalStatisticsPropertiesQuery' frontend/src/api/hooks.ts:1450 — Nothing ultimately consumes this binding: its only referrer is the re-export in frontend/src/api/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in frontend/src/api/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'FanSpeedIcon' · ×1
  • Unused export 'FanSpeedIcon' frontend/src/components/CustomIcons.tsx:5 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'useValetudoColors' · ×1
  • Unused export 'useValetudoColors' frontend/src/hooks/useValetudoColors.ts:4 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused module-local declaration 'parquetPixelPatternHandler' · ×1
  • Unused module-local declaration 'parquetPixelPatternHandler' frontend/src/map/MapLayerManagerUtils.ts:129 — This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
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/51 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 · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 1/2 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~1.2 `!` null assertions per 1k TypeScript source lines — 38 assertion(s) across the 32012 source line(s) of the 213 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: frontend/src/util/XmPlayer.ts (19), frontend/src/map/BaseMap.tsx (8), frontend/src/components/ObstacleImage.tsx (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 20 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×19
  • Outdated (npm): @fontsource/ibm-plex-sans — @fontsource/ibm-plex-sans is pinned at 5.2.8; registry.npmjs.org publishes 5.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @fontsource/jetbrains-mono — @fontsource/jetbrains-mono is pinned at 5.2.8; registry.npmjs.org publishes 5.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tanstack/react-query — @tanstack/react-query is pinned at 5.90.19; registry.npmjs.org publishes 5.107.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @tanstack/react-query-devtools — @tanstack/react-query-devtools is pinned at 5.91.2; registry.npmjs.org publishes 5.107.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): aedes — aedes is pinned at 0.51.3; registry.npmjs.org publishes 1.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): ajv — ajv is pinned at 8.17.1; registry.npmjs.org publishes 8.20.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): axios — axios is pinned at 1.13.2; registry.npmjs.org publishes 1.21.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): bonjour-service — bonjour-service is pinned at 1.3.0; registry.npmjs.org publishes 1.4.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): compression — compression is pinned at 1.8.1; registry.npmjs.org publishes 1.8.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): express — express is pinned at 5.2.1; registry.npmjs.org publishes 5.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): express-rate-limit — express-rate-limit is pinned at 8.2.1; registry.npmjs.org publishes 8.7.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): jstoxml — jstoxml is pinned at 7.0.1; registry.npmjs.org publishes 7.1.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): mqtt — mqtt is pinned at 5.14.1; registry.npmjs.org publishes 5.16.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): node-forge — node-forge is pinned at 1.3.3; registry.npmjs.org publishes 1.4.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react — react is pinned at 19.2.3; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-dom — react-dom is pinned at 19.2.3; registry.npmjs.org publishes 19.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-router-dom — react-router-dom is pinned at 7.12.0; registry.npmjs.org publishes 7.18.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): reconnecting-eventsource — reconnecting-eventsource is pinned at 1.6.4; registry.npmjs.org publishes 1.6.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): zustand — zustand is pinned at 5.0.10; registry.npmjs.org publishes 5.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names backend/lib/entities/core/ntpClient/ValetudoNTPClientDisabledState.js:5 — 0 of 192 documented parameters and 1 of 233 summaries in `valetudo-backend` only repeat the member or parameter name (e.g. "The NTP Client is disabled" for `ValetudoNTPClientDisabledState`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-4bd86543179949d99c0d58d6759af09e/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.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-4bd86543179949d99c0d58d6759af09e/tree.json --exit-code 0 --source .2artifacts/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 --exclude frontend/config --exclude frontend/scripts .146artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .51artifacts/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 1 file(s) — `docs/eleventy.config.js` — 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 01a1dddb-9592-7069-992d-aa0c7eaf554d · 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