Public report of tddworks/baguette, 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, 01:55 UTC · Survey ID cd_823a3f7f125b40aab36d56d9c4dca942

tddworks/baguette

Measured 15 November 2026, 01:53 UTC, at code version 593a1b4

CAI score 28out of 100 Weak
CriticalWeakAdequateStrongExemplary
No change 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: 40,907 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Event-Driven, 10

Findings by how serious they are

40 critical 596 serious 41 minor

24 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, 01:53 UTC

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

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

58of 58 dimensions measured by tools.
659of 677 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
58dimensions across 8 lenses, read from 40,907 lines of product code in 4 projects.
Chapters

Executive summary

tddworks/baguette falls short of our standard for a preview release, held back most by its Event-Driven lens, the way the code's parts exchange events. It scores 28 out of 100 and is rated Weak, and 20 of its 40 critical findings are security problems.

Event-Driven, at 10, is the weakest lens and counts most in the score. The best first step is stopping the event handlers from waiting on other services, worth about 15 points. Raising Event-Driven to 65 would lift the score to about 43.

Eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Six weaknesses in the code could be used by an attacker, and ten form fields can't be read by a screen reader. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and labelling the form fields would close these risks. Limiting each secret to its own step would fix the three secrets exposed to more of the pipeline than needed, and updating the vulnerable packages would deal with the package with a known security hole. Not hiding elements that the keyboard can reach would take care of the five hidden elements that the keyboard can still reach.

The product code is 40,907 lines, about €65,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.
Event-Driven 10 · counts for 45%Production Readiness 36 · counts for 25%Code Health 40 · counts for 14%Accessibility 51 · counts for 8%Security and Compliance 54 · counts for 4%Maturity 66 · counts for 2%Performance 70 · counts for 1%Architecture 82 · counts for 1%

If Event-Driven rose from 10 to 65, the lowest score rated Strong, the score would rise from 28 to about 43.

Code composition: what the lines of code are
Product code 54%Tests 46%
New since the last survey: 157 findings

These 157 critical or serious findings weren't in the previous survey, on 29 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · Fill.attempt (cyclomatic 27) Sources/Baguette/Domain/Input/Fill.swift
  • Cyclomatic Complexity · AXTarget.find (cyclomatic 16) Sources/Baguette/Domain/Accessibility/AXTarget.swift
  • Cognitive Complexity · Fill.attempt (cognitive 39) Sources/Baguette/Domain/Input/Fill.swift
  • Cognitive Complexity · AXFirstScreen.run (cognitive 19) Sources/Baguette/Domain/Accessibility/AXFirstScreen.swift
  • Cognitive Complexity · InputCommand.run (cognitive 18) Sources/Baguette/App/Commands/InputCommand.swift
  • Cognitive Complexity · AXTarget.find (cognitive 17) Sources/Baguette/Domain/Accessibility/AXTarget.swift
  • Cognitive Complexity · AXNode.agentSummary (cognitive 16) Sources/Baguette/Domain/Accessibility/AXAffordance.swift
  • Code Duplication · Edited copy of a member (25 corresponding lines) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift
  • Code Duplication · Edited copy of a member (30 corresponding lines) Sources/Baguette/Domain/Accessibility/AXFirstScreen.swift
  • Code Duplication · Edited copy of a member (39 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift
  • Code Duplication · Edited copy of a member (29 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift
  • Code Duplication · Edited copy of a member (21 corresponding lines) Sources/Baguette/App/CopyDispatch.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift
  • Code Duplication · Edited copy of a member (23 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (26 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift
  • Code Duplication · Edited copy of a member (17 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) Sources/Baguette/App/Commands/AddFileCommands.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/App/Commands/DefaultsCommand.swift
  • Code Duplication · Edited copy of a member (13 corresponding lines) Sources/Baguette/Domain/Render/ScreenQuad.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift
  • Code Duplication · Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copies of one member (6 members, 14+ corresponding lines) Sources/Baguette/App/Commands/ClipboardCommand.swift
  • Code Duplication · Edited copies of one member (5 members, 20+ corresponding lines) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Companion/DeviceTwin/Wire/Sources/TwinTransport.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/App/Commands/HealCommand.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/Baguette/Domain/Apps/InstalledApp.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/Baguette/App/LabelTap.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/Baguette/Domain/Chrome/DeviceProfile.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/Domain/Render/DeviceModels.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/App/Commands/GestureCommands.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/App/Commands/Render3DCommand.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Stream/AVCCStream.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift
  • Code Duplication · Edited copy of a member (9 corresponding lines) Sources/Baguette/Infrastructure/Hinge/GuestHingeMotor.swift
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) Sources/Baguette/Domain/Accessibility/AXElementReader.swift
  • Code Duplication · Edited copy of a member (12 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Baguette/App/Commands/MotionCommand.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/Baguette/Domain/Accessibility/AXHitTestGrid.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/Baguette/Domain/Interface/InterfaceUpdate.swift
  • Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) Sources/Baguette/Domain/Render/ScreenQuad.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/Baguette/App/Commands/NetworkCommand.swift
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/Domain/Defaults/PreferenceValue.swift
  • Code Duplication · Edited copy of a member (8 corresponding lines) Sources/Baguette/Domain/Input/Touch1.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift
  • Code Duplication · Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (6 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Plugin/Plugins.swift
  • Code Duplication · Edited copy of a member (15 corresponding lines) Sources/Baguette/Domain/Render/DeviceModelDefinition.swift
  • Code Duplication · Edited copy of a member (11 corresponding lines) Sources/Baguette/App/BakeryInstall.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Input/Gesture.swift
  • Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) Sources/Baguette/Domain/Apps/AppBundle.swift
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift
  • Code Duplication · Edited copy of a member (5 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) Sources/Baguette/Infrastructure/Location/SimctlLocation.swift
  • Code Duplication · Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Simulator/InjectedDylibInstallPlan.swift
  • Code Duplication · Edited copy of a member (10 corresponding lines) Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Screen/IntegratedPanel.swift
  • Code Duplication · Edited copy of a member (4 corresponding lines) Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) Sources/Baguette/Domain/Interface/ContentSize.swift
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) Sources/Baguette/Domain/Location/LocationRoute.swift
  • Code Duplication · Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Render/Device3DStreamOptions.swift
  • Code Duplication · Edited copies of one member (4 members, 1+ corresponding lines) Sources/Baguette/App/PluginDispatch.swift
  • Code Duplication · Duplicated block (14–20 lines × 2) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift
  • Code Duplication · Duplicated block (14 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Duplicated block (11 lines × 2) Sources/Baguette/App/Commands/DefaultsCommand.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/Baguette/App/Commands/GestureCommands.swift
  • Code Duplication · Duplicated block (6–7 lines × 2) Sources/Baguette/Domain/Render/DeviceAVCCEnvelope.swift
  • Code Duplication · Duplicated block (11 lines × 5) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift
  • Test Quality · No assertions: Tests/BaguetteTests/App/FillDispatchTests.swift
  • Test Quality · No assertions: Tests/BaguetteTests/Accessibility/TextFieldTests.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Domain/Input/Fill.swift Sources/Baguette/Domain/Input/Fill.swift
  • Churn × Complexity Hotspots · Repeated repair: Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift
  • Code Duplication · Duplicated block (15 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js
  • Cyclomatic Complexity · Complex function recordingFit (cyclomatic 14, cognitive 10) Sources/Baguette/Resources/Web/sim-3d.js
  • Cyclomatic Complexity · Complex function locate (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/baguette/gestures/screen-quad.js
  • Cyclomatic Complexity · Complex function toggleNetwork (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-native.js
  • Cyclomatic Complexity · Complex function toggleDefaults (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-native.js
  • Cyclomatic Complexity · Complex function _simToggleRecord (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-stream.js
  • Cyclomatic Complexity · Complex function startSession (cyclomatic 13, cognitive 15) Sources/Baguette/Resources/Web/sim-native.js
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 14) Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js
  • Cyclomatic Complexity · Complex function routeStreamText (cyclomatic 13, cognitive 14) Sources/Baguette/Resources/Web/sim-native.js
  • Cyclomatic Complexity · Complex function intent (cyclomatic 13, cognitive 13) Sources/Baguette/Resources/Web/plugin-row-action.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: 157 findings

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

  • Cyclomatic Complexity · focus-toolbar-overflow.html.document.addEventListener("click") (cyclomatic 24) docs/mockups/focus-toolbar-overflow.html
  • Cyclomatic Complexity · network-speed-control.html.renderPreview (cyclomatic 22) docs/mockups/network-speed-control.html
  • Cyclomatic Complexity · changelog-rollover.main (cyclomatic 20) scripts/changelog-rollover.py
  • Cognitive Complexity · focus-toolbar-overflow.html.document.addEventListener("click") (cognitive 38) docs/mockups/focus-toolbar-overflow.html
  • Cognitive Complexity · changelog-rollover.main (cognitive 25) scripts/changelog-rollover.py
  • Cognitive Complexity · check-docs.check_links (cognitive 21) scripts/check-docs.py
  • Cognitive Complexity · capture-size-menu.html.document.addEventListener("click") (cognitive 17) docs/mockups/capture-size-menu.html
  • Code Duplication · Duplicated block (14 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Duplicated block (12 lines × 2) Sources/Baguette/Domain/Accessibility/AXNode.swift
  • Code Duplication · Duplicated block (11 lines × 2) Sources/Baguette/App/Commands/DefaultsCommand.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift
  • Code Duplication · Duplicated block (8 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/Baguette/Domain/Chrome/DeviceProfile.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift
  • Code Duplication · Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift
  • Code Duplication · Duplicated block (6 lines × 2) Sources/Baguette/Domain/Chrome/DeviceChrome.swift
  • Code Duplication · Duplicated block (11 lines × 5) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift
  • Code Duplication · Duplicated block (9 lines × 2) Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Resources/Web/stream-session.js Sources/Baguette/Resources/Web/stream-session.js
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Domain/Plugin/PluginManifest.swift Sources/Baguette/Domain/Plugin/PluginManifest.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Domain/Plugin/PluginRoute.swift Sources/Baguette/Domain/Plugin/PluginRoute.swift
  • Churn × Complexity Hotspots · Hotspot: Sources/Baguette/Domain/Plugin/PluginResult.swift Sources/Baguette/Domain/Plugin/PluginResult.swift
  • Churn × Complexity Hotspots · Repeated repair: Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift
  • Code Duplication · Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/sim-defaults.js
  • Code Duplication · Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/sim-location.js
  • Code Duplication · Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js
  • Code Duplication · Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js
  • Code Duplication · Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/sim-list/device-filter.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/transport.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/gestures/attachable-event-source.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/gestures/pointer-interpreter.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/handheld/handheld-button.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/gestures/gesture-envelope.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/farm/farm-filter.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/baguette.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/gestures/pinch-overlay.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/baguette/gestures/edge-bands.js
  • Test Coverage · No test reaches this file Sources/Baguette/Resources/Web/target.js
  • Dead Code · Dead file (~360 LoC) Sources/Baguette/Resources/Web/farm/farm-tile.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/recorder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/recorder.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-camera.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-camera.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-camera.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-location.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-location.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-logs.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-logs.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-logs.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
  • Exception handling · Swallowed exception (empty catch) Sources/Baguette/Resources/Web/sim-native.js
Rebuild cost: about €65,000 · Estimate
Cost to rebuild€21,000 to €110,000, for 357 to 1,133 hours of work, about 0.4 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 28. 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: 40,907 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
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.
Raises the score by about 15 points · Medium effort · Handler temporal coupling
2
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 3 points · Low effort · Secret Scanning
3
Resolve the 58 No assertions finding(s) in Test Quality — start with PreferenceSuiteTests.swift (2), HingeCommandTests.swift (2), HingeControlTests.swift (2).
Raises the score by about 3 points · Medium effort · Test Quality

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 €65,000 to build again, about 0.4 person-years of work. Its weakest lens is Event-Driven, at 10 (Critical). Event-Driven is about whether the parts of the system can rely on the messages they send each other. Because the weakest lens counts most in the score, work on Event-Driven also moves the score most.
Based on: the rebuild estimate · the Event-Driven grade · how much each lens counts
What to do: Start with the Event-Driven actions in Top priorities.
If you do one thing first · First action
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource. Of all the actions in this report, it raises the score most for the work it takes: about 15 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 131,906 lines over the last 90 days, which is about 534,952 lines a year. At that pace, the extra work comes to an estimated 26.7 to 178.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch Baguette Baguette DeviceTwinBroadcast DeviceTwinBroadcast TwinWire TwinWire DeviceTwinBroadcast->TwinWire DeviceTwinCompanion DeviceTwinCompanion DeviceTwinCompanion->DeviceTwinBroadcast DeviceTwinCompanion->TwinWire

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.

69 modules, with 5 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; 29 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 Baguette2 Sources.Baguette.Resources.Plugins.a11y.bin3 Sources.Baguette.Resources.Web4 Sources.Baguette.Resources.Web.baguette5 Sources.Baguette.Resources.Web.baguette.carplay6 Sources.Baguette.Resources.Web.baguette.carplay.carplay-frame7 Sources.Baguette.Resources.Web.baguette.carplay.frame-definition8 Sources.Baguette.Resources.Web.baguette.carplay.frame-registry9 Sources.Baguette.Resources.Web.baguette.gestures10 Sources.Baguette.Resources.Web.baguette.gestures.attachable-event-source11 Sources.Baguette.Resources.Web.baguette.gestures.edge-bands12 Sources.Baguette.Resources.Web.baguette.gestures.gesture-envelope13 Sources.Baguette.Resources.Web.baguette.gestures.mouse-gesture-source14 Sources.Baguette.Resources.Web.baguette.gestures.option-hover-preview15 Sources.Baguette.Resources.Web.baguette.gestures.pinch-overlay16 Sources.Baguette.Resources.Web.baguette.gestures.pointer-interpreter17 Sources.Baguette.Resources.Web.baguette.gestures.safari-gesture-event-source18 Sources.Baguette.Resources.Web.baguette.gestures.screen-pieces19 Sources.Baguette.Resources.Web.baguette.gestures.screen-quad20 Sources.Baguette.Resources.Web.baguette.gestures.touch-gesture-source21 Sources.Baguette.Resources.Web.baguette.gestures.wheel-gesture-source22 Sources.Baguette.Resources.Web.baguette.parts23 Sources.Baguette.Resources.Web.baguette.parts.bezel24 Sources.Baguette.Resources.Web.baguette.parts.button25 Sources.Baguette.Resources.Web.baguette.parts.keyboard26 Sources.Baguette.Resources.Web.baguette.parts.screen27 Sources.Baguette.Resources.Web.baguette.simulator28 Sources.Baguette.Resources.Web.baguette.transport29 Sources.Baguette.Resources.Web.capture30 Sources.Baguette.Resources.Web.capture-gallery31 Sources.Baguette.Resources.Web.capture.capture-composer32 Sources.Baguette.Resources.Web.capture.capture-settings33 Sources.Baguette.Resources.Web.capture.capture-size34 Sources.Baguette.Resources.Web.capture.capture-size-menu35 Sources.Baguette.Resources.Web.defaults36 Sources.Baguette.Resources.Web.farm37 Companion~DeviceTwin~App38 Companion~DeviceTwin~Wire39 repository40 Companion~DeviceTwin~Broadcast
1 Baguette
2 Sources.Baguette.Resources.Plugins.a11y.bin
3 Sources.Baguette.Resources.Web
4 Sources.Baguette.Resources.Web.baguette
5 Sources.Baguette.Resources.Web.baguette.carplay
6 Sources.Baguette.Resources.Web.baguette.carplay.carplay-frame
7 Sources.Baguette.Resources.Web.baguette.carplay.frame-definition
8 Sources.Baguette.Resources.Web.baguette.carplay.frame-registry
9 Sources.Baguette.Resources.Web.baguette.gestures
10 Sources.Baguette.Resources.Web.baguette.gestures.attachable-event-source
11 Sources.Baguette.Resources.Web.baguette.gestures.edge-bands
12 Sources.Baguette.Resources.Web.baguette.gestures.gesture-envelope
13 Sources.Baguette.Resources.Web.baguette.gestures.mouse-gesture-source
14 Sources.Baguette.Resources.Web.baguette.gestures.option-hover-preview
15 Sources.Baguette.Resources.Web.baguette.gestures.pinch-overlay
16 Sources.Baguette.Resources.Web.baguette.gestures.pointer-interpreter
17 Sources.Baguette.Resources.Web.baguette.gestures.safari-gesture-event-source
18 Sources.Baguette.Resources.Web.baguette.gestures.screen-pieces
19 Sources.Baguette.Resources.Web.baguette.gestures.screen-quad
20 Sources.Baguette.Resources.Web.baguette.gestures.touch-gesture-source
21 Sources.Baguette.Resources.Web.baguette.gestures.wheel-gesture-source
22 Sources.Baguette.Resources.Web.baguette.parts
23 Sources.Baguette.Resources.Web.baguette.parts.bezel
24 Sources.Baguette.Resources.Web.baguette.parts.button
25 Sources.Baguette.Resources.Web.baguette.parts.keyboard
26 Sources.Baguette.Resources.Web.baguette.parts.screen
27 Sources.Baguette.Resources.Web.baguette.simulator
28 Sources.Baguette.Resources.Web.baguette.transport
29 Sources.Baguette.Resources.Web.capture
30 Sources.Baguette.Resources.Web.capture-gallery
31 Sources.Baguette.Resources.Web.capture.capture-composer
32 Sources.Baguette.Resources.Web.capture.capture-settings
33 Sources.Baguette.Resources.Web.capture.capture-size
34 Sources.Baguette.Resources.Web.capture.capture-size-menu
35 Sources.Baguette.Resources.Web.defaults
36 Sources.Baguette.Resources.Web.farm
37 Companion~DeviceTwin~App1
38 Companion~DeviceTwin~Wire2
39 repository2
40 Companion~DeviceTwin~Broadcast23
Uses a module listed above itPart of a loopThe module itself
1 Baguette2 Sources.Baguette.Resources.Plugins.a11y.bin3 Sources.Baguette.Resources.Web4 Sources.Baguette.Resources.Web.baguette5 Sources.Baguette.Resources.Web.baguette.carplay6 Sources.Baguette.Resources.Web.baguette.carplay.carplay-frame7 Sources.Baguette.Resources.Web.baguette.carplay.frame-definition8 Sources.Baguette.Resources.Web.baguette.carplay.frame-registry9 Sources.Baguette.Resources.Web.baguette.gestures10 Sources.Baguette.Resources.Web.baguette.gestures.attachable-event-source11 Sources.Baguette.Resources.Web.baguette.gestures.edge-bands12 Sources.Baguette.Resources.Web.baguette.gestures.gesture-envelope13 Sources.Baguette.Resources.Web.baguette.gestures.mouse-gesture-source14 Sources.Baguette.Resources.Web.baguette.gestures.option-hover-preview15 Sources.Baguette.Resources.Web.baguette.gestures.pinch-overlay16 Sources.Baguette.Resources.Web.baguette.gestures.pointer-interpreter17 Sources.Baguette.Resources.Web.baguette.gestures.safari-gesture-event-source18 Sources.Baguette.Resources.Web.baguette.gestures.screen-pieces19 Sources.Baguette.Resources.Web.baguette.gestures.screen-quad20 Sources.Baguette.Resources.Web.baguette.gestures.touch-gesture-source21 Sources.Baguette.Resources.Web.baguette.gestures.wheel-gesture-source22 Sources.Baguette.Resources.Web.baguette.parts23 Sources.Baguette.Resources.Web.baguette.parts.bezel24 Sources.Baguette.Resources.Web.baguette.parts.button25 Sources.Baguette.Resources.Web.baguette.parts.keyboard26 Sources.Baguette.Resources.Web.baguette.parts.screen27 Sources.Baguette.Resources.Web.baguette.simulator28 Sources.Baguette.Resources.Web.baguette.transport29 Sources.Baguette.Resources.Web.capture30 Sources.Baguette.Resources.Web.capture-gallery31 Sources.Baguette.Resources.Web.capture.capture-composer32 Sources.Baguette.Resources.Web.capture.capture-settings33 Sources.Baguette.Resources.Web.capture.capture-size34 Sources.Baguette.Resources.Web.capture.capture-size-menu35 Sources.Baguette.Resources.Web.defaults36 Sources.Baguette.Resources.Web.farm37 Companion~DeviceTwin~App38 Companion~DeviceTwin~Wire39 repository40 Companion~DeviceTwin~BroadcastBaguette1Sources.Baguette.Resources.Plugins.a11y.bin2Sources.Baguette.Resources.Web3Sources.Baguette.Resources.Web.baguette4Sources.Baguette.Resources.Web.baguette.carplay5Sources.Baguette.Resources.Web.baguette.carplay.carplay-frame6Sources.Baguette.Resources.Web.baguette.carplay.frame-definition7Sources.Baguette.Resources.Web.baguette.carplay.frame-registry8Sources.Baguette.Resources.Web.baguette.gestures9Sources.Baguette.Resources.Web.baguette.gestures.attachable-event-source10Sources.Baguette.Resources.Web.baguette.gestures.edge-bands11Sources.Baguette.Resources.Web.baguette.gestures.gesture-envelope12Sources.Baguette.Resources.Web.baguette.gestures.mouse-gesture-source13Sources.Baguette.Resources.Web.baguette.gestures.option-hover-preview14Sources.Baguette.Resources.Web.baguette.gestures.pinch-overlay15Sources.Baguette.Resources.Web.baguette.gestures.pointer-interpreter16Sources.Baguette.Resources.Web.baguette.gestures.safari-gesture-event-source17Sources.Baguette.Resources.Web.baguette.gestures.screen-pieces18Sources.Baguette.Resources.Web.baguette.gestures.screen-quad19Sources.Baguette.Resources.Web.baguette.gestures.touch-gesture-source20Sources.Baguette.Resources.Web.baguette.gestures.wheel-gesture-source21Sources.Baguette.Resources.Web.baguette.parts22Sources.Baguette.Resources.Web.baguette.parts.bezel23Sources.Baguette.Resources.Web.baguette.parts.button24Sources.Baguette.Resources.Web.baguette.parts.keyboard25Sources.Baguette.Resources.Web.baguette.parts.screen26Sources.Baguette.Resources.Web.baguette.simulator27Sources.Baguette.Resources.Web.baguette.transport28Sources.Baguette.Resources.Web.capture29Sources.Baguette.Resources.Web.capture-gallery30Sources.Baguette.Resources.Web.capture.capture-composer31Sources.Baguette.Resources.Web.capture.capture-settings32Sources.Baguette.Resources.Web.capture.capture-size33Sources.Baguette.Resources.Web.capture.capture-size-menu34Sources.Baguette.Resources.Web.defaults35Sources.Baguette.Resources.Web.farm36Companion~DeviceTwin~App37Companion~DeviceTwin~Wire38repository39Companion~DeviceTwin~Broadcast4012223+29 more modules (most-connected shown)

At a glance — Code Health · 40% · Weak · gated by R1, R3 ·

At a glance — Architecture · 82% · Strong ·

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

At a glance — Readiness · 36% · Weak · gated by R4, P3, P7 ·

At a glance — Security · 54% · Checked 4 of 9 · gated by D29, D36 ·

At a glance — Event-Driven · 10% · Critical · gated by ED1 ·

At a glance — Accessibility · 51% · Adequate · gated by AC6 ·

At a glance — Performance · 70% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection19High / Critical
A03:2025 — Software Supply Chain Failures12High / Critical
A07:2025 — Authentication Failures1High / Critical

Roadmap

Top priorities: Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource; Resolve the 58 No assertions finding(s) in Test Quality — start with PreferenceSuiteTests.swift (2), HingeCommandTests.swift (2), HingeControlTests.swift (2); Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.

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

Do thisHelpsEffortDimension
Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.+15.4 ptsMediumHandler temporal coupling
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+3.0 ptsLowSecret Scanning
Resolve the 58 No assertions finding(s) in Test Quality — start with PreferenceSuiteTests.swift (2), HingeCommandTests.swift (2), HingeControlTests.swift (2).+3.0 ptsMediumTest Quality
Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+2.3 ptsMediumSecurity & performance tooling
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+1.9 ptsMediumType Safety
Add tests that import the unreached modules (directly or through their public entry).+1.6 ptsMediumTest Coverage
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.+1.4 ptsMediumLarge Files
Bound every outbound call: pass `timeout:` to AsyncHTTPClient's `execute`, set `app.http.client.configuration.timeout` (with a `read` bound) or each `ClientRequest.timeout` for Vapor's client, and a `timeoutIntervalForRequest` on any `URLSessionConfiguration`; add retries with back-off around dependencies that fail.+1.3 ptsMediumOutbound HTTP resilience

File quality

Per-file score 0–10 — a quality signature. Of 174 files carrying findings, judged against the Preview bar: 1% slop · 3% mixed · 96% near-clean.

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.1MixedDependency Vulnerabilities: High CVE: REDACTED
Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift4.8MixedGod Classes: ClassTooLong: RealityKitDeviceScene
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
Sources/Baguette/Infrastructure/Server/Server.swift6.0MixedExplicit Debt: TodoComment
Sources/Baguette/Resources/Web/sim-native.js7.0Near-cleanCyclomatic Complexity: sim-native.wireUnload (cyclomatic 36)
Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift7.0Near-cleanCyclomatic Complexity: Server.registerDeviceTwinRoutes (cyclomatic 32)
Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift7.0Near-cleanCode Duplication: Duplicated block (6 lines × 2)
Sources/Baguette/Resources/Web/sim-plugins.js7.0Near-cleanCyclomatic Complexity: rowsHTML (cyclomatic 20)
Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift7.1Near-cleanCyclomatic Complexity: DiagDigitizerTrackpadCommand.probe (cyclomatic 18)
Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift7.1Near-cleanCognitive Complexity: IndigoHIDInput.sendMouse (cognitive 17)
Sources/Baguette/Resources/Web/sim-3d.js7.1Near-cleanCyclomatic Complexity: sim-3d.Sim3DPanel.start (cyclomatic 30)
Sources/Baguette/Domain/Input/FoldableInput.swift7.1Near-cleanCode Duplication: Edited copy of a member (6 corresponding lines)
Sources/Baguette/Resources/Web/frame-decoder.js7.2Near-cleanCyclomatic Complexity: AvccDecoder.feed (cyclomatic 23)
Sources/Baguette/Resources/Web/sim-defaults.js7.2Near-cleanCyclomatic Complexity: DefaultsPanel._onClick (cyclomatic 22)
docs/features/chrome-bezel/scripts/chrome-lab.swift7.2Near-cleanCyclomatic Complexity: chrome-lab.swift.capture (cyclomatic 18)
Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift7.2Near-cleanCognitive Complexity: RenderedFoldable.render (cognitive 23)
Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift7.2Near-cleanCode Duplication: Edited copy of a member (25 corresponding lines)

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

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

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

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

Could not be resolved — 24

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 58 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 58 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D20D24D27D28D29D30D34D35D36D37D43AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4AX8AX9ED1M1M2M3M4P1P2P3P4P6P7PF3R1R10R2R3R4R7R9X26X28X3

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, 659 of 677 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 01a1dce9-1df4-74d8-9446-e73c5076e706.

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

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Swift half could not be measured — the Swift suite in . produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a Codecov configuration (codecov.yml, target 80%) and a coverage step in CI (`swift test --enable-code-coverage`) shows coverage is measured in your own CI.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 334 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 35 test source file(s) (.js) that it cannot: it reads the test types the .swift frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.swift, .js) and this repository declares a SwiftPM test suite (Baguette), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 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 publishes a package — a Claude Code plugin, declared by .claude-plugin/plugin.json — so it DOES have an intentionally-exposed surface: the commands, skills, agents and hooks the plugin contributes to its host, which consumers reach by name. D22 collects code-API surfaces (type and member signatures) only, and has no collector for a plugin's contribution surface, so the consistency of that surface was not judged. That is OUR side and it is a COLLECTOR gap, not an environment fault — no change to the scan image can close it.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D26 Project Cohesion — 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. `(repository root)` (58505 LoC, 785 module-visible types across 80 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • 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. `Sources/Baguette/App/AppLaunch.swift`, `Sources/Baguette/App/Commands/GestureCommands.swift`, `Sources/Baguette/App/Commands/HingeCLICommand.swift`, `Sources/Baguette/App/Commands/LaunchCommand.swift`, `Sources/Baguette/App/Commands/NotifyCommand.swift`, … (+35 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • 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 — 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. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
  • AX6 Interface segregation — 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 is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: 22 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
  • 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. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • 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. 11 further occurrence(s) are not listed individually; the score already reflects all 51.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
  • X26 Unsynchronised callback handoff — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X27 Collection changed while being enumerated — 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 Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's C, Objective-C is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 70 further occurrence(s) are not listed individually; the score already reflects all 110.
  • 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.
  • X5 Nullable reference types — 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 MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Objectivec, Swift is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.8 / 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.8 / 10 · rule-coverage 100% · ceiling Prevented

76 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Server.registerRoutes at 121. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being sim-native.wireActions at 24 — they are counted neither in the figure above nor in this dimension's score.

Server.registerRoutes (cyclomatic 121)Sources/Baguette/Infrastructure/Server/Server.swift:142
DeviceModelDefinition.validate (cyclomatic 39)Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:297
Server.live3DStreamWS (cyclomatic 37)Sources/Baguette/Infrastructure/Server/Server.swift:2804
farm-tile.FarmTile._mountIn (cyclomatic 36)Sources/Baguette/Resources/Web/farm/farm-tile.js:131
sim-native.wireUnload (cyclomatic 36)Sources/Baguette/Resources/Web/sim-native.js:2729

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

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with Server.registerRoutes (cyclomatic 121). — Refactoring it lifts Cyclomatic Complexity from 5.8 to about 6.5/10.

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

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

106 method(s) exceeded the cognitive complexity threshold of 15; the worst was Server.registerRoutes at 92.

Server.registerRoutes (cognitive 92)Sources/Baguette/Infrastructure/Server/Server.swift:142
Server.live3DStreamWS (cognitive 81)Sources/Baguette/Infrastructure/Server/Server.swift:2804
Server.twinLive3DStreamWS (cognitive 55)Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:441
DeviceModelDefinition.validate (cognitive 54)Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:297
sim-native.toggle3D (cognitive 50)Sources/Baguette/Resources/Web/sim-native.js:2639

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

What to do

  1. Bring the 2 bodies over 60 down to 60 or less in Cognitive Complexity — start with Server.registerRoutes (cognitive 92), Server.live3DStreamWS (cognitive 81). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 5.9 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 Classes8.4 / 10Strong✓ Tool-verified

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

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

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

24 god class(es) detected.

MethodTooLong: Server.registerRoutes · ×7Sources/Baguette/Infrastructure/Server/Server.swift:142
FileTooLong: Server/Server.swift · ×7Sources/Baguette/Infrastructure/Server/Server.swift
TooManyMethods: Server · ×5Sources/Baguette/Infrastructure/Server/Server.swift:45
ClassTooLong: Server · ×3Sources/Baguette/Infrastructure/Server/Server.swift:45
FunctionTooLong: sim-file-drop.attach · ×2Sources/Baguette/Resources/Web/sim-file-drop.js:203

What to do

  1. Resolve the 7 MethodTooLong finding(s) in God Classes — start with Server.swift (2), ServerDeviceTwinRoutes.swift (2), DiagDigitizerTrackpadCommand.swift. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 7 FileTooLong finding(s) in God Classes — start with Server.swift, sim-native.js, sim-3d.js. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 5 TooManyMethods finding(s) in God Classes — start with Server.swift, sim-location.js, sim-plugins.js. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

56 duplicated block group(s) detected. 6.6 % of the production lines (2,697 of 40,907) are in a reported copy. A further 72 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×10Sources/Baguette/App/Commands/AddFileCommands.swift:22
Edited copy of a member (11 corresponding lines) · ×7Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:194
Edited copy of a member (14 corresponding lines) · ×6Sources/Baguette/App/Commands/DefaultsCommand.swift:175
Duplicated block (9 lines × 2) · ×6Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:231
Duplicated block (6 lines × 2) · ×6Sources/Baguette/App/CopyDispatch.swift:50

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

What to do

  1. Resolve the 10 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with IndigoHIDInput.swift (2), Server.swift (2), AddFileCommands.swift. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 7 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with AXPTranslatorAccessibility.swift, GestureCommands.swift, Render3DCommand.swift. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Edited copy of a member (14 corresponding lines) finding(s) in Code Duplication — start with DefaultsCommand.swift, HealCommand.swift, CaptureCanvas.swift. — One of this dimension's main actionable groups (6 warning-level).

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

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

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

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

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

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

4 production modules (SwiftPM+Tuist), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.

Off the main sequence: TwinWire

What to do

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

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

1 of 76 classes have LCOM4 above 3.

Low cohesion: GuestHinge (LCOM4 4)Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:18

What to do

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

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

D10 · Test Quality7.4 / 10Strong✓ 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 7.4 / 10 · rule-coverage 100% · ceiling Prevented

0 skipped, 58 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 334 tests. Measured on the .swift suite only — at least 35 test source file(s) (.js) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: · ×58Tests/BaguetteTests/Accessibility/TokenDispatcherTests.swift:29

What to do

  1. Resolve the 58 No assertions finding(s) in Test Quality — start with PreferenceSuiteTests.swift (2), HingeCommandTests.swift (2), HingeControlTests.swift (2). — One of this dimension's main actionable groups (58 warning-level).

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

D12 · Dependency Hygiene9.8 / 10Exemplary✓ 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 9.8 / 10 · rule-coverage 100% · ceiling Verified

4 outdated direct SwiftPM dependencies, 0 pinning defect(s). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Outdated: hummingbird · ×4

✓ On the Gold path — maintain.

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

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

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

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

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

1 secret(s) detected.

REDACTED

What to do

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

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

D14 · License 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 31 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 31 of them read from the licence file the repository carries at the revision REDACTED pins, and 0 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed REDACTED pins, direct and transitive, and every declared dependency none pins.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

Top hotspots: Sources/Baguette/Infrastructure/Server/Server.swift (59×121=7139); Sources/Baguette/Resources/Web/sim-native.js (40×36=1440); Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift (16×32=512) Repeated repair below the complexity floor: Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift (5 of 8 changes were fixes); Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift (4 of 6 changes were fixes); Sources/Baguette/Domain/Motion/MotionSession.swift (4 of 5 changes were fixes)

Repeated repair: Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift · ×9Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift:17
Hotspot: Sources/Baguette/Infrastructure/Server/Server.swift · ×8Sources/Baguette/Infrastructure/Server/Server.swift:142

What to do

  1. Resolve the 9 Repeated repair finding(s) in Churn × Complexity Hotspots — start with SimulatorKitDisplays.swift, SimctlSimulatorInjection.swift, MotionSession.swift. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 8 Hotspot finding(s) in Churn × Complexity Hotspots — start with Server.swift, sim-native.js, ServerDeviceTwinRoutes.swift. — One of this dimension's main actionable groups (8 warning-level).

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

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

76 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift. Counted over 212 of the 383 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)

What to do

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

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

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

2 deducted task-comment markers across 40907 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 · ×2Sources/Baguette/Infrastructure/Server/Server.swift:28

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with Server.swift (2). — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d17_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 foundPackage.swift:28

What to do

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

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

D24 · Comment Value10.0 9.9 / 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.9 / 10 · rule-coverage 99% · ceiling Documented

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

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md.

D27 · Navigability9.5 / 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 9.5 / 10 · rule-coverage 100% · ceiling Documented

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)1.7 / 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 1.7 / 10 · rule-coverage 100% · ceiling Documented

19 finding(s): 0 critical, 18 high, 0 medium, 1 low. 8 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 3 file(s) — `Injected/HingeControl/Sources/HingeProtocol.h`, `Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift` (lines 183–184, line 193, line 210, …), `Tests/BaguetteTests/Defaults/PreferenceSuiteTests.swift` (lines 8–13, line 15, line 17, …) — 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. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 8 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 (8 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

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

1 of 212 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is Sources/Baguette/Infrastructure/Simulator/SimulatorMenuExternalDisplayPanel.swift. Counted over 212 of the 383 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned files with no living knowledge
Orphaned fileSources/Baguette/Infrastructure/Simulator/SimulatorMenuExternalDisplayPanel.swift:1

✓ On the Gold path — maintain.

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

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

Strongest change-coupling: DeviceScene.swift↔sim-3d.js 58%; RealityKitDeviceScene.swift↔sim-3d.js 57%; RealityKitDeviceScene.swift↔sim-native.js 50%

Change coupling: DeviceScene.swift ↔ sim-3d.js · ×4Sources/Baguette/Domain/Render/DeviceScene.swift:1

What to do

  1. Resolve the 4 Change coupling finding(s) in Change Coupling — start with DeviceScene.swift (2), RealityKitDeviceScene.swift (2). — One of this dimension's main actionable groups (4 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 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — 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 Policy10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

AC2 · Forms & labels6.0 / 10Adequate✓ Tool-verified

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

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

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

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×6) — Sources/Baguette/Resources/Web/capture/capture-size-menu.js:277, Sources/Baguette/Resources/Web/farm/farm-views.js:123, Sources/Baguette/Resources/Web/sim-list.js:344, …
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×4) — Sources/Baguette/Resources/Web/sim-3d.js:577, Sources/Baguette/Resources/Web/sim-3d.js:586, Sources/Baguette/Resources/Web/sim-3d.js:591, …
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×4) — Sources/Baguette/Resources/Web/sim-3d.js:1159, Sources/Baguette/Resources/Web/sim-list.js:345, Sources/Baguette/Resources/Web/sim-list.js:350, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.3 / 10Adequate✓ Tool-verified

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

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

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

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×3) — Sources/Baguette/Resources/Web/baguette-demo.html:2, Sources/Baguette/Resources/Web/sim-native.html:2, Sources/Baguette/Resources/Web/sim-stream.html:2
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. — Sources/Baguette/Resources/Web/farm/farm-focus.js:73

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

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

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

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

  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — Sources/Baguette/Resources/Web/capture/capture-size-menu.js:174

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness6.6 / 10Strong✓ Tool-verified

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.

  • aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden. (×5) — Sources/Baguette/Resources/Web/sim-native.html:3529, Sources/Baguette/Resources/Web/sim-native.html:3587, Sources/Baguette/Resources/Web/sim-native.html:3609, …

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety3.6 / 10Weak✓ Tool-verified

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

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

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

  • `#simNativeView .watch-btn` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:462
  • `#simNativeView #nativeDeviceFrame > div` moves (`transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:520
  • `#simNativeView .power-card[data-phase="booting"] .power-glyph` moves (`animation: nv-power-spin 1.4s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:597
  • `#simNativeView .power-card .power-btn` moves (`transition: filter 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:626
  • `#simNativeView .tb-acc > summary .tb-caret` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:813
  • `#simNativeView .sidebar-view-toggle` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:956
  • `#simNativeView .theme-toggle` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1021
  • `#simNativeView .logs-sheet` moves (`transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1074
  • `#simNativeView .camera-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1131
  • `#simNativeView .status-bar-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1188
  • `#simNativeView .network-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1231
  • `#simNativeView .notify-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1272
  • `#simNativeView .defaults-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1339
  • `#simNativeView .defaults-host .df-chevron` moves (`transition: transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1466
  • `#simNativeView .location-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1629
  • `#simNativeView .location-host .loc-stick-thumb` moves (`transition: transform 0.12s cubic-bezier(0.2, 0.9, 0.3, 1.4)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1773
  • `#simNativeView .location-host .loc-compass-needle` moves (`transition: transform 0.1s linear, border-bottom-color 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1796
  • `#simNativeView .render3d-host` moves (`transition: opacity .16s ease, transform .16s ease, visibility .16s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:1832
  • `#simNativeView .r3d-spinner` moves (`animation: nv-power-spin .8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:2024
  • `#simNativeView .device-column` moves (`transition: transform .2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:2100
  • `#simNativeView .plugin-tick[data-control="switch"]::after` moves (`transition: transform 0.12s ease, background 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:2595
  • `#simNativeView .handheld-ui .hh-fab` moves (`transition: opacity 0.4s ease, left 0.22s cubic-bezier(0.32, 0.72, 0, 1), top 0.22s cubic-bezier(0.32, 0.72, 0, 1), transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:3013
  • `#simNativeView .handheld-ui .hh-menu` moves (`transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-native.html:3048
  • `#simNativeView .carplay-frame` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — Sources/Baguette/Resources/Web/sim-native.html:278
  • `#simNativeView .watch-frame` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — Sources/Baguette/Resources/Web/sim-native.html:322
  • `#simNativeView .r3d-live-canvas` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — Sources/Baguette/Resources/Web/sim-native.html:1877
  • `#simNativeView .status-bar-host .sb-range` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — Sources/Baguette/Resources/Web/sim-native.html:2192
  • `#simNativeView .r3d-pose-picker button.active` sets color: #2563eb on background-color: #dbeafe — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/sim-native.html:1913
  • `#simStreamSidebar .adv > summary::before` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-stream.html:85
  • `#simStreamSidebar details.events > summary::after` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/sim-stream.html:103
  • `.filter .count` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:218
  • `.search kbd` sets color: #6a7686 on background-color: #0a0c10 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:310
  • `.view-toggle button` sets color: #6a7686 on background-color: #161c25 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:325
  • `.qa` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:565
  • `.list-header` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:706
  • `.tag-row .t` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — Sources/Baguette/Resources/Web/farm/farm.css:762
  • `.search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — Sources/Baguette/Resources/Web/farm/farm.css:305
  • `.sys-clock .led` moves (`animation: pulse 1.6s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/farm/farm.css:146
  • `.tile` moves (`animation: tile-in 0.5s ease both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/farm/farm.css:352
  • `.tile-status[data-state="live"] .led` moves (`animation: pulse 1.4s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — Sources/Baguette/Resources/Web/farm/farm.css:413

What to do

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

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

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

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

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

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

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

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

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

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

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

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

ED1 · Handler temporal coupling1.0 / 10Critical✓ Tool-verified

Other · Event-Driven — Whether event/message handlers avoid synchronous blocking waits — a blocking wait inside a handler stalls throughput and risks deadlock.

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

  • `DeviceAVCCEncoder.receive` is an event/message handler that blocks on a synchronous wait (a semaphore/queue `.wait`/`.sync`) — it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (`async`/`await`) instead of blocking the handler. — Sources/Baguette/Infrastructure/Render/DeviceAVCCEncoder.swift:55

What to do

  • Replace the synchronous wait with `async`/`await` so the handler never blocks on a peer/resource.
M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

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

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

M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

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

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

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

P2 · Observability7.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.

  • `Sources/Baguette/Resources/Web/sim-network.js` reports through `console.*` at line 273 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — Sources/Baguette/Resources/Web/sim-network.js:273
  • `Sources/Baguette/Resources/Web/sim-network.js` reports through `console.*` at line 296 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — Sources/Baguette/Resources/Web/sim-network.js:296
  • `Sources/Baguette/Resources/Web/farm/farm-focus.js` reports through `console.*` at line 206 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — Sources/Baguette/Resources/Web/farm/farm-focus.js:206
  • `Sources/Baguette/Resources/Web/farm/farm-focus.js` reports through `console.*` at line 390 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — Sources/Baguette/Resources/Web/farm/farm-focus.js:390

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.
  • Add a health-check endpoint (a /health route on your Vapor/Hummingbird router) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:6

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download 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.

  • `URLSession.shared` 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. — Companion/DeviceTwin/Wire/Sources/TwinTransport.swift:19

What to do

  • Bound every outbound call: pass `timeout:` to AsyncHTTPClient's `execute`, set `app.http.client.configuration.timeout` (with a `read` bound) or each `ClientRequest.timeout` for Vapor's client, and a `timeoutIntervalForRequest` on any `URLSessionConfiguration`; add retries with back-off around dependencies that fail.
PF3 · Async & latency hygiene7.0 / 10Strong✓ 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.

  • `attempt` is async and calls .wait(), Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs. — Sources/Baguette/Domain/Input/Fill.swift:45

What to do

  • Swift: await instead of blocking — `try await Task.sleep(for:)` for Thread.sleep/sleep, a checked continuation instead of a DispatchSemaphore or DispatchGroup wait, the async Process and URLSession APIs; never park a thread waiting on a Task — the cooperative pool cannot guarantee it progress.
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

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

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

  • 0 typed · 101 plain JS — the untyped files are Sources/Baguette/Resources/Web/baguette/baguette.js, Sources/Baguette/Resources/Web/baguette/carplay/carplay-frame.js, Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js, Sources/Baguette/Resources/Web/baguette/carplay/frame-registry.js, Sources/Baguette/Resources/Web/baguette/gestures/attachable-event-source.js, Sources/Baguette/Resources/Web/baguette/gestures/edge-bands.js (+95 more).

What to do

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

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

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

  • Sources/Baguette/Resources/Web/capture/capture-composer.js:113 · Sources/Baguette/Resources/Web/recorder.js:124 — the two spans are one implementation copied and then locally edited — 557 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. — Sources/Baguette/Resources/Web/capture/capture-composer.js:113
  • Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:6 · Sources/Baguette/Resources/Web/baguette/gestures/wheel-gesture-source.js:4 — the two spans are one implementation copied and then locally edited — 175 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. — Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:6
  • Sources/Baguette/Resources/Web/sim-native.js:2479 · Sources/Baguette/Resources/Web/sim-native.js:2519 · Sources/Baguette/Resources/Web/sim-native.js:2544 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-native.js:2479
  • Sources/Baguette/Resources/Web/sim-native.js:903 · Sources/Baguette/Resources/Web/sim-stream.js:194 — the two spans are one implementation copied and then locally edited — 118 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. — Sources/Baguette/Resources/Web/sim-native.js:903
  • Sources/Baguette/Resources/Web/sim-plugins.js:68 · Sources/Baguette/Resources/Web/sim-screens.js:44 — the two spans are one implementation copied and then locally edited — 109 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. — Sources/Baguette/Resources/Web/sim-plugins.js:68
  • Sources/Baguette/Resources/Web/sim-native.js:2403 · Sources/Baguette/Resources/Web/sim-native.js:2428 · Sources/Baguette/Resources/Web/sim-native.js:2458 · Sources/Baguette/Resources/Web/sim-native.js:2608 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-native.js:2403
  • Sources/Baguette/Resources/Web/sim-native.js:1213 · Sources/Baguette/Resources/Web/sim-native.js:1278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-native.js:1213
  • Sources/Baguette/Resources/Web/farm/farm-focus.js:459 · Sources/Baguette/Resources/Web/sim-stream.js:662 — 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. — Sources/Baguette/Resources/Web/farm/farm-focus.js:459
  • Sources/Baguette/Resources/Web/sim-native.js:1684 · Sources/Baguette/Resources/Web/sim-stream.js:132 — 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. — Sources/Baguette/Resources/Web/sim-native.js:1684
  • Sources/Baguette/Resources/Web/plugin-control.js:30 · Sources/Baguette/Resources/Web/plugin-prompt.js:19 — the two spans are one implementation copied and then locally edited — 71 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. — Sources/Baguette/Resources/Web/plugin-control.js:30
  • Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-network.js:40 — the two spans are one implementation copied and then locally edited — 73 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. — Sources/Baguette/Resources/Web/sim-camera.js:67
  • Sources/Baguette/Resources/Web/sim-network.js:237 · Sources/Baguette/Resources/Web/sim-network.js:278 — the two spans are one implementation copied and then locally edited — 93 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — Sources/Baguette/Resources/Web/sim-network.js:237
  • Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:19 · Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:5 — the two spans are one implementation copied and then locally edited — 75 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. — Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:19
  • Sources/Baguette/Resources/Web/farm/farm-app.js:164 · Sources/Baguette/Resources/Web/farm/farm-app.js:305 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/farm/farm-app.js:164
  • Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-notify.js:39 — the two spans are one implementation copied and then locally edited — 63 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. — Sources/Baguette/Resources/Web/sim-camera.js:67
  • Sources/Baguette/Resources/Web/sim-defaults.js:64 · Sources/Baguette/Resources/Web/sim-network.js:40 — the two spans are one implementation copied and then locally edited — 64 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. — Sources/Baguette/Resources/Web/sim-defaults.js:64
  • Sources/Baguette/Resources/Web/sim-native.js:2567 · Sources/Baguette/Resources/Web/sim-native.js:2626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — Sources/Baguette/Resources/Web/sim-native.js:2567
  • Sources/Baguette/Resources/Web/sim-network.js:305 · Sources/Baguette/Resources/Web/sim-notify.js:111 · Sources/Baguette/Resources/Web/sim-status-bar.js:281 — 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. — Sources/Baguette/Resources/Web/sim-network.js:305
  • Sources/Baguette/Resources/Web/capture/capture-size.js:89 · Sources/Baguette/Resources/Web/capture/capture-size.js:108 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/capture/capture-size.js:89
  • Sources/Baguette/Resources/Web/sim-3d.js:840 · Sources/Baguette/Resources/Web/sim-3d.js:850 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-3d.js:840
  • Sources/Baguette/Resources/Web/sim-defaults.js:64 · Sources/Baguette/Resources/Web/sim-notify.js:39 — the two spans are one implementation copied and then locally edited — 60 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. — Sources/Baguette/Resources/Web/sim-defaults.js:64
  • Sources/Baguette/Resources/Web/sim-logs.js:324 · Sources/Baguette/Resources/Web/sim-logs.js:346 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-logs.js:324
  • Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-defaults.js:64 — the two spans are one implementation copied and then locally edited — 57 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. — Sources/Baguette/Resources/Web/sim-camera.js:67
  • Sources/Baguette/Resources/Web/sim-camera.js:79 · Sources/Baguette/Resources/Web/sim-logs.js:207 — the two spans are one implementation copied and then locally edited — 52 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. — Sources/Baguette/Resources/Web/sim-camera.js:79
  • Sources/Baguette/Resources/Web/sim-defaults.js:539 · Sources/Baguette/Resources/Web/sim-defaults.js:554 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-defaults.js:539
  • Sources/Baguette/Resources/Web/sim-plugins.js:204 · Sources/Baguette/Resources/Web/sim-screens.js:165 — 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. — Sources/Baguette/Resources/Web/sim-plugins.js:204
  • Sources/Baguette/Resources/Web/sim-plugins.js:1079 · Sources/Baguette/Resources/Web/sim-plugins.js:1171 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-plugins.js:1079
  • Sources/Baguette/Resources/Web/sim-screens.js:318 · Sources/Baguette/Resources/Web/sim-screens.js:414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — Sources/Baguette/Resources/Web/sim-screens.js:318
  • Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:77 · Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:97 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:77
  • Sources/Baguette/Resources/Web/sim-camera.js:246 · Sources/Baguette/Resources/Web/sim-camera.js:259 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/sim-camera.js:246
  • Sources/Baguette/Resources/Web/sim-native.js:1603 · Sources/Baguette/Resources/Web/sim-stream.js:147 — 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. — Sources/Baguette/Resources/Web/sim-native.js:1603
  • Sources/Baguette/Resources/Web/sim-native.js:1631 · Sources/Baguette/Resources/Web/sim-stream.js:124 — 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. — Sources/Baguette/Resources/Web/sim-native.js:1631
  • Sources/Baguette/Resources/Web/sim-plugins.js:282 · Sources/Baguette/Resources/Web/sim-screens.js:286 — 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. — Sources/Baguette/Resources/Web/sim-plugins.js:282
  • Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:69 · Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:79 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:69
  • Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:62 · Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:132 — the two spans are one implementation copied and then locally edited — 86 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:62
  • Sources/Baguette/Resources/Web/farm/farm-views.js:63 · Sources/Baguette/Resources/Web/farm/farm-views.js:80 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/farm/farm-views.js:63
  • Sources/Baguette/Resources/Web/plugin-control.js:139 · Sources/Baguette/Resources/Web/plugin-control.js:165 — the two spans are one implementation copied and then locally edited — 62 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — Sources/Baguette/Resources/Web/plugin-control.js:139
  • Sources/Baguette/Resources/Web/sim-native.js:2540 · Sources/Baguette/Resources/Web/sim-native.js:2566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — Sources/Baguette/Resources/Web/sim-native.js:2540
  • Sources/Baguette/Resources/Web/capture/capture-size.js:144 · Sources/Baguette/Resources/Web/capture/capture-size.js:166 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — Sources/Baguette/Resources/Web/capture/capture-size.js:144
  • Sources/Baguette/Resources/Web/farm/farm-views.js:180 · Sources/Baguette/Resources/Web/farm/farm-views.js:223 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — Sources/Baguette/Resources/Web/farm/farm-views.js:180

What to do

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

  • (anonymous) has cyclomatic complexity 36 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 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. — Sources/Baguette/Resources/Web/sim-native.js:2730
  • toggle3D has cyclomatic complexity 33 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/sim-native.js:2639
  • boot has cyclomatic complexity 31 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/sim-native.js:310
  • _mountIn has cyclomatic complexity 30 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/farm/farm-tile.js:131
  • _onChange has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-defaults.js:568
  • _renderPopover 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. — Sources/Baguette/Resources/Web/capture/capture-size-menu.js:245
  • parse has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js:47
  • enterHandheld has cyclomatic complexity 18 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 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. — Sources/Baguette/Resources/Web/sim-native.js:522
  • fetchDeviceMeta has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/sim-native.js:1644
  • (anonymous) has cyclomatic complexity 18 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/sim-plugins.js:902
  • feed has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/frame-decoder.js:43
  • attach has cyclomatic complexity 17 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. — Sources/Baguette/Resources/Web/sim-3d.js:57
  • renderPowerCard has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — Sources/Baguette/Resources/Web/sim-native.js:1370
  • exitHandheld has cyclomatic complexity 16 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. — Sources/Baguette/Resources/Web/sim-native.js:554
  • _onMessage has cyclomatic complexity 16 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-camera.js:118
  • _render has cyclomatic complexity 15 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-logs.js:311
  • _onMessage has cyclomatic complexity 15 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-logs.js:261
  • (anonymous) has cyclomatic complexity 15 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 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. — Sources/Baguette/Resources/Web/sim-file-drop.js:272
  • _toggleRecord has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/farm/farm-focus.js:265
  • recordingFit has cyclomatic complexity 14 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. — Sources/Baguette/Resources/Web/sim-3d.js:707
  • locate has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/baguette/gestures/screen-quad.js:82
  • toggleNetwork has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-native.js:2490
  • toggleDefaults has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-native.js:2552
  • _simToggleRecord has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-stream.js:516
  • startSession has cyclomatic complexity 13 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. — Sources/Baguette/Resources/Web/sim-native.js:936
  • (anonymous) has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:103
  • routeStreamText has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-native.js:901
  • intent has cyclomatic complexity 13 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 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. — Sources/Baguette/Resources/Web/plugin-row-action.js:40
  • _handle has cyclomatic complexity 13 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. — Sources/Baguette/Resources/Web/baguette/parts/keyboard.js:119
  • downloadSnapshot has cyclomatic complexity 13 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. — Sources/Baguette/Resources/Web/sim-native.js:2956
  • (anonymous) has cyclomatic complexity 13 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. (×2) — Sources/Baguette/Resources/Web/sim-plugins.js:804, Sources/Baguette/Resources/Web/sim-plugins.js:956
  • activeCaptureSource has cyclomatic complexity 13 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. — Sources/Baguette/Resources/Web/sim-native.js:2900
  • paintComposite has cyclomatic complexity 13 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. (×2) — Sources/Baguette/Resources/Web/capture/capture-composer.js:113, Sources/Baguette/Resources/Web/recorder.js:124
  • toggleNotify has cyclomatic complexity 12 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. — Sources/Baguette/Resources/Web/sim-native.js:2526
  • onText has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-3d.js:405
  • render has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — Sources/Baguette/Resources/Web/sim-list.js:319
  • renderBody has cyclomatic complexity 12 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 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. — Sources/Baguette/Resources/Web/sim-3d.js:1077
  • stopStream has cyclomatic complexity 12 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 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. — Sources/Baguette/Resources/Web/sim-stream.js:296
R3 · Large Files2.5 / 10Weak✓ Tool-verified

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

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

  • Sources/Baguette/Resources/Web/sim-native.js has 3033 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-native.js:1
  • Sources/Baguette/Resources/Web/sim-plugins.js has 1135 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-plugins.js:1
  • Sources/Baguette/Resources/Web/sim-3d.js has 1125 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-3d.js:1
  • Sources/Baguette/Resources/Web/sim-location.js has 1071 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-location.js:1
  • Sources/Baguette/Resources/Web/sim-stream.js has 667 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-stream.js:1
  • Sources/Baguette/Resources/Web/sim-defaults.js has 576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-defaults.js:1
  • Sources/Baguette/Resources/Web/recorder.js has 464 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/recorder.js:1
  • Sources/Baguette/Resources/Web/sim-screens.js has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-screens.js:1
  • Sources/Baguette/Resources/Web/farm/farm-focus.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/farm/farm-focus.js:1
  • Sources/Baguette/Resources/Web/sim-list.js has 438 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-list.js:1
  • Sources/Baguette/Resources/Web/farm/farm-app.js has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/farm/farm-app.js:1
  • Sources/Baguette/Resources/Web/sim-camera.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — Sources/Baguette/Resources/Web/sim-camera.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 Coverage1.9 / 10Weak✓ 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) — Sources/Baguette/Resources/Web/sim-native.js:1, Sources/Baguette/Resources/Web/sim-plugins.js:1, Sources/Baguette/Resources/Web/sim-location.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code7.7 / 10Strong✓ Tool-verified

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

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

  • Unreachable from the 58 application, 1 tooling and 38 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
  • no import path from any entry point (58 application, 1 tooling, 38 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×5) — Sources/Baguette/Resources/Web/farm/farm-focus.js, Sources/Baguette/Resources/Web/farm/farm-app.js, Sources/Baguette/Resources/Web/farm/farm-views.js, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

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

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

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

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

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

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

X3 · Exception handling4.7 / 10Weak✓ Tool-verified

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

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

  • 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. (×31) — Sources/Baguette/Resources/Web/frame-decoder.js:27, Sources/Baguette/Resources/Web/frame-decoder.js:103, Sources/Baguette/Resources/Web/frame-decoder.js:113, …
  • `.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. (×7) — Sources/Baguette/Resources/Web/frame-decoder.js:109, Sources/Baguette/Resources/Web/sim-location.js:518, Sources/Baguette/Resources/Web/sim-location.js:594, …
  • `catch (e)` 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. — Sources/Baguette/Resources/Web/sim-camera.js:120
  • `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — Sources/Baguette/Resources/Web/sim-logs.js:263

What to do

  • Swallowed exception (empty catch)

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health40%Weak — gated by R1, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture82%StrongStrongest area.
Maturity66%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness36%Weak — gated by R4, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security54%Checked 4 of 9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven10%Critical — gated by ED1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility51%Adequate — gated by AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance70%StrongSolid.
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 — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 65 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Swift imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named property (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a SwiftData @Model, a Core Data, Realm, GRDB or Fluent type, a GRDB or SQLite.swift column, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (CoreData, SwiftData, GRDB, RealmSwift, SQLite, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not included — the .swift suite was found but not re-run
  • 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.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 40 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — X1 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X12 Unreachable branch — X12 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), python (389 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — X2 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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.
  • X21 Side-effecting pattern guard — X21 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X27 Collection changed while being enumerated — 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
  • X29 Per-element action decided by a fixed element — X29 reached only 31% of this repository's production lines — swift (40,518 lines), objectivec (3,362 lines), python (389 lines), c (302 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — 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 — 40 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×7
  • <input> without a programmatic label Sources/Baguette/Resources/Web/capture/capture-size-menu.js:277 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/farm/farm-views.js:123 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/sim-3d.js:1159 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/sim-list.js:344 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/sim-logs.js:108 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/sim-plugins.js:1027 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label Sources/Baguette/Resources/Web/sim-stream.html:183 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC5 · ARIA correctness · aria-hidden hides a focusable element · ×5
  • aria-hidden hides a focusable element Sources/Baguette/Resources/Web/sim-native.html:3529 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element Sources/Baguette/Resources/Web/sim-native.html:3587 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element Sources/Baguette/Resources/Web/sim-native.html:3609 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element Sources/Baguette/Resources/Web/sim-native.html:3629 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
  • aria-hidden hides a focusable element Sources/Baguette/Resources/Web/sim-native.html:3731 — aria-hidden="true" here hides the subtree from assistive tech, but a focusable descendant stays in the tab order — a keyboard user can land on a control screen readers can't see. Add inert, take the descendants out of the tab order (tabindex="-1"), or drop aria-hidden.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×4
  • <label> that labels no control Sources/Baguette/Resources/Web/sim-3d.js:577 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control Sources/Baguette/Resources/Web/sim-3d.js:586 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control Sources/Baguette/Resources/Web/sim-3d.js:591 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control Sources/Baguette/Resources/Web/sim-plugins.js:1025 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels · <select> without a programmatic label · ×3
  • <select> without a programmatic label Sources/Baguette/Resources/Web/sim-list.js:345 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label Sources/Baguette/Resources/Web/sim-list.js:350 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <select> without a programmatic label Sources/Baguette/Resources/Web/sim-logs.js:109 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D13 · Secret Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
ED1 · Handler temporal coupling · Blocking wait inside a handler · ×1
  • Blocking wait inside a handler: DeviceAVCCEncoder.receive Sources/Baguette/Infrastructure/Render/DeviceAVCCEncoder.swift:55 — `DeviceAVCCEncoder.receive` is an event/message handler that blocks on a synchronous wait (a semaphore/queue `.wait`/`.sync`) — it stalls the handler on a peer or resource and serialises throughput, and can deadlock under load. Await the work asynchronously (`async`/`await`) instead of blocking the handler.
Serious — 596 finding(s)
D10 · Test Quality · No assertions · ×58
  • No assertions: Tests/BaguetteTests/Accessibility/TokenDispatcherTests.swift:29 — 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: Tests/BaguetteTests/App/FillDispatchTests.swift:29 — 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: Tests/BaguetteTests/App/LoggerTests.swift: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: Tests/BaguetteTests/Apps/SchemeSuggestionTests.swift:40 — 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: Tests/BaguetteTests/Bakery/BakeryMenuTests.swift:10 — 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: Tests/BaguetteTests/Bakery/GitCheckoutTests.swift:58 — 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: Tests/BaguetteTests/Bakery/PluginOfferTests.swift:12 — 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: Tests/BaguetteTests/Camera/BGRAConverterTests.swift:8 — 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: Tests/BaguetteTests/Camera/SharedMemoryFrameSinkTests.swift:14 — 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: Tests/BaguetteTests/Chrome/ChromeIntegrationTests.swift:15 — 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: Tests/BaguetteTests/Chrome/DeviceChromeTests.swift:10 — 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: Tests/BaguetteTests/Chrome/DeviceProfileCapabilitiesTests.swift:105 — 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: Tests/BaguetteTests/Chrome/DeviceProfileTests.swift:8 — 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: Tests/BaguetteTests/Defaults/PreferenceSuiteTests.swift: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: Tests/BaguetteTests/Defaults/SimctlDefaultsTests.swift: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: Tests/BaguetteTests/Device/TwinScreenTests.swift: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: Tests/BaguetteTests/Hinge/GuestHingeTests.swift:52 — 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: Tests/BaguetteTests/Hinge/HingeCommandTests.swift:9 — 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: Tests/BaguetteTests/Hinge/HingeControlTests.swift:15 — 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: Tests/BaguetteTests/Hinge/HingeSweepTests.swift:12 — 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: Tests/BaguetteTests/Hinge/PosedHingeTests.swift:20 — 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: Tests/BaguetteTests/Input/FoldableInputTests.swift:28 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: Tests/BaguetteTests/Input/GestureTests.swift:9 — 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: Tests/BaguetteTests/Location/SimctlLocationTests.swift:34 — 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: Tests/BaguetteTests/Logs/HostSubprocessStressTests.swift:29 — 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.
  • + 33 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file Sources/Baguette/Resources/Web/sim-native.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 Sources/Baguette/Resources/Web/sim-plugins.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 Sources/Baguette/Resources/Web/sim-location.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 Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/sim-defaults.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 Sources/Baguette/Resources/Web/sim-screens.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 Sources/Baguette/Resources/Web/recorder.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 Sources/Baguette/Resources/Web/sim-list.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 Sources/Baguette/Resources/Web/farm/farm-app.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 Sources/Baguette/Resources/Web/sim-camera.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 Sources/Baguette/Resources/Web/sim-ax-inspector.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 Sources/Baguette/Resources/Web/sim-logs.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 Sources/Baguette/Resources/Web/sim-file-drop.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 Sources/Baguette/Resources/Web/farm/farm-tile.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 Sources/Baguette/Resources/Web/farm/farm-views.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 Sources/Baguette/Resources/Web/sim-network.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 Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.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 Sources/Baguette/Resources/Web/sim-status-bar.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 Sources/Baguette/Resources/Web/screens/companion-screens.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 Sources/Baguette/Resources/Web/plugin-prompt.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 Sources/Baguette/Resources/Web/plugin-control.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 Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.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 Sources/Baguette/Resources/Web/baguette/parts/button.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 Sources/Baguette/Resources/Web/defaults/preference-rows.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 Sources/Baguette/Resources/Web/baguette/parts/keyboard.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.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×38
  • Swallowed exception (empty catch) Sources/Baguette/Resources/Web/frame-decoder.js:27 — 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) Sources/Baguette/Resources/Web/frame-decoder.js:103 — 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) Sources/Baguette/Resources/Web/frame-decoder.js:109 — `.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) Sources/Baguette/Resources/Web/frame-decoder.js:113 — 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) Sources/Baguette/Resources/Web/frame-decoder.js:122 — 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) Sources/Baguette/Resources/Web/recorder.js:444 — 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) Sources/Baguette/Resources/Web/recorder.js:479 — 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) Sources/Baguette/Resources/Web/sim-ax-inspector.js:204 — 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) Sources/Baguette/Resources/Web/sim-camera.js:84 — 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) Sources/Baguette/Resources/Web/sim-camera.js:94 — 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) Sources/Baguette/Resources/Web/sim-camera.js:138 — 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) Sources/Baguette/Resources/Web/sim-file-drop.js:341 — 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) Sources/Baguette/Resources/Web/sim-location.js:518 — `.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) Sources/Baguette/Resources/Web/sim-location.js:594 — `.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) Sources/Baguette/Resources/Web/sim-logs.js:211 — 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) Sources/Baguette/Resources/Web/sim-logs.js:213 — 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) Sources/Baguette/Resources/Web/sim-logs.js:251 — 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) Sources/Baguette/Resources/Web/sim-native.js:547 — `.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) Sources/Baguette/Resources/Web/sim-native.js:548 — 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) Sources/Baguette/Resources/Web/sim-native.js:576 — `.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) Sources/Baguette/Resources/Web/sim-native.js:577 — 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) Sources/Baguette/Resources/Web/sim-native.js:653 — 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) Sources/Baguette/Resources/Web/sim-native.js:675 — 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) Sources/Baguette/Resources/Web/sim-native.js:680 — `.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) Sources/Baguette/Resources/Web/sim-native.js:719 — 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.
  • + 13 more in this group — see findings.md.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×28
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:462 — `#simNativeView .watch-btn` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:520 — `#simNativeView #nativeDeviceFrame > div` moves (`transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:597 — `#simNativeView .power-card[data-phase="booting"] .power-glyph` moves (`animation: nv-power-spin 1.4s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:626 — `#simNativeView .power-card .power-btn` moves (`transition: filter 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:813 — `#simNativeView .tb-acc > summary .tb-caret` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:956 — `#simNativeView .sidebar-view-toggle` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1021 — `#simNativeView .theme-toggle` moves (`transition: background 0.12s ease, transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1074 — `#simNativeView .logs-sheet` moves (`transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.18s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1131 — `#simNativeView .camera-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1188 — `#simNativeView .status-bar-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1231 — `#simNativeView .network-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1272 — `#simNativeView .notify-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1339 — `#simNativeView .defaults-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1466 — `#simNativeView .defaults-host .df-chevron` moves (`transition: transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1629 — `#simNativeView .location-host` moves (`transition: opacity 0.16s ease, transform 0.16s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1773 — `#simNativeView .location-host .loc-stick-thumb` moves (`transition: transform 0.12s cubic-bezier(0.2, 0.9, 0.3, 1.4)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1796 — `#simNativeView .location-host .loc-compass-needle` moves (`transition: transform 0.1s linear, border-bottom-color 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:1832 — `#simNativeView .render3d-host` moves (`transition: opacity .16s ease, transform .16s ease, visibility .16s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:2024 — `#simNativeView .r3d-spinner` moves (`animation: nv-power-spin .8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:2100 — `#simNativeView .device-column` moves (`transition: transform .2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:2595 — `#simNativeView .plugin-tick[data-control="switch"]::after` moves (`transition: transform 0.12s ease, background 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:3013 — `#simNativeView .handheld-ui .hh-fab` moves (`transition: opacity 0.4s ease, left 0.22s cubic-bezier(0.32, 0.72, 0, 1), top 0.22s cubic-bezier(0.32, 0.72, 0, 1), transform 0.12s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-native.html:3048 — `#simNativeView .handheld-ui .hh-menu` moves (`transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.32, 0.72, 0, 1)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-stream.html:85 — `#simStreamSidebar .adv > summary::before` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard Sources/Baguette/Resources/Web/sim-stream.html:103 — `#simStreamSidebar details.events > summary::after` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • + 3 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×10
  • Duplicated block (7 lines × 2) Sources/Baguette/App/Commands/AddFileCommands.swift:22 — Sources/Baguette/App/Commands/AddFileCommands.swift:22-28 | Sources/Baguette/App/Commands/AddFileCommands.swift:61-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/AddFileCommands.swift:22` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) Sources/Baguette/App/Commands/ClipboardCommand.swift:57 — Sources/Baguette/App/Commands/ClipboardCommand.swift:57-63 | Sources/Baguette/App/Commands/ClipboardCommand.swift:82-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/ClipboardCommand.swift:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) Sources/Baguette/Domain/Render/Device3DCamera.swift:18 — Sources/Baguette/Domain/Render/Device3DCamera.swift:18-24 | Sources/Baguette/Domain/Render/Device3DPose.swift:14-20 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Chrome/LiveChromes.swift:370 — Sources/Baguette/Infrastructure/Chrome/LiveChromes.swift:370-376 | Sources/Baguette/Infrastructure/Chrome/LiveChromes.swift:384-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:278 — Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:278-284 | Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:291-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:303 — Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:303-309 | Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:315-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:618 — Sources/Baguette/Infrastructure/Server/Server.swift:618-624 | Sources/Baguette/Infrastructure/Server/Server.swift:654-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:618` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:699 — Sources/Baguette/Infrastructure/Server/Server.swift:699-705 | Sources/Baguette/Infrastructure/Server/Server.swift:728-734 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) Sources/Baguette/Domain/Render/ScreenQuad.swift:155 — Sources/Baguette/Domain/Render/ScreenQuad.swift:155-161 | Sources/Baguette/Domain/Render/ScreenQuad.swift:171-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Domain/Render/ScreenQuad.swift:171` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Baguette/Domain/Render/ScreenQuad.swift:170` calls `rotate` and `Sources/Baguette/Domain/Render/ScreenQuad.swift:154` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) Sources/Baguette/Infrastructure/Camera/ImageFileCapture.swift:60 — Sources/Baguette/Infrastructure/Camera/ImageFileCapture.swift:60-66 | Sources/Baguette/Infrastructure/Camera/VideoFileCapture.swift:113-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D15 · Churn × Complexity Hotspots · Repeated repair · ×9
  • Repeated repair: Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift:17 — Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is SimulatorKitDisplays.init at line 17), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(hinge): read iPhone Duo's hinge in the guest on Xcode 27.1”; “fix(injection): read DYLD_INSERT_LIBRARIES with a bounded two-channel capture”; “fix(simulator): drain display enumeration without DispatchIO”; “fix(simulator): close capture pipes after pending reads stop”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Simulator/SimulatorKitDisplays.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift:61 — Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is SimctlSimulatorInjection.locked at line 61), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(simulator): pass the custom device set to every simctl call”; “fix(injection): read DYLD_INSERT_LIBRARIES with a bounded two-channel capture”; “fix(motion): keep the parked intent on a failed disarm, fail loud on a lost lock”; “fix(motion): address PR review — races, cumulative totals, per-sim scoping”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Domain/Motion/MotionSession.swift Sources/Baguette/Domain/Motion/MotionSession.swift:69 — Sources/Baguette/Domain/Motion/MotionSession.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is MotionSession.drive at line 69), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(motion): bank the activity the guest actually read after a failed publish”; “fix(motion): park and disarm on an explicit stop without a recorded start”; “fix(motion): keep the parked intent on a failed disarm, fail loud on a lost lock”; “fix(motion): address PR review — races, cumulative totals, per-sim scoping”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Domain/Motion/MotionSession.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:166 — Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is CoreSimulators.state at line 166), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(fill): send no more keys once the field is gone, and answer review”; “fix(camera): keep a failed cleanup owned until an explicit stop succeeds”; “fix(simulator): bound display enumeration and preserve device sets”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Domain/Input/LitPanelInput.swift Sources/Baguette/Domain/Input/LitPanelInput.swift:34 — Sources/Baguette/Domain/Input/LitPanelInput.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is LitPanelInput.contact at line 34), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(duo): keep a drag and a pinch on their own panels”; “fix(duo): keep a touch on the digitizer it went down on”; “refactor(duo): keep the fold and key fixes minimal”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Domain/Input/LitPanelInput.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Infrastructure/Stream/WebSocketFrameSink.swift Sources/Baguette/Infrastructure/Stream/WebSocketFrameSink.swift:121 — Sources/Baguette/Infrastructure/Stream/WebSocketFrameSink.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is WebSocketFrameSink.parseMJPEG at line 121), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(stream): close the socket when a WebSocket drain write fails”; “fix(stream): pace frames before encoding and keep H.264 references”; “fix(screen): coalesce framebuffer captures so streaming can't run away”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Stream/WebSocketFrameSink.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift:69 — Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is SharedFileNetwork.current at line 69), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(injection): read DYLD_INSERT_LIBRARIES with a bounded two-channel capture”; “fix(network): address PR review — a crash, a race, and stale claims”; “fix(network): carry over the motion PR-review findings”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: Sources/Baguette/Resources/Web/sim-network.js Sources/Baguette/Resources/Web/sim-network.js:84 — Sources/Baguette/Resources/Web/sim-network.js changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is NetworkPanel._absorb at line 84), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(network): address PR review — a crash, a race, and stale claims”; “fix(network): keep the pressed preset lit, and hide the fields behind Custom”; “fix(network): carry over the motion PR-review findings”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Resources/Web/sim-network.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.
  • Repeated repair: Sources/Baguette/App/Commands/StreamCommand.swift Sources/Baguette/App/Commands/StreamCommand.swift:27 — Sources/Baguette/App/Commands/StreamCommand.swift changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is StreamCommand.run at line 27), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(stream): pace frames before encoding and keep H.264 references”; “fix(stream): await termination without dispatchMain”; “fix: help for stream --format and logs --level/--style lists what they accept”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/App/Commands/StreamCommand.swift`: 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×8
  • Hotspot: Sources/Baguette/Infrastructure/Server/Server.swift Sources/Baguette/Infrastructure/Server/Server.swift:142 — Sources/Baguette/Infrastructure/Server/Server.swift changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 121 in Server.registerRoutes at line 142. 17 of those changes were fix/bug commits, and the other 42 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Server/Server.swift`: 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: Sources/Baguette/Resources/Web/sim-native.js Sources/Baguette/Resources/Web/sim-native.js:2729 — Sources/Baguette/Resources/Web/sim-native.js changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in sim-native.wireUnload at line 2729. 10 of those changes were fix/bug commits, and the other 30 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Resources/Web/sim-native.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: Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:23 — Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Server.registerDeviceTwinRoutes at line 23. 2 of those changes were fix/bug commits, and the other 14 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift`: 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: Sources/Baguette/Resources/Web/sim-3d.js Sources/Baguette/Resources/Web/sim-3d.js:366 — Sources/Baguette/Resources/Web/sim-3d.js changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in sim-3d.Sim3DPanel.start at line 366. 3 of those changes were fix/bug commits, and the other 12 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Resources/Web/sim-3d.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: Sources/Baguette/Domain/Render/DeviceModelDefinition.swift Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:297 — Sources/Baguette/Domain/Render/DeviceModelDefinition.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in DeviceModelDefinition.validate at line 297. 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Domain/Render/DeviceModelDefinition.swift`: 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: Sources/Baguette/Resources/Web/sim-plugins.js Sources/Baguette/Resources/Web/sim-plugins.js:947 — Sources/Baguette/Resources/Web/sim-plugins.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in PluginPanels.wireRows at line 947. 2 of those changes were fix/bug commits, and the other 6 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Resources/Web/sim-plugins.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: Sources/Baguette/Resources/Web/sim-stream.js Sources/Baguette/Resources/Web/sim-stream.js:167 — Sources/Baguette/Resources/Web/sim-stream.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in sim-stream.startStream at line 167. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Resources/Web/sim-stream.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: Sources/Baguette/Domain/Input/Fill.swift Sources/Baguette/Domain/Input/Fill.swift:45 — Sources/Baguette/Domain/Input/Fill.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Fill.attempt at line 45. 1 of those changes was a fix/bug commit, and the other 1 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-09..2026-11-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-09 11:27:57 +00:00' --until='2026-11-07 11:27:57 +00:00' --full-history --no-merges -- Sources/Baguette/Domain/Input/Fill.swift`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: Server.registerRoutes Sources/Baguette/Infrastructure/Server/Server.swift:142 — MethodTooLong — registerRoutes runs 493 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 393 over it, 4.93× 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: Server.registerDeviceTwinRoutes Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:23 — MethodTooLong — registerDeviceTwinRoutes 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.
  • MethodTooLong: Server.live3DStreamWS Sources/Baguette/Infrastructure/Server/Server.swift:2804 — MethodTooLong — live3DStreamWS 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: DiagDigitizerTrackpadCommand.probe Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:356 — MethodTooLong — probe runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MouseGestureSource._bind Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:89 — MethodTooLong — _bind runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RealityKitDeviceScene.buildStage Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:353 — MethodTooLong — buildStage runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Server.twinLive3DStreamWS Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:441 — MethodTooLong — twinLive3DStreamWS runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FileTooLong · ×7
  • FileTooLong: Server/Server.swift Sources/Baguette/Infrastructure/Server/Server.swift — FileTooLong — 2249 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Server (45-3633). The bar is 500 significant lines; this is 1749 over it, 4.50× 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: Web/sim-native.js Sources/Baguette/Resources/Web/sim-native.js — FileTooLong — 1822 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 1500 significant lines; this is 322 over it, 1.21× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Web/sim-3d.js Sources/Baguette/Resources/Web/sim-3d.js — FileTooLong — 752 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 252 over it, 1.50× 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: Web/sim-plugins.js Sources/Baguette/Resources/Web/sim-plugins.js — FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 182 over it, 1.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Render/RealityKitDeviceScene.swift Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift — FileTooLong — 670 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: RealityKitDeviceScene (19-949). The bar is 500 significant lines; this is 170 over it, 1.34× 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: Web/sim-location.js Sources/Baguette/Resources/Web/sim-location.js — FileTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 150 over it, 1.30× 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: prototypes/DeviceFarm.html docs/prototypes/DeviceFarm.html — FileTooLong — 507 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×7
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:194 — Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:194-204 | Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:439-463 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/App/Commands/GestureCommands.swift:218 — Sources/Baguette/App/Commands/GestureCommands.swift:218-228 | Sources/Baguette/App/Commands/GestureCommands.swift:250-260 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/App/Commands/Render3DCommand.swift:149 — Sources/Baguette/App/Commands/Render3DCommand.swift:149-159 | Sources/Baguette/Infrastructure/Server/Server.swift:2150-2160 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Stream/AVCCStream.swift:32 — Sources/Baguette/Infrastructure/Stream/AVCCStream.swift:32-46 | Sources/Baguette/Infrastructure/Stream/MJPEGStream.swift:25-35 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/Domain/Defaults/PreferenceValue.swift:183 — Sources/Baguette/Domain/Defaults/PreferenceValue.swift:183-194 | Sources/Baguette/Domain/Defaults/PreferenceValue.swift:214-224 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:102 — Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:102-112 | Sources/Baguette/Infrastructure/Stream/JPEGEncoder.swift:17-28 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) Sources/Baguette/App/BakeryInstall.swift:163 — Sources/Baguette/App/BakeryInstall.swift:163-173 | Sources/Baguette/Domain/Bakery/InstallPlan.swift:40-53 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×6
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/App/Commands/DefaultsCommand.swift:175 — Sources/Baguette/App/Commands/DefaultsCommand.swift:175-188 | Sources/Baguette/App/Commands/DefaultsCommand.swift:209-222 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/App/Commands/HealCommand.swift:24 — Sources/Baguette/App/Commands/HealCommand.swift:24-37 | Sources/Baguette/App/Commands/ShutdownCommand.swift:12-25 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:156 — Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:156-169 | Sources/Baguette/Infrastructure/Server/Server.swift:2570-2585 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/Domain/Render/DeviceModels.swift:67 — Sources/Baguette/Domain/Render/DeviceModels.swift:67-82 | Sources/Baguette/Domain/Render/DeviceModels.swift:84-97 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:219 — Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:219-232 | Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:53-67 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:1058 — Sources/Baguette/Infrastructure/Server/Server.swift:1058-1071 | Sources/Baguette/Infrastructure/Server/Server.swift:1152-1165 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×6
  • Duplicated block (9 lines × 2) Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:231 — Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:231-239 | Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:259-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) Sources/Baguette/App/Commands/GestureCommands.swift:68 — Sources/Baguette/App/Commands/GestureCommands.swift:68-76 | Sources/Baguette/App/Commands/GestureCommands.swift:190-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/GestureCommands.swift:68` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Sources/Baguette/App/Commands/HingeCLICommand.swift:29 — Sources/Baguette/App/Commands/HingeCLICommand.swift:29-37 | Sources/Baguette/App/Commands/OrientationCommand.swift:20-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:217 — Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:217-225 | Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:243-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:217` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:2726 — Sources/Baguette/Infrastructure/Server/Server.swift:2726-2734 | Sources/Baguette/Infrastructure/Server/Server.swift:2772-2780 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:2726` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift:33 — Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift:33-41 | Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift:33-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) Sources/Baguette/App/CopyDispatch.swift:50 — Sources/Baguette/App/CopyDispatch.swift:50-55 | Sources/Baguette/App/PasteDispatch.swift:44-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/CopyDispatch.swift:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:28 — Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:28-33 | Sources/Baguette/Infrastructure/Hinge/GuestHingeMotor.swift:68-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:28` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:254 — Sources/Baguette/Infrastructure/Server/Server.swift:254-259 | Sources/Baguette/Infrastructure/Server/Server.swift:309-314 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:2675 — Sources/Baguette/Infrastructure/Server/Server.swift:2675-2680 | Sources/Baguette/Infrastructure/Server/Server.swift:2746-2752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:2675` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:145 — Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:145-154 | Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:168-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:2045 — Sources/Baguette/Infrastructure/Server/Server.swift:2045-2050 | Sources/Baguette/Infrastructure/Server/Server.swift:2074-2079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:2045` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×5
  • Focus outline removed in CSS without a :focus replacement Sources/Baguette/Resources/Web/sim-native.html:278 — `#simNativeView .carplay-frame` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Sources/Baguette/Resources/Web/sim-native.html:322 — `#simNativeView .watch-frame` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Sources/Baguette/Resources/Web/sim-native.html:1877 — `#simNativeView .r3d-live-canvas` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Sources/Baguette/Resources/Web/sim-native.html:2192 — `#simNativeView .status-bar-host .sb-range` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement Sources/Baguette/Resources/Web/farm/farm.css:305 — `.search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D3 · God Classes · TooManyMethods · ×5
  • TooManyMethods: Server Sources/Baguette/Infrastructure/Server/Server.swift:45 — TooManyMethods — 149 methods, declared across 10 files: Server/Server.swift (89), Server/ServerDefaultsRoutes.swift (14), Server/ServerBakeryRoutes.swift (8), Server/ServerDeviceTwinRoutes.swift (8), +6 more file(s). The bar is 30 methods; this is 119 over it, 4.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LocationPanel Sources/Baguette/Resources/Web/sim-location.js:163 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PluginPanels Sources/Baguette/Resources/Web/sim-plugins.js:77 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RealityKitDeviceScene Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:19 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DefaultsPanel Sources/Baguette/Resources/Web/sim-defaults.js:47 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×5
  • Edited copy of a member (7 corresponding lines) Sources/Baguette/App/Commands/MotionCommand.swift:95 — Sources/Baguette/App/Commands/MotionCommand.swift:95-102 | Sources/Baguette/App/Commands/MotionCommand.swift:122-128 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Plugin/Plugins.swift:47 — Sources/Baguette/Domain/Plugin/Plugins.swift:47-53 | Sources/Baguette/Domain/Simulator/Simulators.swift:33-42 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Input/Gesture.swift:81 — Sources/Baguette/Domain/Input/Gesture.swift:81-87 | Sources/Baguette/Domain/Input/TypeText.swift:37-46 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Screen/IntegratedPanel.swift:16 — Sources/Baguette/Domain/Screen/IntegratedPanel.swift:16-22 | Sources/Baguette/Infrastructure/Server/Server.swift:1586-1592 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) Sources/Baguette/Domain/Render/Device3DStreamOptions.swift:121 — Sources/Baguette/Domain/Render/Device3DStreamOptions.swift:121-127 | Sources/Baguette/Domain/Render/DeviceRenderArguments.swift:26-32 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×5
  • Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift:42 — Sources/Baguette/Domain/Input/FoldableInput.swift:42-44 | Sources/Baguette/Domain/Input/LitPanelInput.swift:42-44 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift:46 — Sources/Baguette/Domain/Input/FoldableInput.swift:46-48 | Sources/Baguette/Domain/Input/LitPanelInput.swift:46-48 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift:50 — Sources/Baguette/Domain/Input/FoldableInput.swift:50-52 | Sources/Baguette/Domain/Input/LitPanelInput.swift:50-52 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift:54 — Sources/Baguette/Domain/Input/FoldableInput.swift:54-56 | Sources/Baguette/Domain/Input/LitPanelInput.swift:54-56 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) Sources/Baguette/Domain/Simulator/InjectedDylibInstallPlan.swift:76 — Sources/Baguette/Domain/Simulator/InjectedDylibInstallPlan.swift:76-78 | Sources/Baguette/Infrastructure/Render/VerifiedDeviceAssets.swift:85-89 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:180 — Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:180-187 | Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:201-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) Sources/Baguette/App/Commands/MotionCommand.swift:164 — Sources/Baguette/App/Commands/MotionCommand.swift:164-171 | Sources/Baguette/App/Commands/NetworkCommand.swift:178-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) Sources/Baguette/Domain/Simulator/SimulatorDefinition.swift:438 — Sources/Baguette/Domain/Simulator/SimulatorDefinition.swift:438-445 | Sources/Baguette/Domain/Simulator/SimulatorDefinition.swift:456-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:100 — Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:100-107 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:58-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:82 — Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:82-89 | Sources/Baguette/Infrastructure/Server/Server.swift:2542-2549 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Screen/CaptureCanvas.swift:82` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×5
  • Duplicated block (7 lines × 2 locations) Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:77 — Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:77 · Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:97 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) Sources/Baguette/Resources/Web/sim-camera.js:246 — Sources/Baguette/Resources/Web/sim-camera.js:246 · Sources/Baguette/Resources/Web/sim-camera.js:259 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:1603 — Sources/Baguette/Resources/Web/sim-native.js:1603 · Sources/Baguette/Resources/Web/sim-stream.js:147 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (7 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:1631 — Sources/Baguette/Resources/Web/sim-native.js:1631 · Sources/Baguette/Resources/Web/sim-stream.js:124 — 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.
  • Duplicated block (7 lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js:282 — Sources/Baguette/Resources/Web/sim-plugins.js:282 · Sources/Baguette/Resources/Web/sim-screens.js:286 — 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.3 · ×4
  • Low contrast colour pair in CSS (4.3:1) Sources/Baguette/Resources/Web/farm/farm.css:218 — `.filter .count` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.3:1) Sources/Baguette/Resources/Web/farm/farm.css:565 — `.qa` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.3:1) Sources/Baguette/Resources/Web/farm/farm.css:706 — `.list-header` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.3:1) Sources/Baguette/Resources/Web/farm/farm.css:762 — `.tag-row .t` sets color: #6a7686 on background-color: #070a0d — 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D35 · Change Coupling · Change coupling · ×4
  • Change coupling: DeviceScene.swift ↔ sim-3d.js Sources/Baguette/Domain/Render/DeviceScene.swift:1 — `Sources/Baguette/Domain/Render/DeviceScene.swift` and `Sources/Baguette/Resources/Web/sim-3d.js` change together 58% of the time (7 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e6b672df` refactor(foldable): remove interface orientation polling and update r…; `cebcf80e` feat(foldable): add interface orientation handling for lit panel and …; `191519ff` feat(foldable): add litPanel property and integrate it into screenPie… — run `git show` on any of them.
  • Change coupling: RealityKitDeviceScene.swift ↔ sim-3d.js Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:1 — `Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift` and `Sources/Baguette/Resources/Web/sim-3d.js` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `e6b672df` refactor(foldable): remove interface orientation polling and update r…; `cebcf80e` feat(foldable): add interface orientation handling for lit panel and …; `191519ff` feat(foldable): add litPanel property and integrate it into screenPie… — run `git show` on any of them.
  • Change coupling: RealityKitDeviceScene.swift ↔ sim-native.js Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:1 — `Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift` and `Sources/Baguette/Resources/Web/sim-native.js` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `e6b672df` refactor(foldable): remove interface orientation polling and update r…; `cebcf80e` feat(foldable): add interface orientation handling for lit panel and …; `191519ff` feat(foldable): add litPanel property and integrate it into screenPie… — run `git show` on any of them.
  • Change coupling: DeviceScene.swift ↔ sim-native.js Sources/Baguette/Domain/Render/DeviceScene.swift:1 — `Sources/Baguette/Domain/Render/DeviceScene.swift` and `Sources/Baguette/Resources/Web/sim-native.js` 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `e6b672df` refactor(foldable): remove interface orientation polling and update r…; `cebcf80e` feat(foldable): add interface orientation handling for lit panel and …; `191519ff` feat(foldable): add litPanel property and integrate it into screenPie… — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×4
  • Edited copy of a member (8 corresponding lines) Sources/Baguette/Domain/Chrome/DeviceProfile.swift:151 — Sources/Baguette/Domain/Chrome/DeviceProfile.swift:151-158 | Sources/Baguette/Domain/Chrome/DeviceProfile.swift:164-171 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/Baguette/App/Commands/NetworkCommand.swift:117 — Sources/Baguette/App/Commands/NetworkCommand.swift:117-129 | Sources/Baguette/App/Commands/NetworkCommand.swift:168-175 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift:34 — Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift:34-41 | Sources/Baguette/Infrastructure/Simulator/SimctlSimulatorInjection.swift:43-50 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) Sources/Baguette/Domain/Input/Touch1.swift:23 — Sources/Baguette/Domain/Input/Touch1.swift:23-30 | Sources/Baguette/Domain/Input/Touch2.swift:12-19 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×4
  • Duplicated block (5 lines × 2) Sources/Baguette/Domain/Render/FoldedScreenProjection.swift:64 — Sources/Baguette/Domain/Render/FoldedScreenProjection.swift:64-68 | Sources/Baguette/Domain/Render/FoldedScreenProjection.swift:129-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Domain/Render/FoldedScreenProjection.swift:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift:38 — Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift:38-42 | Sources/Baguette/Infrastructure/Server/WebRoot.swift:107-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) Sources/Baguette/Domain/Screen/FramebufferPortSnapshots.swift:46 — Sources/Baguette/Domain/Screen/FramebufferPortSnapshots.swift:46-50 | Sources/Baguette/Domain/Screen/FramebufferSurfacePick.swift:58-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift:80 — Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift:80-84 | Sources/Baguette/Infrastructure/Simulator/InjectedDylibInstaller.swift:45-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift:80` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×4
  • Duplicated block (8 lines × 2 locations) Sources/Baguette/Resources/Web/sim-defaults.js:539 — Sources/Baguette/Resources/Web/sim-defaults.js:539 · Sources/Baguette/Resources/Web/sim-defaults.js:554 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js:204 — Sources/Baguette/Resources/Web/sim-plugins.js:204 · Sources/Baguette/Resources/Web/sim-screens.js:165 — 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.
  • Duplicated block (8 lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js:1079 — Sources/Baguette/Resources/Web/sim-plugins.js:1079 · Sources/Baguette/Resources/Web/sim-plugins.js:1171 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (8 lines × 2 locations) Sources/Baguette/Resources/Web/sim-screens.js:318 — Sources/Baguette/Resources/Web/sim-screens.js:318 · Sources/Baguette/Resources/Web/sim-screens.js:414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC3 · Page structure · Page without a main landmark · ×3
  • Page without a main landmark Sources/Baguette/Resources/Web/baguette-demo.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 Sources/Baguette/Resources/Web/sim-native.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 Sources/Baguette/Resources/Web/sim-stream.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D3 · God Classes · ClassTooLong · ×3
  • ClassTooLong: Server Sources/Baguette/Infrastructure/Server/Server.swift:45 — ClassTooLong — 2171 significant lines (blank, comment-only and punctuation-only lines excluded), 149 methods. The bar is 400 significant lines; this is 1771 over it, 5.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RealityKitDeviceScene Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:19 — ClassTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 260 over it, 1.65× 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: IndigoHIDInput Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:11 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 54 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×3
  • Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:182 — Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:182-199 | Sources/Baguette/Infrastructure/Defaults/SimctlDefaults.swift:139-154 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:210 — Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:210-225 | Sources/Baguette/Infrastructure/Render/RealityKitDeviceScene.swift:230-251 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:1859 — Sources/Baguette/Infrastructure/Server/Server.swift:1859-1874 | Sources/Baguette/Infrastructure/Server/Server.swift:1876-1892 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×3
  • Edited copy of a member (10 corresponding lines) Sources/Baguette/Domain/Apps/InstalledApp.swift:107 — Sources/Baguette/Domain/Apps/InstalledApp.swift:107-117 | Sources/Baguette/Domain/Chrome/DeviceProfile.swift:138-147 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:283 — Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:283-292 | Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:305-314 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift:64 — Sources/Baguette/Infrastructure/Motion/SharedFileMotion.swift:64-73 | Sources/Baguette/Infrastructure/Network/SharedFileNetwork.swift:52-67 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×3
  • Edited copy of a member (6 corresponding lines) Sources/Baguette/App/LabelTap.swift:112 — Sources/Baguette/App/LabelTap.swift:112-117 | Sources/Baguette/Infrastructure/Server/ServerInterfaceRoutes.swift:185-191 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/Baguette/Domain/Interface/InterfaceUpdate.swift:74 — Sources/Baguette/Domain/Interface/InterfaceUpdate.swift:74-83 | Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift:273-278 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) Sources/Baguette/Domain/Input/FoldableInput.swift:78 — Sources/Baguette/Domain/Input/FoldableInput.swift:78-83 | Sources/Baguette/Domain/Input/LitPanelInput.swift:70-75 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×3
  • Edited copy of a member (15 corresponding lines) Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:26 — Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:26-47 | Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:28-42 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:202 — Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:202-217 | Sources/Baguette/Infrastructure/Render/RenderedScreen.swift:72-86 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:196 — Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:196-212 | Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:223-237 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:130 — Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:130-142 | Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:204-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:259 — Sources/Baguette/Infrastructure/Server/Server.swift:259-271 | Sources/Baguette/Infrastructure/Server/Server.swift:412-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:259` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:316 — Sources/Baguette/Infrastructure/Server/Server.swift:316-328 | Sources/Baguette/Infrastructure/Server/Server.swift:355-370 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:316` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Baguette/Infrastructure/Server/Server.swift:314` calls `errorJSON` and `Sources/Baguette/Infrastructure/Server/Server.swift:354` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (12 matched lines × 2 locations) Sources/Baguette/Resources/Web/plugin-control.js:30 — Sources/Baguette/Resources/Web/plugin-control.js:30 · Sources/Baguette/Resources/Web/plugin-prompt.js:19 — the two spans are one implementation copied and then locally edited — 71 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 (12 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-camera.js:67 — Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-network.js:40 — the two spans are one implementation copied and then locally edited — 73 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 (12 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-network.js:237 — Sources/Baguette/Resources/Web/sim-network.js:237 · Sources/Baguette/Resources/Web/sim-network.js:278 — the two spans are one implementation copied and then locally edited — 93 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (10 matched lines × 2 locations) Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:19 — Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:19 · Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:5 — the two spans are one implementation copied and then locally edited — 75 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 (10 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-camera.js:67 — Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-notify.js:39 — the two spans are one implementation copied and then locally edited — 63 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 (10 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-defaults.js:64 — Sources/Baguette/Resources/Web/sim-defaults.js:64 · Sources/Baguette/Resources/Web/sim-network.js:40 — the two spans are one implementation copied and then locally edited — 64 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 (9 lines × 2 locations) · ×3
  • Duplicated block (9 lines × 2 locations) Sources/Baguette/Resources/Web/capture/capture-size.js:89 — Sources/Baguette/Resources/Web/capture/capture-size.js:89 · Sources/Baguette/Resources/Web/capture/capture-size.js:108 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) Sources/Baguette/Resources/Web/sim-3d.js:840 — Sources/Baguette/Resources/Web/sim-3d.js:840 · Sources/Baguette/Resources/Web/sim-3d.js:850 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (9 lines × 2 locations) Sources/Baguette/Resources/Web/sim-logs.js:324 — Sources/Baguette/Resources/Web/sim-logs.js:324 · Sources/Baguette/Resources/Web/sim-logs.js:346 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×3
  • Duplicated block (6 lines × 2 locations) Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:69 — Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:69 · Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:79 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) Sources/Baguette/Resources/Web/farm/farm-views.js:63 — Sources/Baguette/Resources/Web/farm/farm-views.js:63 · Sources/Baguette/Resources/Web/farm/farm-views.js:80 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (6 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:2540 — Sources/Baguette/Resources/Web/sim-native.js:2540 · Sources/Baguette/Resources/Web/sim-native.js:2566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.2 · ×2
  • Low contrast colour pair in CSS (4.2:1) Sources/Baguette/Resources/Web/sim-native.html:1913 — `#simNativeView .r3d-pose-picker button.active` sets color: #2563eb on background-color: #dbeafe — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.2:1) Sources/Baguette/Resources/Web/farm/farm.css:310 — `.search kbd` sets color: #6a7686 on background-color: #0a0c10 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment Sources/Baguette/Infrastructure/Server/Server.swift:28 — /// POST /simulators/:udid/input → gesture (TODO) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment Sources/Baguette/Infrastructure/Server/Server.swift:33 — /// WS /simulators/:udid/stream?format= → frames (TODO) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D3 · God Classes · FunctionTooLong · ×2
  • FunctionTooLong: sim-file-drop.attach Sources/Baguette/Resources/Web/sim-file-drop.js:203 — FunctionTooLong — attach runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: farm-focus.FarmFocus.show Sources/Baguette/Resources/Web/farm/farm-focus.js:51 — FunctionTooLong — FarmFocus.show runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium CVE · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×2
  • Edited copy of a member (23 corresponding lines) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:440 — Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:440-462 | Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:558-581 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:2667 — Sources/Baguette/Infrastructure/Server/Server.swift:2667-2689 | Sources/Baguette/Infrastructure/Server/Server.swift:2738-2762 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:258 — Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:258-274 | Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:278-296 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:3385 — Sources/Baguette/Infrastructure/Server/Server.swift:3385-3405 | Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:419-435 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) Companion/DeviceTwin/Wire/Sources/TwinTransport.swift:59 — Companion/DeviceTwin/Wire/Sources/TwinTransport.swift:59-70 | Companion/DeviceTwin/Wire/Sources/TwinTransport.swift:97-108 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:2700 — Sources/Baguette/Infrastructure/Server/Server.swift:2700-2712 | Sources/Baguette/Infrastructure/Server/Server.swift:2725-2736 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift:37 — Sources/Baguette/Infrastructure/Render/DeviceModelRoots.swift:37-45 | Sources/Baguette/Infrastructure/Server/WebRoot.swift:79-94 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) Sources/Baguette/Infrastructure/Hinge/GuestHingeMotor.swift:56 — Sources/Baguette/Infrastructure/Hinge/GuestHingeMotor.swift:56-64 | Sources/Baguette/Infrastructure/Hinge/SharedHinge.swift:111-122 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:294 — Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:294-303 | Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:316-325 | Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:327-338 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) Sources/Baguette/Domain/Render/ScreenQuad.swift:190 — Sources/Baguette/Domain/Render/ScreenQuad.swift:190-199 | Sources/Baguette/Domain/Render/ScreenQuad.swift:201-210 | Sources/Baguette/Domain/Render/ScreenQuad.swift:212-221 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) Sources/Baguette/Domain/Accessibility/AXHitTestGrid.swift:68 — Sources/Baguette/Domain/Accessibility/AXHitTestGrid.swift:68-72 | Sources/Baguette/Domain/Accessibility/AXNode.swift:100-106 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:1265 — Sources/Baguette/Infrastructure/Server/Server.swift:1265-1269 | Sources/Baguette/Infrastructure/Stream/ControlChannel.swift:107-111 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 3+ corresponding lines) Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:41 — Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:41-43 | Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:81-83 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:43-45 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Sources/Baguette/Domain/Location/LocationRoute.swift:53 — Sources/Baguette/Domain/Location/LocationRoute.swift:53-55 | Sources/Baguette/Domain/Simulator/SimulatorDefinition.swift:493-495 | Sources/Baguette/Infrastructure/Hinge/GuestHingeMotor.swift:172-174 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×2
  • Edited copy of a member (4 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:76 — Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:76-79 | Sources/Baguette/Infrastructure/Render/RenderedScreen.swift:34-37 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift:73 — Sources/Baguette/Infrastructure/Plugin/PluginRoot.swift:73-77 | Sources/Baguette/Infrastructure/Simulator/CoreSimulators.swift:177-180 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) Sources/Baguette/App/Commands/LocationCommand.swift:45 — Sources/Baguette/App/Commands/LocationCommand.swift:45-55 | Sources/Baguette/App/Commands/LocationCommand.swift:97-107 | Sources/Baguette/App/Commands/LocationCommand.swift:155-165 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/LocationCommand.swift:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:45 — Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:45-55 | Sources/Baguette/Infrastructure/Shake/SimctlShake.swift:37-47 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:78-88 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×2
  • Duplicated block (10 lines × 2 locations) Sources/Baguette/Resources/Web/farm/farm-app.js:164 — Sources/Baguette/Resources/Web/farm/farm-app.js:164 · Sources/Baguette/Resources/Web/farm/farm-app.js:305 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:2567 — Sources/Baguette/Resources/Web/sim-native.js:2567 · Sources/Baguette/Resources/Web/sim-native.js:2626 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (8 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-camera.js:67 — Sources/Baguette/Resources/Web/sim-camera.js:67 · Sources/Baguette/Resources/Web/sim-defaults.js:64 — the two spans are one implementation copied and then locally edited — 57 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 (8 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-camera.js:79 — Sources/Baguette/Resources/Web/sim-camera.js:79 · Sources/Baguette/Resources/Web/sim-logs.js:207 — the two spans are one implementation copied and then locally edited — 52 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 (6 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (6 matched lines × 2 locations) Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:62 — Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:62 · Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:132 — the two spans are one implementation copied and then locally edited — 86 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (6 matched lines × 2 locations) Sources/Baguette/Resources/Web/plugin-control.js:139 — Sources/Baguette/Resources/Web/plugin-control.js:139 · Sources/Baguette/Resources/Web/plugin-control.js:165 — the two spans are one implementation copied and then locally edited — 62 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 13, cognitive 12) · ×2
  • Complex function (anonymous) (cyclomatic 13, cognitive 12) Sources/Baguette/Resources/Web/sim-plugins.js:804 — (anonymous) has cyclomatic complexity 13 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.
  • Complex function (anonymous) (cyclomatic 13, cognitive 12) Sources/Baguette/Resources/Web/sim-plugins.js:956 — (anonymous) has cyclomatic complexity 13 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 paintComposite (cyclomatic 13, cognitive 10) · ×2
  • Complex function paintComposite (cyclomatic 13, cognitive 10) Sources/Baguette/Resources/Web/capture/capture-composer.js:113 — paintComposite has cyclomatic complexity 13 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.
  • Complex function paintComposite (cyclomatic 13, cognitive 10) Sources/Baguette/Resources/Web/recorder.js:124 — paintComposite has cyclomatic complexity 13 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) Sources/Baguette/Resources/Web/sim-camera.js:120 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) Sources/Baguette/Resources/Web/sim-logs.js:263 — `catch (_)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×1
  • Heading level jumps from h2 to h4 Sources/Baguette/Resources/Web/farm/farm-focus.js:73 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus Sources/Baguette/Resources/Web/capture/capture-size-menu.js:174 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.7 · ×1
  • Low contrast colour pair in CSS (3.7:1) Sources/Baguette/Resources/Web/farm/farm.css:325 — `.view-toggle button` sets color: #6a7686 on background-color: #161c25 — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · Server.registerRoutes (cyclomatic 121) · ×1
  • Server.registerRoutes (cyclomatic 121) Sources/Baguette/Infrastructure/Server/Server.swift:142 — Server.registerRoutes has cyclomatic complexity 121 (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. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · DeviceModelDefinition.validate (cyclomatic 39) · ×1
  • DeviceModelDefinition.validate (cyclomatic 39) Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:297 — DeviceModelDefinition.validate has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Server.live3DStreamWS (cyclomatic 37) · ×1
  • Server.live3DStreamWS (cyclomatic 37) Sources/Baguette/Infrastructure/Server/Server.swift:2804 — Server.live3DStreamWS has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · farm-tile.FarmTile._mountIn (cyclomatic 36) · ×1
  • farm-tile.FarmTile._mountIn (cyclomatic 36) Sources/Baguette/Resources/Web/farm/farm-tile.js:131 — farm-tile.FarmTile._mountIn has cyclomatic complexity 36 (threshold 15). Of this number, 30 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sim-native.wireUnload (cyclomatic 36) · ×1
  • sim-native.wireUnload (cyclomatic 36) Sources/Baguette/Resources/Web/sim-native.js:2729 — sim-native.wireUnload has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to one function literal inside it that branches (line 2730). 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 · sim-native.toggle3D (cyclomatic 34) · ×1
  • sim-native.toggle3D (cyclomatic 34) Sources/Baguette/Resources/Web/sim-native.js:2639 — sim-native.toggle3D has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Server.registerDeviceTwinRoutes (cyclomatic 32) · ×1
  • Server.registerDeviceTwinRoutes (cyclomatic 32) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:23 — Server.registerDeviceTwinRoutes has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MouseGestureSource._bind (cyclomatic 32) · ×1
  • MouseGestureSource._bind (cyclomatic 32) Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:89 — MouseGestureSource._bind has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 199, end, a function literal at line 119, …). 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 · sim-native.boot (cyclomatic 31) · ×1
  • sim-native.boot (cyclomatic 31) Sources/Baguette/Resources/Web/sim-native.js:310 — sim-native.boot has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sim-3d.Sim3DPanel.start (cyclomatic 30) · ×1
  • sim-3d.Sim3DPanel.start (cyclomatic 30) Sources/Baguette/Resources/Web/sim-3d.js:366 — sim-3d.Sim3DPanel.start has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body's own statements and 15 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Server.twinLive3DStreamWS (cyclomatic 29) · ×1
  • Server.twinLive3DStreamWS (cyclomatic 29) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:441 — Server.twinLive3DStreamWS has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CarPlayFrameDefinition.parse (cyclomatic 29) · ×1
  • CarPlayFrameDefinition.parse (cyclomatic 29) Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js:47 — CarPlayFrameDefinition.parse has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CaptureSizeMenu._renderPopover (cyclomatic 29) · ×1
  • CaptureSizeMenu._renderPopover (cyclomatic 29) Sources/Baguette/Resources/Web/capture/capture-size-menu.js:245 — CaptureSizeMenu._renderPopover has cyclomatic complexity 29 (threshold 15). Of this number, 20 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 · sim-stream.startStream (cyclomatic 29) · ×1
  • sim-stream.startStream (cyclomatic 29) Sources/Baguette/Resources/Web/sim-stream.js:167 — sim-stream.startStream has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 11 of the 29 points are its own statements and the rest belongs to 5 function items inside it that branch (onStreamText, openSession, a function literal at line 183, …). 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 · Fill.attempt (cyclomatic 27) · ×1
  • Fill.attempt (cyclomatic 27) Sources/Baguette/Domain/Input/Fill.swift:45 — Fill.attempt has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · stream-session.StreamSession.start (cyclomatic 27) · ×1
  • stream-session.StreamSession.start (cyclomatic 27) Sources/Baguette/Resources/Web/stream-session.js:36 — stream-session.StreamSession.start has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 7 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (paint, a function literal at line 81, a function literal at line 64, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · wireActions (cyclomatic 27) · ×1
  • wireActions (cyclomatic 27) Sources/Baguette/Resources/Web/sim-native.js:2249 — wireActions has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 30 function items inside it that branch (__nativeSetFormat, __nativeRotate, __nativeHandheldAction, …). 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 · TouchGestureSource._bind (cyclomatic 24) · ×1
  • TouchGestureSource._bind (cyclomatic 24) Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:24 — TouchGestureSource._bind 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 3 function items inside it that branch (a function literal at line 103, a function literal at line 55, endTouch). 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 · AvccDecoder.feed (cyclomatic 23) · ×1
  • AvccDecoder.feed (cyclomatic 23) Sources/Baguette/Resources/Web/frame-decoder.js:43 — AvccDecoder.feed has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Server.logsWS (cyclomatic 22) · ×1
  • Server.logsWS (cyclomatic 22) Sources/Baguette/Infrastructure/Server/Server.swift:3252 — Server.logsWS has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · DefaultsPanel._onClick (cyclomatic 22) · ×1
  • DefaultsPanel._onClick (cyclomatic 22) Sources/Baguette/Resources/Web/sim-defaults.js:520 — DefaultsPanel._onClick has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to 2 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 · sim-file-drop.attach (cyclomatic 22) · ×1
  • sim-file-drop.attach (cyclomatic 22) Sources/Baguette/Resources/Web/sim-file-drop.js:203 — sim-file-drop.attach has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 272, 257, 263, …). 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 · frame-decoder.AvccDecoder.feed (cyclomatic 21) · ×1
  • frame-decoder.AvccDecoder.feed (cyclomatic 21) Sources/Baguette/Resources/Web/frame-decoder.js:43 — frame-decoder.AvccDecoder.feed has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DefaultsPanel._onChange (cyclomatic 20) · ×1
  • DefaultsPanel._onChange (cyclomatic 20) Sources/Baguette/Resources/Web/sim-defaults.js:568 — DefaultsPanel._onChange has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · rowsHTML (cyclomatic 20) · ×1
  • rowsHTML (cyclomatic 20) Sources/Baguette/Resources/Web/sim-plugins.js:886 — rowsHTML has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 902, 894, 895). 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 · ResultRow.parsing (cyclomatic 19) · ×1
  • ResultRow.parsing (cyclomatic 19) Sources/Baguette/Domain/Plugin/PluginResult.swift:119 — ResultRow.parsing has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Server.isTrustedBrowserRequest (cyclomatic 19) · ×1
  • Server.isTrustedBrowserRequest (cyclomatic 19) Sources/Baguette/Infrastructure/Server/Server.swift:3456 — Server.isTrustedBrowserRequest has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · Server.twinStreamWS (cyclomatic 19) · ×1
  • Server.twinStreamWS (cyclomatic 19) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:339 — Server.twinStreamWS has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sim-native.fetchDeviceMeta (cyclomatic 19) · ×1
  • sim-native.fetchDeviceMeta (cyclomatic 19) Sources/Baguette/Resources/Web/sim-native.js:1644 — sim-native.fetchDeviceMeta has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: sim-native.wireActions (cyclomatic 24) 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 · DiagDigitizerTrackpadCommand.probe (cyclomatic 18) · ×1
  • DiagDigitizerTrackpadCommand.probe (cyclomatic 18) Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:356 — DiagDigitizerTrackpadCommand.probe has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Server.registerPluginRoutes (cyclomatic 18) · ×1
  • Server.registerPluginRoutes (cyclomatic 18) Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift:24 — Server.registerPluginRoutes 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 · chrome-lab.swift.capture (cyclomatic 18) · ×1
  • chrome-lab.swift.capture (cyclomatic 18) docs/features/chrome-bezel/scripts/chrome-lab.swift:338 — chrome-lab.swift.capture has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OptionHoverPreview._bind (cyclomatic 18) · ×1
  • OptionHoverPreview._bind (cyclomatic 18) Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:54 — OptionHoverPreview._bind has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 71, 81, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · farm-app.FarmApp.select (cyclomatic 18) · ×1
  • farm-app.FarmApp.select (cyclomatic 18) Sources/Baguette/Resources/Web/farm/farm-app.js:245 — farm-app.FarmApp.select has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sim-3d.Sim3DPanel.attach (cyclomatic 18) · ×1
  • sim-3d.Sim3DPanel.attach (cyclomatic 18) Sources/Baguette/Resources/Web/sim-3d.js:57 — sim-3d.Sim3DPanel.attach has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · enterHandheld (cyclomatic 18) · ×1
  • enterHandheld (cyclomatic 18) Sources/Baguette/Resources/Web/sim-native.js:522 — enterHandheld 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 · Server.handleUpload (cyclomatic 17) · ×1
  • Server.handleUpload (cyclomatic 17) Sources/Baguette/Infrastructure/Server/Server.swift:1729 — Server.handleUpload 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. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · Server.handleCameraLine (cyclomatic 17) · ×1
  • Server.handleCameraLine (cyclomatic 17) Sources/Baguette/Infrastructure/Server/ServerCameraRoutes.swift:136 — Server.handleCameraLine has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sim-native.renderPowerCard (cyclomatic 17) · ×1
  • sim-native.renderPowerCard (cyclomatic 17) Sources/Baguette/Resources/Web/sim-native.js:1370 — sim-native.renderPowerCard has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: sim-native.wireActions (cyclomatic 24) 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 · PluginPanels.mountPrompt (cyclomatic 17) · ×1
  • PluginPanels.mountPrompt (cyclomatic 17) Sources/Baguette/Resources/Web/sim-plugins.js:754 — PluginPanels.mountPrompt has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 804, retype). 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. This is NOT this file's highest cyclomatic complexity: PluginPanels.rowsHTML (cyclomatic 20) 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 · PluginPanels.wireRows (cyclomatic 17) · ×1
  • PluginPanels.wireRows (cyclomatic 17) Sources/Baguette/Resources/Web/sim-plugins.js:947 — PluginPanels.wireRows has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 956). 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. This is NOT this file's highest cyclomatic complexity: PluginPanels.rowsHTML (cyclomatic 20) 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 · AXTarget.find (cyclomatic 16) · ×1
  • AXTarget.find (cyclomatic 16) Sources/Baguette/Domain/Accessibility/AXTarget.swift:46 — AXTarget.find has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · StatusBarOverride.fromListOutput (cyclomatic 16) · ×1
  • StatusBarOverride.fromListOutput (cyclomatic 16) Sources/Baguette/Domain/StatusBar/StatusBarOverride.swift:89 — StatusBarOverride.fromListOutput has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StatusBarOverride.jsonString (cyclomatic 16) · ×1
  • StatusBarOverride.jsonString (cyclomatic 16) Sources/Baguette/Domain/StatusBar/StatusBarOverride.swift:129 — StatusBarOverride.jsonString has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VerifiedDeviceAssets.resolve (cyclomatic 16) · ×1
  • VerifiedDeviceAssets.resolve (cyclomatic 16) Sources/Baguette/Infrastructure/Render/VerifiedDeviceAssets.swift:25 — VerifiedDeviceAssets.resolve has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Server.streamWS (cyclomatic 16) · ×1
  • Server.streamWS (cyclomatic 16) Sources/Baguette/Infrastructure/Server/Server.swift:3045 — Server.streamWS has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: Sources/Baguette/Infrastructure/Server/Server.swift holds 6 of the 51 methods over the threshold — including the worst — and 142 of the 481 points over it (30%), 2.2× the next-largest file (Sources/Baguette/Resources/Web/sim-native.js at 64). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · SimulatorKitScreenOrientation.readScreen (cyclomatic 16) · ×1
  • SimulatorKitScreenOrientation.readScreen (cyclomatic 16) Sources/Baguette/Infrastructure/Simulator/SimulatorKitScreenOrientation.swift:40 — SimulatorKitScreenOrientation.readScreen has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CameraPanel._onMessage (cyclomatic 16) · ×1
  • CameraPanel._onMessage (cyclomatic 16) Sources/Baguette/Resources/Web/sim-camera.js:118 — CameraPanel._onMessage has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sim-native.remapEnvelopeToPortrait (cyclomatic 16) · ×1
  • sim-native.remapEnvelopeToPortrait (cyclomatic 16) Sources/Baguette/Resources/Web/sim-native.js:217 — sim-native.remapEnvelopeToPortrait has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, 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: sim-native.wireActions (cyclomatic 24) 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 · sim-native.downloadSnapshot (cyclomatic 16) · ×1
  • sim-native.downloadSnapshot (cyclomatic 16) Sources/Baguette/Resources/Web/sim-native.js:2956 — sim-native.downloadSnapshot has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: sim-native.wireActions (cyclomatic 24) 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 · exitHandheld (cyclomatic 16) · ×1
  • exitHandheld (cyclomatic 16) Sources/Baguette/Resources/Web/sim-native.js:554 — exitHandheld has cyclomatic complexity 16 (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.
D2 · Cognitive Complexity · Server.registerRoutes (cognitive 92) · ×1
  • Server.registerRoutes (cognitive 92) Sources/Baguette/Infrastructure/Server/Server.swift:142 — Server.registerRoutes has cognitive complexity 92 (threshold 15). Drivers by points: if/else 48 (54 pts), match/switch 13, error handling 8 (11 pts), boolean chains 5, ternaries 4 (5 pts), loops 4 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Server.live3DStreamWS (cognitive 81) · ×1
  • Server.live3DStreamWS (cognitive 81) Sources/Baguette/Infrastructure/Server/Server.swift:2804 — Server.live3DStreamWS has cognitive complexity 81 (threshold 15). Drivers by points: if/else 22 (53 pts), error handling 9 (16 pts), boolean chains 6, ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 41). Of this number, 80 points are the body's own statements and 1 belongs to one function item 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 · Server.twinLive3DStreamWS (cognitive 55) · ×1
  • Server.twinLive3DStreamWS (cognitive 55) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:441 — Server.twinLive3DStreamWS has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (35 pts), error handling 6 (10 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeviceModelDefinition.validate (cognitive 54) · ×1
  • DeviceModelDefinition.validate (cognitive 54) Sources/Baguette/Domain/Render/DeviceModelDefinition.swift:297 — DeviceModelDefinition.validate has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (30 pts), boolean chains 16, loops 5 (8 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sim-native.toggle3D (cognitive 50) · ×1
  • sim-native.toggle3D (cognitive 50) Sources/Baguette/Resources/Web/sim-native.js:2639 — sim-native.toggle3D has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 8, ternaries 2 (6 pts) (nesting depth added 20). Of this number, 47 points are the body's own statements and 3 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 · Server.registerDeviceTwinRoutes (cognitive 45) · ×1
  • Server.registerDeviceTwinRoutes (cognitive 45) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:23 — Server.registerDeviceTwinRoutes has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (32 pts), ternaries 5, match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farm-tile.FarmTile._mountIn (cognitive 43) · ×1
  • farm-tile.FarmTile._mountIn (cognitive 43) Sources/Baguette/Resources/Web/farm/farm-tile.js:131 — farm-tile.FarmTile._mountIn has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 12, error handling 2 (7 pts) (nesting depth added 17). Of this number, 37 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Fill.attempt (cognitive 39) · ×1
  • Fill.attempt (cognitive 39) Sources/Baguette/Domain/Input/Fill.swift:45 — Fill.attempt has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (33 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 12). Of this number, 28 points are the body's own statements and 11 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.twinStreamWS (cognitive 38) · ×1
  • Server.twinStreamWS (cognitive 38) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:339 — Server.twinStreamWS has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (21 pts), error handling 4 (7 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _bind (cognitive 37) · ×1
  • _bind (cognitive 37) Sources/Baguette/Resources/Web/baguette/gestures/mouse-gesture-source.js:89 — _bind has cognitive complexity 37 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 5). None of this is in the body itself: all 37 points belong to 7 function items inside it that branch (a function literal at line 199, end, a function literal at line 119, …). 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 · sim-native.wireUnload (cognitive 35) · ×1
  • sim-native.wireUnload (cognitive 35) Sources/Baguette/Resources/Web/sim-native.js:2729 — sim-native.wireUnload has cognitive complexity 35 (threshold 15). Drivers by points: error handling 19, if/else 16. None of this is in the body itself: all 35 points belong to one function literal inside it that branches (line 2730). 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 · boot (cognitive 34) · ×1
  • boot (cognitive 34) Sources/Baguette/Resources/Web/sim-native.js:310 — boot has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 9, ternaries 5 (6 pts), error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AvccDecoder.feed (cognitive 33) · ×1
  • AvccDecoder.feed (cognitive 33) Sources/Baguette/Resources/Web/frame-decoder.js:43 — AvccDecoder.feed has cognitive complexity 33 (threshold 15). Drivers by points: error handling 4 (9 pts), boolean chains 8, if/else 7 (8 pts), ternaries 3 (8 pts) (nesting depth added 11). Of this number, 24 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StatusBarOverride.fromListOutput (cognitive 32) · ×1
  • StatusBarOverride.fromListOutput (cognitive 32) Sources/Baguette/Domain/StatusBar/StatusBarOverride.swift:89 — StatusBarOverride.fromListOutput has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TouchGestureSource._bind (cognitive 32) · ×1
  • TouchGestureSource._bind (cognitive 32) Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:24 — TouchGestureSource._bind has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (26 pts), boolean chains 5, ternaries 1 (nesting depth added 7). None of this is in the body itself: all 32 points belong to 3 function items inside it that branch (a function literal at line 103, a function literal at line 55, endTouch). 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 · start (cognitive 32) · ×1
  • start (cognitive 32) Sources/Baguette/Resources/Web/sim-3d.js:366 — start has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 11, ternaries 4 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (onText, onFps, onLog, …). 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 · Server.logsWS (cognitive 31) · ×1
  • Server.logsWS (cognitive 31) Sources/Baguette/Infrastructure/Server/Server.swift:3252 — Server.logsWS has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (5 pts), boolean chains 3, error handling 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wireActions (cognitive 31) · ×1
  • wireActions (cognitive 31) Sources/Baguette/Resources/Web/sim-native.js:2249 — wireActions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8, error handling 4 (5 pts), ternaries 1 (nesting depth added 3). None of this is in the body itself: all 31 points belong to 30 function items inside it that branch (__nativeSetFormat, __nativeRotate, __nativeHandheldAction, …). 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 · startStream (cognitive 31) · ×1
  • startStream (cognitive 31) Sources/Baguette/Resources/Web/sim-stream.js:167 — startStream has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 13, if/else 11 (12 pts), error handling 2 (3 pts), ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 9 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (onStreamText, openSession, openSession::onSize, …). 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 · _renderPopover (cognitive 30) · ×1
  • _renderPopover (cognitive 30) Sources/Baguette/Resources/Web/capture/capture-size-menu.js:245 — _renderPopover has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 16 (18 pts), boolean chains 6, if/else 6 (nesting depth added 2). Of this number, 19 points are the body's own statements and 11 belong to 13 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · _render (cognitive 29) · ×1
  • _render (cognitive 29) Sources/Baguette/Resources/Web/sim-logs.js:311 — _render has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (7 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CarPlayFrameDefinition.parse (cognitive 27) · ×1
  • CarPlayFrameDefinition.parse (cognitive 27) Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js:47 — CarPlayFrameDefinition.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11, boolean chains 10, ternaries 6. Of this number, 18 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, 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 · Server.streamWS (cognitive 26) · ×1
  • Server.streamWS (cognitive 26) Sources/Baguette/Infrastructure/Server/Server.swift:3045 — Server.streamWS has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 4 (6 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chrome-lab.swift.resample (cognitive 26) · ×1
  • chrome-lab.swift.resample (cognitive 26) docs/features/chrome-bezel/scripts/chrome-lab.swift:279 — chrome-lab.swift.resample has cognitive complexity 26 (threshold 15). Drivers by points: loops 6 (18 pts), if/else 1 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · chrome-lab.swift.capture (cognitive 26) · ×1
  • chrome-lab.swift.capture (cognitive 26) docs/features/chrome-bezel/scripts/chrome-lab.swift:338 — chrome-lab.swift.capture has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 9). Of this number, 14 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sim-file-drop.attach (cognitive 26) · ×1
  • sim-file-drop.attach (cognitive 26) Sources/Baguette/Resources/Web/sim-file-drop.js:203 — sim-file-drop.attach has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 272, 257, 263, …). 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 · exitHandheld (cognitive 26) · ×1
  • exitHandheld (cognitive 26) Sources/Baguette/Resources/Web/sim-native.js:554 — exitHandheld has cognitive complexity 26 (threshold 15). Drivers by points: error handling 3 (11 pts), if/else 8 (11 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiagDigitizerTrackpadCommand.run (cognitive 25) · ×1
  • DiagDigitizerTrackpadCommand.run (cognitive 25) Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:153 — DiagDigitizerTrackpadCommand.run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (5 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.handleCameraLine (cognitive 25) · ×1
  • Server.handleCameraLine (cognitive 25) Sources/Baguette/Infrastructure/Server/ServerCameraRoutes.swift:136 — Server.handleCameraLine has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (6 pts), match/switch 2 (3 pts), boolean chains 1, 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 · _onMessage (cognitive 25) · ×1
  • _onMessage (cognitive 25) Sources/Baguette/Resources/Web/sim-camera.js:118 — _onMessage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 3 (6 pts), boolean chains 4, error handling 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResultRow.parsing (cognitive 24) · ×1
  • ResultRow.parsing (cognitive 24) Sources/Baguette/Domain/Plugin/PluginResult.swift:119 — ResultRow.parsing has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, ternaries 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiagDigitizerTrackpadCommand.probe (cognitive 23) · ×1
  • DiagDigitizerTrackpadCommand.probe (cognitive 23) Sources/Baguette/App/Commands/DiagDigitizerTrackpadCommand.swift:356 — DiagDigitizerTrackpadCommand.probe has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), ternaries 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RenderedFoldable.render (cognitive 23) · ×1
  • RenderedFoldable.render (cognitive 23) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:219 — RenderedFoldable.render has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 4 (8 pts), error handling 1 (2 pts), boolean chains 1, loops 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 · frame-decoder.AvccDecoder.feed (cognitive 23) · ×1
  • frame-decoder.AvccDecoder.feed (cognitive 23) Sources/Baguette/Resources/Web/frame-decoder.js:43 — frame-decoder.AvccDecoder.feed has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), error handling 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 4). Of this number, 19 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _onMessage (cognitive 23) · ×1
  • _onMessage (cognitive 23) Sources/Baguette/Resources/Web/sim-logs.js:261 — _onMessage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (7 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoFileCapture.pump (cognitive 21) · ×1
  • VideoFileCapture.pump (cognitive 21) Sources/Baguette/Infrastructure/Camera/VideoFileCapture.swift:62 — VideoFileCapture.pump has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RenderedScreen.render (cognitive 21) · ×1
  • RenderedScreen.render (cognitive 21) Sources/Baguette/Infrastructure/Render/RenderedScreen.swift:96 — RenderedScreen.render has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 3 (6 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.addFile (cognitive 21) · ×1
  • Server.addFile (cognitive 21) Sources/Baguette/Infrastructure/Server/Server.swift:1800 — Server.addFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chrome-lab.swift.gaussianBlur (cognitive 21) · ×1
  • chrome-lab.swift.gaussianBlur (cognitive 21) docs/features/chrome-bezel/scripts/chrome-lab.swift:261 — chrome-lab.swift.gaussianBlur has cognitive complexity 21 (threshold 15). Drivers by points: loops 8 (20 pts), if/else 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DefaultsPanel._onChange (cognitive 21) · ×1
  • DefaultsPanel._onChange (cognitive 21) Sources/Baguette/Resources/Web/sim-defaults.js:568 — DefaultsPanel._onChange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Render3DCommand.run (cognitive 20) · ×1
  • Render3DCommand.run (cognitive 20) Sources/Baguette/App/Commands/Render3DCommand.swift:85 — Render3DCommand.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TwinScreen.ingest (cognitive 20) · ×1
  • TwinScreen.ingest (cognitive 20) Sources/Baguette/Infrastructure/Device/TwinScreen.swift:55 — TwinScreen.ingest has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (10 pts), if/else 5 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · sim-native.fetchDeviceMeta (cognitive 20) · ×1
  • sim-native.fetchDeviceMeta (cognitive 20) Sources/Baguette/Resources/Web/sim-native.js:1644 — sim-native.fetchDeviceMeta has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), error handling 2 (3 pts) (nesting depth added 3). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, 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 · attach (cognitive 20) · ×1
  • attach (cognitive 20) Sources/Baguette/Resources/Web/sim-3d.js:57 — attach has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (6 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 2). Of this number, 19 points are the body's own statements and 1 belongs to 3 function items inside it that branch. To reduce it, 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 · enterHandheld (cognitive 20) · ×1
  • enterHandheld (cognitive 20) Sources/Baguette/Resources/Web/sim-native.js:522 — enterHandheld has cognitive complexity 20 (threshold 15). Drivers by points: error handling 3 (8 pts), if/else 6 (7 pts), boolean chains 5 (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 · AXFirstScreen.run (cognitive 19) · ×1
  • AXFirstScreen.run (cognitive 19) Sources/Baguette/Domain/Accessibility/AXFirstScreen.swift:30 — AXFirstScreen.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 5, 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 · VerifiedDeviceAssets.resolve (cognitive 19) · ×1
  • VerifiedDeviceAssets.resolve (cognitive 19) Sources/Baguette/Infrastructure/Render/VerifiedDeviceAssets.swift:25 — VerifiedDeviceAssets.resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 3 (4 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimulatorKitFramebufferPorts.sizedPorts (cognitive 19) · ×1
  • SimulatorKitFramebufferPorts.sizedPorts (cognitive 19) Sources/Baguette/Infrastructure/Simulator/SimulatorKitFramebufferPorts.swift:18 — SimulatorKitFramebufferPorts.sizedPorts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OptionHoverPreview._bind (cognitive 19) · ×1
  • OptionHoverPreview._bind (cognitive 19) Sources/Baguette/Resources/Web/baguette/gestures/option-hover-preview.js:54 — OptionHoverPreview._bind has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3 (nesting depth added 4). None of this is in the body itself: all 19 points belong to 4 function literals inside it that branch (lines 71, 81, 91, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · InputCommand.run (cognitive 18) · ×1
  • InputCommand.run (cognitive 18) Sources/Baguette/App/Commands/InputCommand.swift:53 — InputCommand.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), error handling 3, boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScreenshotCommand.validateOutputPaths (cognitive 18) · ×1
  • ScreenshotCommand.validateOutputPaths (cognitive 18) Sources/Baguette/App/Commands/ScreenshotCommand.swift:152 — ScreenshotCommand.validateOutputPaths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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 · Server.isTrustedBrowserRequest (cognitive 18) · ×1
  • Server.isTrustedBrowserRequest (cognitive 18) Sources/Baguette/Infrastructure/Server/Server.swift:3456 — Server.isTrustedBrowserRequest has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ControlChannel.handle (cognitive 18) · ×1
  • ControlChannel.handle (cognitive 18) Sources/Baguette/Infrastructure/Stream/ControlChannel.swift:55 — ControlChannel.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farm-app.FarmApp.select (cognitive 18) · ×1
  • farm-app.FarmApp.select (cognitive 18) Sources/Baguette/Resources/Web/farm/farm-app.js:245 — farm-app.FarmApp.select has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 3 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · locate (cognitive 18) · ×1
  • locate (cognitive 18) Sources/Baguette/Resources/Web/baguette/gestures/screen-quad.js:82 — locate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 5). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AXTarget.find (cognitive 17) · ×1
  • AXTarget.find (cognitive 17) Sources/Baguette/Domain/Accessibility/AXTarget.swift:46 — AXTarget.find has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PreferenceLookups.init (cognitive 17) · ×1
  • PreferenceLookups.init (cognitive 17) Sources/Baguette/Domain/Defaults/PreferenceLookups.swift:73 — PreferenceLookups.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IndigoHIDInput.sendMouse (cognitive 17) · ×1
  • IndigoHIDInput.sendMouse (cognitive 17) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:588 — IndigoHIDInput.sendMouse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), ternaries 2, boolean chains 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 · SimctlCapture.run (cognitive 17) · ×1
  • SimctlCapture.run (cognitive 17) Sources/Baguette/Infrastructure/Simulator/SimctlCapture.swift:43 — SimctlCapture.run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (2 pts), error handling 1, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · H264Encoder.rebuildSession (cognitive 17) · ×1
  • H264Encoder.rebuildSession (cognitive 17) Sources/Baguette/Infrastructure/Stream/H264Encoder.swift:194 — H264Encoder.rebuildSession has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 3, ternaries 3, loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · audit.audit (cognitive 17) · ×1
  • audit.audit (cognitive 17) Sources/Baguette/Resources/Plugins/a11y/bin/audit.py:82 — audit.audit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · farm-focus.FarmFocus._toggleRecord (cognitive 17) · ×1
  • farm-focus.FarmFocus._toggleRecord (cognitive 17) Sources/Baguette/Resources/Web/farm/farm-focus.js:265 — farm-focus.FarmFocus._toggleRecord has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sim-native.toggleNetwork (cognitive 17) · ×1
  • sim-native.toggleNetwork (cognitive 17) Sources/Baguette/Resources/Web/sim-native.js:2490 — sim-native.toggleNetwork has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sim-native.toggleDefaults) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sim-native.toggleDefaults (cognitive 17) · ×1
  • sim-native.toggleDefaults (cognitive 17) Sources/Baguette/Resources/Web/sim-native.js:2552 — sim-native.toggleDefaults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sim-native.toggleNetwork) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PluginPanels.mountPrompt (cognitive 17) · ×1
  • PluginPanels.mountPrompt (cognitive 17) Sources/Baguette/Resources/Web/sim-plugins.js:754 — PluginPanels.mountPrompt has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 804, retype). 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 · sim-stream._simToggleRecord (cognitive 17) · ×1
  • sim-stream._simToggleRecord (cognitive 17) Sources/Baguette/Resources/Web/sim-stream.js:516 — sim-stream._simToggleRecord has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · stream-session.StreamSession.start · ×1
  • stream-session.StreamSession.start::paint (cognitive 17) Sources/Baguette/Resources/Web/stream-session.js:100 — stream-session.StreamSession.start::paint has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _uploadFile (cognitive 17) · ×1
  • _uploadFile (cognitive 17) Sources/Baguette/Resources/Web/sim-camera.js:379 — _uploadFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, error handling 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 3 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · rowsHTML (cognitive 17) · ×1
  • rowsHTML (cognitive 17) Sources/Baguette/Resources/Web/sim-plugins.js:886 — rowsHTML has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 12 (13 pts), boolean chains 3, if/else 1 (nesting depth added 1). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 902, 894, 895). 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 · AXNode.agentSummary (cognitive 16) · ×1
  • AXNode.agentSummary (cognitive 16) Sources/Baguette/Domain/Accessibility/AXAffordance.swift:123 — AXNode.agentSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PreferenceValue.init (cognitive 16) · ×1
  • PreferenceValue.init (cognitive 16) Sources/Baguette/Domain/Defaults/PreferenceValue.swift:71 — PreferenceValue.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 7). 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 · ConnectedScreens.observedPhone (cognitive 16) · ×1
  • ConnectedScreens.observedPhone (cognitive 16) Sources/Baguette/Domain/Screen/ConnectedScreens.swift:33 — ConnectedScreens.observedPhone has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · IndigoHIDInput.swipeFromBottomEdge (cognitive 16) · ×1
  • IndigoHIDInput.swipeFromBottomEdge (cognitive 16) Sources/Baguette/Infrastructure/Input/IndigoHIDInput.swift:478 — IndigoHIDInput.swipeFromBottomEdge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Server.twinVideoWS (cognitive 16) · ×1
  • Server.twinVideoWS (cognitive 16) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:291 — Server.twinVideoWS has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (7 pts), if/else 2 (5 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sim-native.toggleNotify (cognitive 16) · ×1
  • sim-native.toggleNotify (cognitive 16) Sources/Baguette/Resources/Web/sim-native.js:2526 — sim-native.toggleNotify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sim-native.downloadSnapshot (cognitive 16) · ×1
  • sim-native.downloadSnapshot (cognitive 16) Sources/Baguette/Resources/Web/sim-native.js:2956 — sim-native.downloadSnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5 (nesting depth added 2). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PluginPanels.wireRows (cognitive 16) · ×1
  • PluginPanels.wireRows (cognitive 16) Sources/Baguette/Resources/Web/sim-plugins.js:947 — PluginPanels.wireRows has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 1. Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 956). 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 · renderPowerCard (cognitive 16) · ×1
  • renderPowerCard (cognitive 16) Sources/Baguette/Resources/Web/sim-native.js:1370 — renderPowerCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:85 — Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:85-125 | Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:264-288 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) Sources/Baguette/Domain/Accessibility/AXFirstScreen.swift:30 — Sources/Baguette/Domain/Accessibility/AXFirstScreen.swift:30-67 | Sources/Baguette/Domain/Accessibility/AXSettle.swift:35-64 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:2587 — Sources/Baguette/Infrastructure/Server/Server.swift:2587-2625 | Sources/Baguette/Infrastructure/Server/Server.swift:2627-2665 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:90 — Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:90-121 | Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:87-118 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:50-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:219 — Sources/Baguette/Infrastructure/Render/RenderedFoldable.swift:219-248 | Sources/Baguette/Infrastructure/Render/RenderedScreen.swift:96-124 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) Sources/Baguette/App/CopyDispatch.swift:50 — Sources/Baguette/App/CopyDispatch.swift:50-70 | Sources/Baguette/App/PasteDispatch.swift:44-66 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:3204 — Sources/Baguette/Infrastructure/Server/Server.swift:3204-3229 | Sources/Baguette/Infrastructure/Server/ServerCameraRoutes.swift:13-38 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 18+ corresponding lines) Sources/Baguette/App/Commands/AddFileCommands.swift:22 — Sources/Baguette/App/Commands/AddFileCommands.swift:22-40 | Sources/Baguette/App/Commands/AddFileCommands.swift:61-79 | Sources/Baguette/App/Commands/DeepLinkCommands.swift:28-55 | Sources/Baguette/App/Commands/LocationCommand.swift:45-62 | Sources/Baguette/App/Commands/LocationCommand.swift:97-114 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) Sources/Baguette/Domain/Render/ScreenQuad.swift:149 — Sources/Baguette/Domain/Render/ScreenQuad.swift:149-161 | Sources/Baguette/Domain/Render/ScreenQuad.swift:163-177 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 14+ corresponding lines) Sources/Baguette/App/Commands/ClipboardCommand.swift:57 — Sources/Baguette/App/Commands/ClipboardCommand.swift:57-70 | Sources/Baguette/App/Commands/ClipboardCommand.swift:82-95 | Sources/Baguette/App/Commands/LocationCommand.swift:187-200 | Sources/Baguette/App/Commands/ShakeCommand.swift:21-38 | Sources/Baguette/App/Commands/StatusBarCommand.swift:75-92 | Sources/Baguette/App/Commands/StatusBarCommand.swift:104-117 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 20+ corresponding lines) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:123 — Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:123-144 | Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:45-64 | Sources/Baguette/Infrastructure/Photos/SimctlPhotoLibrary.swift:28-47 | Sources/Baguette/Infrastructure/Shake/SimctlShake.swift:37-56 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:78-97 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) Sources/Baguette/Domain/Accessibility/AXElementReader.swift:52 — Sources/Baguette/Domain/Accessibility/AXElementReader.swift:52-60 | Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:207-214 | Sources/Baguette/Infrastructure/Accessibility/AXPTranslatorAccessibility.swift:538-549 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:26 — Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:26-41 | Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:45-60 | Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:70-84 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 3+ corresponding lines) Sources/Baguette/Domain/Apps/AppBundle.swift:32 — Sources/Baguette/Domain/Apps/AppBundle.swift:32-34 | Sources/Baguette/Domain/Apps/DeepLink.swift:59-61 | Sources/Baguette/Domain/Apps/RemoteNotification.swift:143-145 | Sources/Baguette/Domain/Defaults/PreferenceSuite.swift:49-51 | Sources/Baguette/Domain/Photos/MediaItem.swift:34-36 | Sources/Baguette/Domain/Shake/MotionShake.swift:28-30 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) Sources/Baguette/Infrastructure/Server/Server.swift:1004 — Sources/Baguette/Infrastructure/Server/Server.swift:1004-1010 | Sources/Baguette/Infrastructure/Server/ServerBakeryRoutes.swift:207-213 | Sources/Baguette/Infrastructure/Server/ServerDeepLinkRoutes.swift:77-83 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) Sources/Baguette/Domain/Interface/ContentSize.swift:31 — Sources/Baguette/Domain/Interface/ContentSize.swift:31-34 | Sources/Baguette/Domain/Interface/InterfaceAppearance.swift:22-25 | Sources/Baguette/Domain/Interface/InterfaceContrast.swift:16-19 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 1+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 1+ corresponding lines) Sources/Baguette/App/PluginDispatch.swift:232 — Sources/Baguette/App/PluginDispatch.swift:232-235 | Sources/Baguette/Infrastructure/Apps/SimctlApps.swift:166-169 | Sources/Baguette/Infrastructure/Bakery/GitCheckout.swift:262-262 | Sources/Baguette/Infrastructure/Defaults/SimctlDefaults.swift:126-129 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 1 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:874 — Sources/Baguette/Infrastructure/Server/Server.swift:874-896 | Sources/Baguette/Infrastructure/Server/Server.swift:901-920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:874` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) Sources/Baguette/App/GestureDispatcher.swift:54 — Sources/Baguette/App/GestureDispatcher.swift:54-74 | Sources/Baguette/Infrastructure/Server/Server.swift:3690-3711 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:407 — Sources/Baguette/Infrastructure/Server/Server.swift:407-428 | Sources/Baguette/Infrastructure/Server/Server.swift:483-502 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:407` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–20 lines × 2) · ×1
  • Duplicated block (14–20 lines × 2) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:87 — Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:87-106 | Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:266-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–19 lines × 2) · ×1
  • Duplicated block (11–19 lines × 2) Sources/Baguette/Infrastructure/Server/ServerInterfaceRoutes.swift:35 — Sources/Baguette/Infrastructure/Server/ServerInterfaceRoutes.swift:35-45 | Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift:73-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerInterfaceRoutes.swift:35` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:3009 — Sources/Baguette/Infrastructure/Server/Server.swift:3009-3023 | Sources/Baguette/Infrastructure/Server/Server.swift:3123-3139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–16 lines × 2) · ×1
  • Duplicated block (8–16 lines × 2) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:109 — Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:109-116 | Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:187-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6–15 lines × 2) · ×1
  • Duplicated block (6–15 lines × 2) Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:109 — Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:109-123 | Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:281-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Chrome/PDFRasterizer.swift:109` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:3206 — Sources/Baguette/Infrastructure/Server/Server.swift:3206-3219 | Sources/Baguette/Infrastructure/Server/ServerCameraRoutes.swift:16-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:3206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:436 — Sources/Baguette/Infrastructure/Server/Server.swift:436-447 | Sources/Baguette/Infrastructure/Server/Server.swift:468-478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×1
  • Duplicated block (12 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:2596 — Sources/Baguette/Infrastructure/Server/Server.swift:2596-2607 | Sources/Baguette/Infrastructure/Server/Server.swift:2640-2651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:2596` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `Sources/Baguette/Infrastructure/Server/Server.swift:2637` calls `errorJSON`, `chrome` and `Sources/Baguette/Infrastructure/Server/Server.swift:2595` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×1
  • Duplicated block (11 lines × 2) Sources/Baguette/App/Commands/DefaultsCommand.swift:175 — Sources/Baguette/App/Commands/DefaultsCommand.swift:175-185 | Sources/Baguette/App/Commands/DefaultsCommand.swift:209-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/App/Commands/DefaultsCommand.swift:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:73 — Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:73-82 | Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:91-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:73` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:97` calls `Pipe` and `Sources/Baguette/Infrastructure/Logs/HostSubprocess.swift:82` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) Sources/Baguette/Infrastructure/Server/Server.swift:1865 — Sources/Baguette/Infrastructure/Server/Server.swift:1865-1874 | Sources/Baguette/Infrastructure/Server/Server.swift:1884-1892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/Server.swift:1865` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×1
  • Duplicated block (10 lines × 2) Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:259 — Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:259-268 | Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:279-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift:259` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (5–9 lines × 2) · ×1
  • Duplicated block (5–9 lines × 2) Sources/Baguette/Infrastructure/Server/ServerCompanionScreenRoutes.swift:44 — Sources/Baguette/Infrastructure/Server/ServerCompanionScreenRoutes.swift:44-52 | Sources/Baguette/Infrastructure/Server/ServerInterfaceRoutes.swift:31-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerCompanionScreenRoutes.swift:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:38 — Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:38-46 | Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:253-259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) Sources/Baguette/Domain/Render/DeviceAVCCEnvelope.swift:29 — Sources/Baguette/Domain/Render/DeviceAVCCEnvelope.swift:29-34 | Sources/Baguette/Domain/Render/DeviceFrame.swift:68-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:22 — Sources/Baguette/Infrastructure/Interface/SimctlInterface.swift:22-32 | Sources/Baguette/Infrastructure/Location/SimctlLocation.swift:17-27 | Sources/Baguette/Infrastructure/Pasteboard/SimctlPasteboard.swift:28-38 | Sources/Baguette/Infrastructure/Photos/SimctlPhotoLibrary.swift:16-26 | Sources/Baguette/Infrastructure/StatusBar/SimctlStatusBar.swift:17-27 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) Sources/Baguette/App/CopyDispatch.swift:24 — Sources/Baguette/App/CopyDispatch.swift:24-31 | Sources/Baguette/App/CopyDispatch.swift:36-43 | Sources/Baguette/App/PasteDispatch.swift:19-26 | Sources/Baguette/App/PasteDispatch.swift:31-38 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: TwinWire — TwinWire: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: GuestHinge (LCOM4 4) Sources/Baguette/Infrastructure/Hinge/GuestHinge.swift:18 — GuestHinge'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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience Companion/DeviceTwin/Wire/Sources/TwinTransport.swift:19 — `URLSession.shared` 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.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking Sources/Baguette/Domain/Input/Fill.swift:45 — `attempt` is async and calls .wait(), Thread.sleep — a blocking call inside async code stalls the cooperative pool's thread — one per core — and every task scheduled on it for as long as it runs.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 101 plain JS — the untyped files are Sources/Baguette/Resources/Web/baguette/baguette.js, Sources/Baguette/Resources/Web/baguette/carplay/carplay-frame.js, Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js, Sources/Baguette/Resources/Web/baguette/carplay/frame-registry.js, Sources/Baguette/Resources/Web/baguette/gestures/attachable-event-source.js, Sources/Baguette/Resources/Web/baguette/gestures/edge-bands.js (+95 more).
R10 · Code Duplication · Duplicated block with local edits (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) Sources/Baguette/Resources/Web/capture/capture-composer.js:113 — Sources/Baguette/Resources/Web/capture/capture-composer.js:113 · Sources/Baguette/Resources/Web/recorder.js:124 — the two spans are one implementation copied and then locally edited — 557 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 (24 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (24 matched lines × 2 locations) Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:6 — Sources/Baguette/Resources/Web/baguette/gestures/safari-gesture-event-source.js:6 · Sources/Baguette/Resources/Web/baguette/gestures/wheel-gesture-source.js:4 — the two spans are one implementation copied and then locally edited — 175 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 (22 lines × 3 locations) · ×1
  • Duplicated block (22 lines × 3 locations) Sources/Baguette/Resources/Web/sim-native.js:2479 — Sources/Baguette/Resources/Web/sim-native.js:2479 · Sources/Baguette/Resources/Web/sim-native.js:2519 · Sources/Baguette/Resources/Web/sim-native.js:2544 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (19 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (19 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:903 — Sources/Baguette/Resources/Web/sim-native.js:903 · Sources/Baguette/Resources/Web/sim-stream.js:194 — the two spans are one implementation copied and then locally edited — 118 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 (17 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (17 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-plugins.js:68 — Sources/Baguette/Resources/Web/sim-plugins.js:68 · Sources/Baguette/Resources/Web/sim-screens.js:44 — the two spans are one implementation copied and then locally edited — 109 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 (16 lines × 4 locations) · ×1
  • Duplicated block (16 lines × 4 locations) Sources/Baguette/Resources/Web/sim-native.js:2403 — Sources/Baguette/Resources/Web/sim-native.js:2403 · Sources/Baguette/Resources/Web/sim-native.js:2428 · Sources/Baguette/Resources/Web/sim-native.js:2458 · Sources/Baguette/Resources/Web/sim-native.js:2608 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:1213 — Sources/Baguette/Resources/Web/sim-native.js:1213 · Sources/Baguette/Resources/Web/sim-native.js:1278 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×1
  • Duplicated block (14 lines × 2 locations) Sources/Baguette/Resources/Web/farm/farm-focus.js:459 — Sources/Baguette/Resources/Web/farm/farm-focus.js:459 · Sources/Baguette/Resources/Web/sim-stream.js:662 — 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 (13 lines × 2 locations) · ×1
  • Duplicated block (13 lines × 2 locations) Sources/Baguette/Resources/Web/sim-native.js:1684 — Sources/Baguette/Resources/Web/sim-native.js:1684 · Sources/Baguette/Resources/Web/sim-stream.js:132 — 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 (10 lines × 3 locations) · ×1
  • Duplicated block (10 lines × 3 locations) Sources/Baguette/Resources/Web/sim-network.js:305 — Sources/Baguette/Resources/Web/sim-network.js:305 · Sources/Baguette/Resources/Web/sim-notify.js:111 · Sources/Baguette/Resources/Web/sim-status-bar.js:281 — 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 (9 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (9 matched lines × 2 locations) Sources/Baguette/Resources/Web/sim-defaults.js:64 — Sources/Baguette/Resources/Web/sim-defaults.js:64 · Sources/Baguette/Resources/Web/sim-notify.js:39 — the two spans are one implementation copied and then locally edited — 60 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 (5 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (5 matched lines × 2 locations) Sources/Baguette/Resources/Web/capture/capture-size.js:144 — Sources/Baguette/Resources/Web/capture/capture-size.js:144 · Sources/Baguette/Resources/Web/capture/capture-size.js:166 — the two spans are one implementation copied and then locally edited — 53 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (5 lines × 2 locations) · ×1
  • Duplicated block (5 lines × 2 locations) Sources/Baguette/Resources/Web/farm/farm-views.js:180 — Sources/Baguette/Resources/Web/farm/farm-views.js:180 · Sources/Baguette/Resources/Web/farm/farm-views.js:223 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 36, cognitive 35) · ×1
  • Complex function (anonymous) (cyclomatic 36, cognitive 35) Sources/Baguette/Resources/Web/sim-native.js:2730 — (anonymous) has cyclomatic complexity 36 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 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 toggle3D (cyclomatic 33, cognitive 47) · ×1
  • Complex function toggle3D (cyclomatic 33, cognitive 47) Sources/Baguette/Resources/Web/sim-native.js:2639 — toggle3D has cyclomatic complexity 33 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function boot (cyclomatic 31, cognitive 34) · ×1
  • Complex function boot (cyclomatic 31, cognitive 34) Sources/Baguette/Resources/Web/sim-native.js:310 — boot has cyclomatic complexity 31 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _mountIn (cyclomatic 30, cognitive 37) · ×1
  • Complex function _mountIn (cyclomatic 30, cognitive 37) Sources/Baguette/Resources/Web/farm/farm-tile.js:131 — _mountIn has cyclomatic complexity 30 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _onChange (cyclomatic 20, cognitive 21) · ×1
  • Complex function _onChange (cyclomatic 20, cognitive 21) Sources/Baguette/Resources/Web/sim-defaults.js:568 — _onChange has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 _renderPopover (cyclomatic 20, cognitive 19) · ×1
  • Complex function _renderPopover (cyclomatic 20, cognitive 19) Sources/Baguette/Resources/Web/capture/capture-size-menu.js:245 — _renderPopover 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 parse (cyclomatic 20, cognitive 18) · ×1
  • Complex function parse (cyclomatic 20, cognitive 18) Sources/Baguette/Resources/Web/baguette/carplay/frame-definition.js:47 — parse has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function enterHandheld (cyclomatic 18, cognitive 20) · ×1
  • Complex function enterHandheld (cyclomatic 18, cognitive 20) Sources/Baguette/Resources/Web/sim-native.js:522 — enterHandheld has cyclomatic complexity 18 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 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 fetchDeviceMeta (cyclomatic 18, cognitive 17) · ×1
  • Complex function fetchDeviceMeta (cyclomatic 18, cognitive 17) Sources/Baguette/Resources/Web/sim-native.js:1644 — fetchDeviceMeta has cyclomatic complexity 18 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 18, cognitive 14) · ×1
  • Complex function (anonymous) (cyclomatic 18, cognitive 14) Sources/Baguette/Resources/Web/sim-plugins.js:902 — (anonymous) has cyclomatic complexity 18 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function feed (cyclomatic 17, cognitive 24) · ×1
  • Complex function feed (cyclomatic 17, cognitive 24) Sources/Baguette/Resources/Web/frame-decoder.js:43 — feed has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function attach (cyclomatic 17, cognitive 19) · ×1
  • Complex function attach (cyclomatic 17, cognitive 19) Sources/Baguette/Resources/Web/sim-3d.js:57 — attach has cyclomatic complexity 17 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 renderPowerCard (cyclomatic 17, cognitive 16) · ×1
  • Complex function renderPowerCard (cyclomatic 17, cognitive 16) Sources/Baguette/Resources/Web/sim-native.js:1370 — renderPowerCard has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function exitHandheld (cyclomatic 16, cognitive 26) · ×1
  • Complex function exitHandheld (cyclomatic 16, cognitive 26) Sources/Baguette/Resources/Web/sim-native.js:554 — exitHandheld has cyclomatic complexity 16 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 _onMessage (cyclomatic 16, cognitive 25) · ×1
  • Complex function _onMessage (cyclomatic 16, cognitive 25) Sources/Baguette/Resources/Web/sim-camera.js:118 — _onMessage has cyclomatic complexity 16 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 _render (cyclomatic 15, cognitive 29) · ×1
  • Complex function _render (cyclomatic 15, cognitive 29) Sources/Baguette/Resources/Web/sim-logs.js:311 — _render has cyclomatic complexity 15 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 _onMessage (cyclomatic 15, cognitive 23) · ×1
  • Complex function _onMessage (cyclomatic 15, cognitive 23) Sources/Baguette/Resources/Web/sim-logs.js:261 — _onMessage has cyclomatic complexity 15 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 20) · ×1
  • Complex function (anonymous) (cyclomatic 15, cognitive 20) Sources/Baguette/Resources/Web/sim-file-drop.js:272 — (anonymous) has cyclomatic complexity 15 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 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 _toggleRecord (cyclomatic 14, cognitive 17) · ×1
  • Complex function _toggleRecord (cyclomatic 14, cognitive 17) Sources/Baguette/Resources/Web/farm/farm-focus.js:265 — _toggleRecord has cyclomatic complexity 14 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 recordingFit (cyclomatic 14, cognitive 10) · ×1
  • Complex function recordingFit (cyclomatic 14, cognitive 10) Sources/Baguette/Resources/Web/sim-3d.js:707 — recordingFit has cyclomatic complexity 14 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 locate (cyclomatic 13, cognitive 17) · ×1
  • Complex function locate (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/baguette/gestures/screen-quad.js:82 — locate has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 toggleNetwork (cyclomatic 13, cognitive 17) · ×1
  • Complex function toggleNetwork (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-native.js:2490 — toggleNetwork has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 toggleDefaults (cyclomatic 13, cognitive 17) · ×1
  • Complex function toggleDefaults (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-native.js:2552 — toggleDefaults has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 _simToggleRecord (cyclomatic 13, cognitive 17) · ×1
  • Complex function _simToggleRecord (cyclomatic 13, cognitive 17) Sources/Baguette/Resources/Web/sim-stream.js:516 — _simToggleRecord has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 startSession (cyclomatic 13, cognitive 15) · ×1
  • Complex function startSession (cyclomatic 13, cognitive 15) Sources/Baguette/Resources/Web/sim-native.js:936 — startSession has cyclomatic complexity 13 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 13, cognitive 14) · ×1
  • Complex function (anonymous) (cyclomatic 13, cognitive 14) Sources/Baguette/Resources/Web/baguette/gestures/touch-gesture-source.js:103 — (anonymous) has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 routeStreamText (cyclomatic 13, cognitive 14) · ×1
  • Complex function routeStreamText (cyclomatic 13, cognitive 14) Sources/Baguette/Resources/Web/sim-native.js:901 — routeStreamText has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 intent (cyclomatic 13, cognitive 13) · ×1
  • Complex function intent (cyclomatic 13, cognitive 13) Sources/Baguette/Resources/Web/plugin-row-action.js:40 — intent has cyclomatic complexity 13 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _handle (cyclomatic 13, cognitive 12) · ×1
  • Complex function _handle (cyclomatic 13, cognitive 12) Sources/Baguette/Resources/Web/baguette/parts/keyboard.js:119 — _handle has cyclomatic complexity 13 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 downloadSnapshot (cyclomatic 13, cognitive 12) · ×1
  • Complex function downloadSnapshot (cyclomatic 13, cognitive 12) Sources/Baguette/Resources/Web/sim-native.js:2956 — downloadSnapshot has cyclomatic complexity 13 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 activeCaptureSource (cyclomatic 13, cognitive 11) · ×1
  • Complex function activeCaptureSource (cyclomatic 13, cognitive 11) Sources/Baguette/Resources/Web/sim-native.js:2900 — activeCaptureSource has cyclomatic complexity 13 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 toggleNotify (cyclomatic 12, cognitive 16) · ×1
  • Complex function toggleNotify (cyclomatic 12, cognitive 16) Sources/Baguette/Resources/Web/sim-native.js:2526 — toggleNotify has cyclomatic complexity 12 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 onText (cyclomatic 12, cognitive 14) · ×1
  • Complex function onText (cyclomatic 12, cognitive 14) Sources/Baguette/Resources/Web/sim-3d.js:405 — onText has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 render (cyclomatic 12, cognitive 14) · ×1
  • Complex function render (cyclomatic 12, cognitive 14) Sources/Baguette/Resources/Web/sim-list.js:319 — render has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 renderBody (cyclomatic 12, cognitive 12) · ×1
  • Complex function renderBody (cyclomatic 12, cognitive 12) Sources/Baguette/Resources/Web/sim-3d.js:1077 — renderBody has cyclomatic complexity 12 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 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 stopStream (cyclomatic 12, cognitive 12) · ×1
  • Complex function stopStream (cyclomatic 12, cognitive 12) Sources/Baguette/Resources/Web/sim-stream.js:296 — stopStream has cyclomatic complexity 12 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · Sources/Baguette/Resources/Web/sim-native.js · ×1
  • Sources/Baguette/Resources/Web/sim-native.js: 3033 lines of code Sources/Baguette/Resources/Web/sim-native.js:1 — Sources/Baguette/Resources/Web/sim-native.js has 3033 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 · Sources/Baguette/Resources/Web/sim-plugins.js · ×1
  • Sources/Baguette/Resources/Web/sim-plugins.js: 1135 lines of code Sources/Baguette/Resources/Web/sim-plugins.js:1 — Sources/Baguette/Resources/Web/sim-plugins.js has 1135 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 · Sources/Baguette/Resources/Web/sim-3d.js · ×1
  • Sources/Baguette/Resources/Web/sim-3d.js: 1125 lines of code Sources/Baguette/Resources/Web/sim-3d.js:1 — Sources/Baguette/Resources/Web/sim-3d.js has 1125 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 · Sources/Baguette/Resources/Web/sim-location.js · ×1
  • Sources/Baguette/Resources/Web/sim-location.js: 1071 lines of code Sources/Baguette/Resources/Web/sim-location.js:1 — Sources/Baguette/Resources/Web/sim-location.js has 1071 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 · Sources/Baguette/Resources/Web/sim-stream.js · ×1
  • Sources/Baguette/Resources/Web/sim-stream.js: 667 lines of code Sources/Baguette/Resources/Web/sim-stream.js:1 — Sources/Baguette/Resources/Web/sim-stream.js has 667 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 · Sources/Baguette/Resources/Web/sim-defaults.js · ×1
  • Sources/Baguette/Resources/Web/sim-defaults.js: 576 lines of code Sources/Baguette/Resources/Web/sim-defaults.js:1 — Sources/Baguette/Resources/Web/sim-defaults.js has 576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · Sources/Baguette/Resources/Web/recorder.js · ×1
  • Sources/Baguette/Resources/Web/recorder.js: 464 lines of code Sources/Baguette/Resources/Web/recorder.js:1 — Sources/Baguette/Resources/Web/recorder.js has 464 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 · Sources/Baguette/Resources/Web/sim-screens.js · ×1
  • Sources/Baguette/Resources/Web/sim-screens.js: 463 lines of code Sources/Baguette/Resources/Web/sim-screens.js:1 — Sources/Baguette/Resources/Web/sim-screens.js has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · Sources/Baguette/Resources/Web/farm/farm-focus.js · ×1
  • Sources/Baguette/Resources/Web/farm/farm-focus.js: 447 lines of code Sources/Baguette/Resources/Web/farm/farm-focus.js:1 — Sources/Baguette/Resources/Web/farm/farm-focus.js has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · Sources/Baguette/Resources/Web/sim-list.js · ×1
  • Sources/Baguette/Resources/Web/sim-list.js: 438 lines of code Sources/Baguette/Resources/Web/sim-list.js:1 — Sources/Baguette/Resources/Web/sim-list.js has 438 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 · Sources/Baguette/Resources/Web/farm/farm-app.js · ×1
  • Sources/Baguette/Resources/Web/farm/farm-app.js: 417 lines of code Sources/Baguette/Resources/Web/farm/farm-app.js:1 — Sources/Baguette/Resources/Web/farm/farm-app.js has 417 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 · Sources/Baguette/Resources/Web/sim-camera.js · ×1
  • Sources/Baguette/Resources/Web/sim-camera.js: 405 lines of code Sources/Baguette/Resources/Web/sim-camera.js:1 — Sources/Baguette/Resources/Web/sim-camera.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~486 LoC) · ×1
  • Dead file (~486 LoC) Sources/Baguette/Resources/Web/farm/farm-focus.js — no import path from any entry point (58 application, 1 tooling, 38 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 (~454 LoC) · ×1
  • Dead file (~454 LoC) Sources/Baguette/Resources/Web/farm/farm-app.js — no import path from any entry point (58 application, 1 tooling, 38 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 (~316 LoC) · ×1
  • Dead file (~316 LoC) Sources/Baguette/Resources/Web/farm/farm-views.js — no import path from any entry point (58 application, 1 tooling, 38 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 (~98 LoC) · ×1
  • Dead file (~98 LoC) Sources/Baguette/Resources/Web/farm/farm-focus-width.js — no import path from any entry point (58 application, 1 tooling, 38 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 (~59 LoC) · ×1
  • Dead file (~59 LoC) Sources/Baguette/Resources/Web/farm/farm-filter.js — no import path from any entry point (58 application, 1 tooling, 38 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
Minor — 37 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×13
  • Duplicated predicate Sources/Baguette/Resources/Web/capture/capture-composer.js:121 — `!!sourceCanvas && sourceCanvas.width > 0` appears character-identically in 2 files — Sources/Baguette/Resources/Web/capture/capture-composer.js, Sources/Baguette/Resources/Web/recorder.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 Sources/Baguette/Resources/Web/farm/farm-focus.js:356 — `!artifact || typeof artifact.url !== 'string'` appears character-identically in 3 files — Sources/Baguette/Resources/Web/farm/farm-focus.js, Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/sim-native.js:2276 — `!wanted || !wanted.isPlayable(decodeCapabilities())` appears character-identically in 2 files — Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/farm/farm-focus.js:293 — `!window.BrowserRecorder || !window.BrowserRecorder.isAvailable()` appears character-identically in 3 files — Sources/Baguette/Resources/Web/farm/farm-focus.js, Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/sim-native.js:903 — `axInspector && axInspector.handleEnvelope(env)` appears character-identically in 2 files — Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/capture/capture-composer.js:159 — `background && background !== 'transparent'` appears character-identically in 2 files — Sources/Baguette/Resources/Web/capture/capture-composer.js, Sources/Baguette/Resources/Web/recorder.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 Sources/Baguette/Resources/Web/capture/capture-composer.js:39 — `frameImg && frameImg.naturalWidth > 0 && screen && screen.viewport` appears character-identically in 2 files — Sources/Baguette/Resources/Web/capture/capture-composer.js, Sources/Baguette/Resources/Web/recorder.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 Sources/Baguette/Resources/Web/capture/capture-composer.js:114 — `frameImg && frameImg.naturalWidth > 0 && screen && screen.viewport && screen.rect` appears character-identically in 2 files — Sources/Baguette/Resources/Web/capture/capture-composer.js, Sources/Baguette/Resources/Web/recorder.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 Sources/Baguette/Resources/Web/baguette/carplay/carplay-frame.js:129 — `root.Baguette && root.Baguette._CarPlayFrameDefinition` appears character-identically in 2 files — Sources/Baguette/Resources/Web/baguette/carplay/carplay-frame.js, Sources/Baguette/Resources/Web/baguette/carplay/frame-registry.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 Sources/Baguette/Resources/Web/sim-native.js:1703 — `window.FrameDecoder && window.FrameDecoder.isHardwareAvailable()` appears character-identically in 2 files — Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/Resources/Web/sim-native.js:1611 — `window.StreamFormat && window.StreamFormat.named(b.dataset.v)` appears character-identically in 2 files — Sources/Baguette/Resources/Web/sim-native.js, Sources/Baguette/Resources/Web/sim-stream.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 Sources/Baguette/App/Commands/NetworkCommand.swift:68 — `latency != nil || bandwidth != nil || loss != nil` appears character-identically in 2 files — Sources/Baguette/App/Commands/NetworkCommand.swift, Sources/Baguette/Infrastructure/Server/Server.swift. 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 Sources/Baguette/Domain/Accessibility/AXHitTestGrid.swift:71 — `p.x >= minX && p.x < maxX && p.y >= minY && p.y < maxY` appears character-identically in 3 files — Sources/Baguette/Domain/Accessibility/AXHitTestGrid.swift, Sources/Baguette/Domain/Accessibility/AXNode.swift, Sources/Baguette/Domain/Accessibility/AXNodeMerge.swift. 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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift:628 — `twinErrorFrame` turns every thrown error into `#"{"error":"unknown","ok":false}"#` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Companion/DeviceTwin/Wire/Sources/TwinWire.swift:88 — `jsonLine` turns every thrown error into `"{}"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch Sources/Baguette/Resources/Web/sim-list.js:316 — `fetchPhysicalDevices` 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 Sources/Baguette/Resources/Web/sim-notify.js:28 — `remembered` 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 Sources/Baguette/Resources/Web/sim-plugins.js:463 — `loadHistory` 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.
P2 · Observability · Console output used as the logging channel · ×4
  • Console output used as the logging channel Sources/Baguette/Resources/Web/sim-network.js:273 — `Sources/Baguette/Resources/Web/sim-network.js` reports through `console.*` at line 273 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel Sources/Baguette/Resources/Web/sim-network.js:296 — `Sources/Baguette/Resources/Web/sim-network.js` reports through `console.*` at line 296 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel Sources/Baguette/Resources/Web/farm/farm-focus.js:206 — `Sources/Baguette/Resources/Web/farm/farm-focus.js` reports through `console.*` at line 206 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel Sources/Baguette/Resources/Web/farm/farm-focus.js:390 — `Sources/Baguette/Resources/Web/farm/farm-focus.js` reports through `console.*` at line 390 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 32 significant file(s) lose their only recent owner: Sources/Baguette/Domain/Plugin/PanelBody.swift, Sources/Baguette/Infrastructure/Bakery/GitCheckout.swift, Sources/Baguette/App/PluginDispatch.swift, Sources/Baguette/Infrastructure/Server/ServerPluginRoutes.swift, Sources/Baguette/App/Commands/PluginsCommand.swift, Sources/Baguette/Domain/Plugin/PluginResult.swift, Sources/Baguette/Domain/Plugin/PluginManifest.swift, Sources/Baguette/Infrastructure/Server/ServerBakeryRoutes.swift (+24 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 28 significant file(s) lose their only recent owner: Sources/Baguette/Domain/Chrome/DeviceChrome.swift, Sources/Baguette/Infrastructure/Chrome/LiveChromes.swift, Sources/Baguette/Infrastructure/Server/ServerDefaultsRoutes.swift, Sources/Baguette/Infrastructure/Recording/AVAssetWriterReel.swift, Sources/Baguette/App/Commands/DefaultsCommand.swift, Sources/Baguette/Domain/StatusBar/StatusBarOverride.swift, Sources/Baguette/Domain/Defaults/PreferenceValue.swift, Sources/Baguette/App/Commands/RecordCommand.swift (+20 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 15 significant file(s) lose their only recent owner: Sources/Baguette/Infrastructure/Server/ServerDeviceTwinRoutes.swift, Companion/DeviceTwin/App/Sources/DeviceTwinApp.swift, Sources/Baguette/Infrastructure/Device/TwinScreen.swift, Sources/Baguette/Domain/Device/Attitude.swift, Companion/DeviceTwin/Broadcast/Sources/H264Sender.swift, Sources/Baguette/Infrastructure/Device/TwinGyroState.swift, Sources/Baguette/Infrastructure/Device/VTH264Decoder.swift, Companion/DeviceTwin/Broadcast/Sources/SampleHandler.swift (+7 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (76 single-owned of 212 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 212 of the 383 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Sources/Baguette/Infrastructure/Server/ServerCameraRoutes.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found Package.swift:28 — 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 `Package.swift` makes this repository a deployable product (line 28).
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 1 of 212 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; 212 of the 383 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: Sources/Baguette/Infrastructure/Simulator/SimulatorMenuExternalDisplayPanel.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D34 · Knowledge Freshness · Orphaned file · ×1
  • Orphaned file Sources/Baguette/Infrastructure/Simulator/SimulatorMenuExternalDisplayPanel.swift:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
Minor — 4 finding(s)
D12 · Dependency Hygiene · Outdated · ×4
  • Outdated: hummingbird — `hummingbird` is resolved at 2.22.0, but 2.28.1 is the newest release tagged on https://github.com/hummingbird-project/hummingbird.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update hummingbird` reaches this one with no change to Package.swift.
  • Outdated: hummingbird-websocket — `hummingbird-websocket` is resolved at 2.6.0, but 2.8.1 is the newest release tagged on https://github.com/hummingbird-project/hummingbird-websocket.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update hummingbird-websocket` reaches this one with no change to Package.swift.
  • Outdated: mockable — `mockable` is resolved at 0.6.2, but 0.6.5 is the newest release tagged on https://github.com/Kolos65/Mockable within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update mockable` reaches this one with no change to Package.swift.
  • Outdated: swift-argument-parser — `swift-argument-parser` is resolved at 1.7.1, but 1.8.2 is the newest release tagged on https://github.com/apple/swift-argument-parser within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-argument-parser` reaches this one with no change to Package.swift.

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-8153b43c1e054ba1ac980e2c35c88667/history.json --exit-code 0 --source .0artifacts/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-8153b43c1e054ba1ac980e2c35c88667/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .19artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .3artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 40 file(s) — `Sources/Baguette/App/AppLaunch.swift`, `Sources/Baguette/App/Commands/GestureCommands.swift`, `Sources/Baguette/App/Commands/HingeCLICommand.swift`, `Sources/Baguette/App/Commands/LaunchCommand.swift`, `Sources/Baguette/App/Commands/NotifyCommand.swift`, … (+35 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1dce9-1df4-74d8-9446-e73c5076e706 · 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