Public report of nerves-hub/nerves_hub_web, 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 reportMeasured 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, 16:20 UTC · Survey ID cd_4153a537c573467f9324d27337440c65
nerves-hub/nerves_hub_web
Measured 15 November 2026, 16:18 UTC, at code version f7ec66c
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 3 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: 77,120 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Accessibility, 43
Findings by how serious they are
90 critical360 serious77 minor
16 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 16:18 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
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 ▸
60of 60 dimensions measured by tools.
509of 527 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.
60dimensions across 6 lenses, read from 77,120 lines of product code in 2 projects.
nerves-hub/nerves_hub_web falls short of our standard for production, in part because it has controls that only work with a mouse. It scores 50 out of 100 and is rated Weak, and 38 of its 90 critical findings are security problems.
Accessibility, at 43, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the two exposed passwords or keys and switching the old ones off, worth about 3 points. Making the controls keyboard-usable would lift Accessibility itself, worth about 5 points. Raising Accessibility to 70 would lift the score to about 55.
Twenty pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Fifteen controls can't be used without a mouse, and sixteen buttons or links have no name a screen reader can say. Making the controls work with a keyboard, pinning each tool to an exact version and naming the buttons and links would close these risks. The five unsafe settings in infrastructure or container files need changing to safe values. The four passwords or keys in the code's history and the two passwords or keys in the code need replacing, with the old ones switched off. The 16 form fields without a label need a label.
The product code is 77,120 lines, about €140,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 forThe 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.
If Accessibility rose from 43 to 70, the lowest score rated Strong, the score would rise from 50 to about 55.
Code composition: what the lines of code are
Product code 52%Tests 48%
New since the last survey: 222 findings
These 222 critical or serious findings weren't in the previous survey, on 3 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
God Classes · FileTooLong: integrations/components.ex lib/nerves_hub_web/live/org/integrations/components.ex
Code Duplication · Edited copy of a member (50 corresponding lines) lib/nerves_hub/devices/connections.ex
Code Duplication · Edited copy of a member (38 corresponding lines) lib/nerves_hub/devices/update_history.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub/certificate.ex
Code Duplication · Edited copy of a member (32 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) lib/nerves_hub/command_palette.ex
Code Duplication · Edited copy of a member (23 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/accounts.ex
Code Duplication · Edited copy of a member (24 corresponding lines) lib/nerves_hub_web/live/firmware.ex
Code Duplication · Edited copy of a member (32 corresponding lines) lib/nerves_hub_web/components/device_page/settings_tab.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (20 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex
Code Duplication · Edited copy of a member (14 corresponding lines) lib/nerves_hub/managed_deployments.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub_web/live/archives.ex
Code Duplication · Edited copy of a member (32 corresponding lines) lib/nerves_hub_web/components/deployment_group_page/settings.ex
Code Duplication · Edited copy of a member (16 corresponding lines) lib/nerves_hub_web/live/archives.ex
Code Duplication · Edited copy of a member (26 corresponding lines) lib/nerves_hub/integrations/slack/messages.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/devices/connections.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub_web/controllers/api/device_log_controller.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub_web.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub/ssl.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub_web/controllers/api/archive_controller.ex
Code Duplication · Edited copy of a member (15 corresponding lines) lib/nerves_hub/managed_deployments/workflows.ex
Code Duplication · Edited copy of a member (19 corresponding lines) lib/nerves_hub_web/live/org/certificate_authorities.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub/products.ex
Code Duplication · Edited copy of a member (25 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub/devices/bulk_actions.ex
Code Duplication · Edited copy of a member (8 corresponding lines) lib/nerves_hub/devices.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/devices/shared_secret_auth.ex
Code Duplication · Edited copy of a member (21 corresponding lines) lib/nerves_hub/firmwares/upload/file.ex
Code Duplication · Edited copy of a member (13 corresponding lines) lib/nerves_hub_web/live/deployment_groups/index.ex
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (8 corresponding lines) lib/nerves_hub_web/components/core_components.ex
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) lib/nerves_hub_web/live/org/integrations.ex
Code Duplication · Edited copy of a member (20 corresponding lines) lib/nerves_hub_web/live/deployment_groups/index.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub/managed_deployments/workflows.ex
Code Duplication · Edited copy of a member (21 corresponding lines) lib/nerves_hub/devices/connections.ex
Code Duplication · Edited copy of a member (15 corresponding lines) lib/nerves_hub/devices/update_stats.ex
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/channels/user_console_channel.ex
Code Duplication · Edited copy of a member (17 corresponding lines) lib/nerves_hub_web/live/deployment_groups/new.ex
Code Duplication · Edited copy of a member (16 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex
Code Duplication · Edited copy of a member (21 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex
Code Duplication · Edited copy of a member (14 corresponding lines) lib/nerves_hub_web/live/org/roles.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub/devices.ex
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) lib/nerves_hub_web/live/org/integrations.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub/firmwares.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub/integrations/discord.ex
Code Duplication · Edited copy of a member (13 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/slack/messages.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (8 corresponding lines) lib/nerves_hub_web/live/org/roles.ex
Code Duplication · Edited copy of a member (17 corresponding lines) lib/nerves_hub/device_link.ex
Code Duplication · Edited copy of a member (16 corresponding lines) lib/nerves_hub_web/controllers/account_controller.ex
Code Duplication · Edited copy of a member (16 corresponding lines) lib/nerves_hub_web/live/product/error_group.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub_web/live/product/insights.ex
Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) lib/nerves_hub/integrations.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/chat_webhooks/chat_webhook.ex
Code Duplication · Edited copy of a member (12 corresponding lines) lib/nerves_hub/devices.ex
Code Duplication · Edited copy of a member (6 corresponding lines) lib/nerves_hub/devices/deployments.ex
Code Duplication · Edited copy of a member (18 corresponding lines) lib/nerves_hub_web/live/org/delete.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/live/product/settings.ex
Code Duplication · Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/components/deployment_group_page/releases.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) lib/nerves_hub_web/live/devices/index.ex
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) lib/nerves_hub_web/live/org/settings.ex
Code Duplication · Edited copies of one member (4 members, 14+ corresponding lines) lib/nerves_hub_web/live/product/health_profiles.ex
Code Duplication · Edited copy of a member (15 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/live/org/signing_keys.ex
Code Duplication · Edited copy of a member (14 corresponding lines) lib/nerves_hub_web/integrations/slack/actions.ex
Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) lib/nerves_hub_web/live/devices/index.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub/integrations/cache.ex
Code Duplication · Edited copy of a member (12 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/live/deployment_groups/show.ex
Code Duplication · Edited copy of a member (6 corresponding lines) lib/nerves_hub/accounts.ex
Code Duplication · Edited copy of a member (5 corresponding lines) lib/nerves_hub/accounts/org_roles.ex
Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) lib/nerves_hub/product_notifications.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub_web/integrations/slack/socket.ex
Code Duplication · Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/live/deployment_groups/show.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub/managed_deployments.ex
Code Duplication · Edited copy of a member (13 corresponding lines) lib/nerves_hub_web/live/devices/show.ex
Code Duplication · Edited copy of a member (14 corresponding lines) lib/nerves_hub_web/plugs/file_upload.ex
Code Duplication · Edited copy of a member (4 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex
Code Duplication · Edited copy of a member (14 corresponding lines) lib/nerves_hub_web/live/archives.ex
Code Duplication · Edited copy of a member (9 corresponding lines) lib/nerves_hub_web/live/org/integrations.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub/firmwares.ex
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) lib/nerves_hub/product_notifications.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/channels/extensions_channel.ex
Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) lib/nerves_hub_web/components/device_page/activity_tab.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub_web/live/product/insights.ex
Code Duplication · Edited copies of one member (4 members, 6+ corresponding lines) lib/nerves_hub/accounts.ex
Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) lib/nerves_hub/devices.ex
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex
Code Duplication · Edited copy of a member (7 corresponding lines) lib/nerves_hub/integrations/teams/cards.ex
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) lib/nerves_hub_web/components/device_page/data_history_tab.ex
Code Duplication · Edited copy of a member (11 corresponding lines) lib/nerves_hub/devices/certificates.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub/logger.ex
Code Duplication · Edited copy of a member (10 corresponding lines) lib/nerves_hub_web/components/device_page/settings_tab.ex
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: 39 findings
These 39 critical or serious findings were in the previous survey, on 3 November 2026, and are gone from this one.
Forms & labels · <select> without a programmatic label lib/nerves_hub_web/live/org/user_templates/invite_template.html.heex
Page structure · Document without a <title> lib/nerves_hub_web/components/layouts/root.html.heex
Page structure · Page without a main landmark lib/nerves_hub_web/controllers/error_html/400.html.heex
Page structure · Page without a main landmark lib/nerves_hub_web/controllers/error_html/404.html.heex
Page structure · Page without a main landmark lib/nerves_hub_web/controllers/error_html/500.html.heex
Page structure · Heading level jumps from h1 to h3 lib/nerves_hub_web/live/org/certificate_authority_templates/new_ca_template.html.heex
Page structure · Heading level jumps from h1 to h3 lib/nerves_hub_web/live/org/delete.html.heex
Page structure · Heading level jumps from h1 to h3 lib/nerves_hub_web/live/org/settings.html.heex
Page structure · Heading level jumps from h1 to h3 lib/nerves_hub_web/live/org/signing_keys.html.heex
Page structure · Heading level jumps from h1 to h3 lib/nerves_hub_web/live/orgs/index.html.heex
A11y enforcement · Accessibility enforcement below the top rung REDACTED
Rebuild cost: about €140,000 · Estimate
Cost to rebuild
€46,000 to €230,000, for 763 to 2,420 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, 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 50. 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.
Size
Medium: 77,120 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 4 points · Medium effort · Text alternatives
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 €140,000 to build again, about 0.9 person-years of work. Its weakest lens is Accessibility, at 43 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
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.
103 modules, with 27 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; 63 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.
NervesHub.DeviceLink.Dispatcher uses NervesHub.DeviceLink, so a change to NervesHub.DeviceLink can break NervesHub.DeviceLink.Dispatcher, while a change to NervesHub.DeviceLink.Dispatcher can't break NervesHub.DeviceLink.
Position
Below the diagonal: NervesHub.DeviceLink.Dispatcher uses a module listed above it, which is the healthy direction.
NervesHub.Extensions uses NervesHub, so a change to NervesHub can break NervesHub.Extensions, while a change to NervesHub.Extensions can't break NervesHub.
Position
Below the diagonal: NervesHub.Extensions uses a module listed above it, which is the healthy direction.
NervesHub.Extensions.Logging uses NervesHub, so a change to NervesHub can break NervesHub.Extensions.Logging, while a change to NervesHub.Extensions.Logging can't break NervesHub.
Position
Below the diagonal: NervesHub.Extensions.Logging uses a module listed above it, which is the healthy direction.
NervesHub.Firmwares.UpdateTool uses NervesHub.Firmwares, so a change to NervesHub.Firmwares can break NervesHub.Firmwares.UpdateTool, while a change to NervesHub.Firmwares.UpdateTool can't break NervesHub.Firmwares.
Position
Below the diagonal: NervesHub.Firmwares.UpdateTool uses a module listed above it, which is the healthy direction.
NervesHub.Firmwares.Upload uses NervesHub.Firmwares, so a change to NervesHub.Firmwares can break NervesHub.Firmwares.Upload, while a change to NervesHub.Firmwares.Upload can't break NervesHub.Firmwares.
Position
Below the diagonal: NervesHub.Firmwares.Upload uses a module listed above it, which is the healthy direction.
NervesHub.Integrations uses NervesHub.Integrations.ChatWebhooks, so a change to NervesHub.Integrations.ChatWebhooks can break NervesHub.Integrations, while a change to NervesHub.Integrations can't break NervesHub.Integrations.ChatWebhooks.
Position
Below the diagonal: NervesHub.Integrations uses a module listed above it, which is the healthy direction.
NervesHubWeb.API.Plugs uses (global), so a change to (global) can break NervesHubWeb.API.Plugs, while a change to NervesHubWeb.API.Plugs can't break (global).
Position
Below the diagonal: NervesHubWeb.API.Plugs uses a module listed above it, which is the healthy direction.
NervesHubWeb.Components uses (global), so a change to (global) can break NervesHubWeb.Components, while a change to NervesHubWeb.Components can't break (global).
Position
Below the diagonal: NervesHubWeb.Components uses a module listed above it, which is the healthy direction.
NervesHubWeb.Components.DeploymentGroupPage uses (global), so a change to (global) can break NervesHubWeb.Components.DeploymentGroupPage, while a change to NervesHubWeb.Components.DeploymentGroupPage can't break (global).
Position
Below the diagonal: NervesHubWeb.Components.DeploymentGroupPage uses a module listed above it, which is the healthy direction.
NervesHubWeb.Components.DevicePage uses (global), so a change to (global) can break NervesHubWeb.Components.DevicePage, while a change to NervesHubWeb.Components.DevicePage can't break (global).
Position
Below the diagonal: NervesHubWeb.Components.DevicePage uses a module listed above it, which is the healthy direction.
NervesHubWeb.Integrations.Slack uses (global), so a change to (global) can break NervesHubWeb.Integrations.Slack, while a change to NervesHubWeb.Integrations.Slack can't break (global).
Position
Below the diagonal: NervesHubWeb.Integrations.Slack uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.Account uses (global), so a change to (global) can break NervesHubWeb.Live.Account, while a change to NervesHubWeb.Live.Account can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Account uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.DeploymentGroups uses (global), so a change to (global) can break NervesHubWeb.Live.DeploymentGroups, while a change to NervesHubWeb.Live.DeploymentGroups can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.DeploymentGroups uses a module listed above it, which is the healthy direction.
3 pairs of types, where a type in NervesHubWeb.Live.Devices uses a type in (global).
The types involved
NervesHubWeb.Live.Devices.Index → NervesHubWeb
NervesHubWeb.Live.Devices.New → NervesHubWeb
NervesHubWeb.Live.Devices.Show → NervesHubWeb
Direction
NervesHubWeb.Live.Devices uses (global), so a change to (global) can break NervesHubWeb.Live.Devices, while a change to NervesHubWeb.Live.Devices can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Devices uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.Org uses (global), so a change to (global) can break NervesHubWeb.Live.Org, while a change to NervesHubWeb.Live.Org can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Org uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.Org.Integrations uses (global), so a change to (global) can break NervesHubWeb.Live.Org.Integrations, while a change to NervesHubWeb.Live.Org.Integrations can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Org.Integrations uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in NervesHubWeb.Live.Orgs uses a type in (global).
The types involved
NervesHubWeb.Live.Orgs.Index → NervesHubWeb
NervesHubWeb.Live.Orgs.New → NervesHubWeb
Direction
NervesHubWeb.Live.Orgs uses (global), so a change to (global) can break NervesHubWeb.Live.Orgs, while a change to NervesHubWeb.Live.Orgs can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Orgs uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.Product uses (global), so a change to (global) can break NervesHubWeb.Live.Product, while a change to NervesHubWeb.Live.Product can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Product uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in NervesHubWeb.Live.Products uses a type in (global).
The types involved
NervesHubWeb.Live.Products.New → NervesHubWeb
Direction
NervesHubWeb.Live.Products uses (global), so a change to (global) can break NervesHubWeb.Live.Products, while a change to NervesHubWeb.Live.Products can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.Products uses a module listed above it, which is the healthy direction.
NervesHubWeb.Live.SupportScripts uses (global), so a change to (global) can break NervesHubWeb.Live.SupportScripts, while a change to NervesHubWeb.Live.SupportScripts can't break (global).
Position
Below the diagonal: NervesHubWeb.Live.SupportScripts uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
23
High / Critical
A02:2025 — Security Misconfiguration
16
High / Critical
A03:2025 — Software Supply Chain Failures
11
High / Critical
A07:2025 — Authentication Failures
7
High / Critical
Roadmap
Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2).
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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.
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 — 90
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 — 360
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 — 77
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
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 60 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 — 60 dimensions across the health lenses
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
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, 509 of 527 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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: this repository's production source spans .ex, and our analyzer cannot run the .ex test suite(s) — so no coverage was collected for the repository as a whole. The JavaScript/TypeScript half did build and run, and its own line coverage came back at 71.1% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
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 63 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 361 test source file(s) (.exs, .ex) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .ex, and the built-in reliability runner cannot re-run the .ex test suite(s) — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (node:test via `npm ci --ignore-scripts` in assets/ (63 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares REDACTED, but the licence verdict published here was taken over its Hex package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — 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.
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.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala and Rust source only, and this repository's Elixir is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Elixir 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.
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 reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, 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.
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.
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, Kotlin and PHP source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala, Kotlin or PHP was found, and this repository's Elixir 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.
X3 Exception handling — 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.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, 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.
X7 Silent fallback defaults — 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. 4 further occurrence(s) are not listed individually; the score already reflects all 44.
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.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
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.
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.
Bring the 4 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Fwup.do_delta_file (cyclomatic 21), handleKeydown (cyclomatic 20), advancedQueryEditor.classify (cyclomatic 19). — 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 4 together lifts Cyclomatic Complexity from 9.3 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 9 bodies over 15 down to 15 or less in Cognitive Complexity — start with advancedQueryEditor.classify (cognitive 35), advancedQueryEditor.tokenize (cognitive 32), handleKeydown (cognitive 31). — 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 9 together lifts Cognitive Complexity from 8.2 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.6 / 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.
Resolve the 12 FileTooLong finding(s) in God Classes — start with details_tab.ex, accounts.ex, index.ex. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 10 TooManyFunctions finding(s) in God Classes — start with messages.ex, workflows.ex, esp_idf.ex. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
70 duplicated block group(s) detected. 5.3 % of the production lines (4,071 of 77,120) are in a reported copy. A further 148 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (7 corresponding lines) · ×11lib/nerves_hub_web/controllers/api/device_log_controller.ex:54
Edited copy of a member (11 corresponding lines) · ×11lib/nerves_hub/ssl.ex:199
Edited copy of a member (9 corresponding lines) · ×10lib/nerves_hub/accounts.ex:708
Edited copy of a member (4 corresponding lines) · ×10lib/nerves_hub/integrations/chat_webhooks.ex:288
+ 75 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with firmwares.ex (2), device_log_controller.ex, socket.ex. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 11 Edited copy of a member (11 corresponding lines) finding(s) in Code Duplication — start with esp_idf.ex (2), ssl.ex, bulk_actions.ex. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with accounts.ex (2), connections.ex, shared_secret_auth.ex. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
D10 · Test Quality10.0 / 10Exemplary✓ 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.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 63 tests. Measured on the JavaScript/TypeScript suite only — at least 361 test source file(s) (.exs, .ex) went unread, so its test quality is unmeasured and is not in these counts.
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.
4 outdated, 0 retired direct Hex dependencies, 1 pinning defect(s). Whether any of these packages is UNMAINTAINED is not graded — hex.pm publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: a Hex app name does not determine the modules it provides (`ecto_sql` provides Ecto.Adapters.SQL), and a large idiomatic class of BEAM dependencies — runtime adapters, codec plugins, protocol implementations and OTP applications the release starts — is correctly declared and never referenced in source, so absence of a reference is not evidence of an unused dependency. Known CVEs in this dependency graph are D30's question, read from mix.lock there.
Floating source dependency: opentelemetry_oban
Outdated: dialyxir · ×4
What to do
Resolve the 1 Floating source dependency finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 secret(s) detected. 2 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
REDACTED
What to do
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
0 of 116 shipped Hex package(s) use a banned license. Licences were resolved from hex.pm over the packages a consumer installs — this repository's mix.lock closed over the declarations its mix.exs files do not gate behind `only:`. Packages it asks for ONLY under `only: [:dev, :test]` (or any other non-prod environment, such as `:docs`) are excluded: they are not installed by anything that depends on this repository. Each licence is the one hex.pm publishes for the package's current release. A further 2 package(s) the closure reaches resolve from git, a path or a local override and publish no licence this pass can read; they are outside this verdict. ★ COVERAGE OF THIS VERDICT: it grades this repository's Hex package dependencies and nothing else. The repository also declares REDACTED, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
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.
127 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lib/nerves_hub/firmwares.ex. Counted over 311 of the 796 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
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
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.
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.
20 deducted task-comment markers across 77120 LoC (0.0/KLoC) → score 9.9. 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.
Resolve the 20 TodoComment finding(s) in Explicit Debt — start with index_test.exs (2), product_controller_test.exs (2), products_test.exs (2). — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 17 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
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.
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.
1 of 2 build units (Mix, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionmix.exs:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with mix.exs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
24 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
23 finding(s): 0 critical, 23 high, 0 medium, 0 low. 17 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) charged to Static Analysis (SAST) — the other 17 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (20 issue-level, 3 of them charged here).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Low CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 5 High IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 11 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (9), REDACTED (2). — One of this dimension's main actionable groups (11 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 of 311 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is priv/repo/seeds.exs. Counted over 311 of the 796 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×2priv/repo/seeds.exs:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with devices.ex. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Change coupling finding(s) in Change Coupling — start with archives.ex, authorization.ex, device_channel.ex. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 4 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives3.7 / 10Weak✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×5) — lib/nerves_hub_web/components/device_page/health_tab.ex:341, lib/nerves_hub_web/live/product/error_group.html.heex:87, lib/nerves_hub_web/live/product/insights.html.heex:125, …
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels5.2 / 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.
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — lib/nerves_hub_web/components/bulk_actions_sidebar.ex:20, lib/nerves_hub_web/components/device_location.ex:147
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) — lib/nerves_hub_web/components/bulk_actions_sidebar.ex:58, lib/nerves_hub_web/components/bulk_actions_sidebar.ex:86, lib/nerves_hub_web/components/bulk_actions_sidebar.ex:172, …
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×15) — lib/nerves_hub_web/components/deployment_group_page/settings.ex:249, lib/nerves_hub_web/components/deployment_group_page/settings.ex:261, lib/nerves_hub_web/components/device_page/health_tab.ex:299, …
This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×14) — lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:32, lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:38, lib/nerves_hub_web/live/deployment_groups/index.html.heex:43, …
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. — lib/nerves_hub_web/live/product/errors.html.heex:39
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.
Do you agree with this assessment?
AC3 · Page structure7.6 / 10Strong✓ 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>. — lib/nerves_hub_web/components/layouts/root.html.heex:2
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.
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. — lib/nerves_hub_web/components/command_palette.ex:64
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — lib/nerves_hub_web/components/deployment_group_page/summary.ex:499, lib/nerves_hub_web/components/deployment_group_page/summary.ex:509
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×15) — lib/nerves_hub_web/components/layouts/sidebar.html.heex:21, lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:32, lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:38, …
An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — lib/nerves_hub_web/components/layouts/sidebar.html.heex:145
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
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.
<input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — lib/nerves_hub_web/components/command_palette.ex:72
<svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — lib/nerves_hub_web/components/device_page/details_tab.ex:0
<span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — lib/nerves_hub_web/live/org/integrations/slack_section.html.heex:58
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.
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.
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.
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.
Do you agree with this assessment?
C1 · Data Protection8.0 / 10Strong✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / REDACTED Manager, Azure Key Vault, HashiCorp Vault — not a Cloak key read from an environment variable beside the data) and encrypt the most sensitive columns (Cloak.Ecto field types) — partial coverage still leaves gaps.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Do you agree with this assessment?
C3 · Audit Trail7.5 / 10Strong✓ Tool-verified
Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.
An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (ExAudit.Repo, PaperTrail, AshPaperTrail, Carbonite, a Commanded middleware recording each command, or an event-sourced store), per-model coverage (a change-history library on each model that needs a who-changed-what trail, or an event-sourced aggregate).
What to do
Back the audit convention with a structural mechanism: ExAudit.Repo, PaperTrail or Carbonite on the models that need a who-changed-what trail, or a Commanded middleware writing each sensitive change to an audit-log table, with the acting user and time on every entry.
Do you agree with this assessment?
C4 · Data Retention6.5 / 10Adequate✓ Tool-verified
Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).
Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.
A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
What to do
Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
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.
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.
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.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:3
What to do
Dependabot is configured but does not watch `npm` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse. — REDACTED:291
What to do
Add a `healthcheck:` to the served compose service — probing the endpoint it already answers on where it has one — with `depends_on: condition: service_healthy` on whatever waits for it, and keep the deployed image tag immutable and recorded so rolling back is re-pointing at the previous tag rather than rebuilding.
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.
`Req.get!(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×3) — lib/nerves_hub/firmwares/update_tool/atom_vm.ex:574, lib/nerves_hub/firmwares/update_tool/esp_idf.ex:725, lib/nerves_hub/firmwares/update_tool/fwup.ex:487
`Req.new(` 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. (×2) — lib/nerves_hub/integrations/chat_webhooks/client.ex:50, lib/nerves_hub/webhooks/delivery.ex:48
`Req.request(` 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. (×2) — lib/nerves_hub/integrations/chat_webhooks/client.ex:52, lib/nerves_hub/webhooks/delivery.ex:50
What to do
Set an explicit timeout on every client — `recv_timeout:` for HTTPoison, `receive_timeout:` for Req and Finch, `Tesla.Middleware.Timeout` (or the adapter's `recv_timeout`) for Tesla, `timeout:` for `:httpc` — and add retries with back-off (`Tesla.Middleware.Retry`, Req's `retry:`) and a breaker (`:fuse`, `ExternalService`) around dependencies that fail.
Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.
Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.
Do you agree with this assessment?
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 · 39 plain JS — the untyped files are assets/js/app.js, assets/js/helpers/fonts.js, assets/js/helpers/fonts.test.js, assets/js/helpers/mapStyle.js, assets/js/helpers/mapStyle.test.js, assets/js/helpers/terminal.js (+33 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.
Do you agree with this assessment?
R10 · Code Duplication4.6 / 10Weak✓ 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.
assets/js/hooks/scriptAutocomplete.js:45 · assets/js/hooks/tagAutocomplete.js:37 — the two spans are one implementation copied and then locally edited — 467 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. — assets/js/hooks/scriptAutocomplete.js:45
assets/js/hooks/console.js:9 · assets/js/hooks/localShell.js:8 — 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. — assets/js/hooks/console.js:9
assets/js/hooks/console.js:115 · assets/js/hooks/localShell.js:59 — 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. — assets/js/hooks/console.js:115
assets/js/hooks/donutChart.js:75 · assets/js/hooks/updateOutcomesChart.js:105 — 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. — assets/js/hooks/donutChart.js:75
assets/js/hooks/barChart.js:65 · assets/js/hooks/updateOutcomesChart.js:50 — the two spans are one implementation copied and then locally edited — 77 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. — assets/js/hooks/barChart.js:65
assets/js/app.js:156 · assets/js/app.js:168 — 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. — assets/js/app.js:156
assets/js/hooks/scriptAutocomplete.js:21 · assets/js/hooks/tagAutocomplete.js:29 — 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. — assets/js/hooks/scriptAutocomplete.js:21
assets/js/hooks/chart.js:165 · assets/js/hooks/chart.js:177 · assets/js/hooks/chart.js:190 — all 3 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — assets/js/hooks/chart.js:165
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.
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.
handleKeydown has cyclomatic complexity 20 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — assets/js/hooks/advancedQueryEditor.js:709
classify has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — assets/js/hooks/advancedQueryEditor.js:94
tokenize has cyclomatic complexity 15 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — assets/js/hooks/advancedQueryEditor.js:14
Do you agree with this assessment?
R3 · Large Files8.8 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
assets/js/hooks/advancedQueryEditor.js has 692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — assets/js/hooks/advancedQueryEditor.js:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage1.6 / 10Critical✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×27) — assets/js/hooks/chart.js:1, assets/js/app.js:1, assets/js/hooks/console.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3) — REDACTED:15, REDACTED:31, REDACTED:34
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
Other · Security — Read from this repository's Elixir source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves HTTP itself (lib/nerves_hub_web/device_endpoint.ex:3 — `Phoenix.Endpoint`), so its Elixir source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Elixir spelling appears in production source, not proven on every route. A router that plugs Phoenix's `put_secure_browser_headers` is credited the headers Phoenix sends by default (`content-security-policy` from Phoenix 1.8, `x-frame-options` before it, as the `mix.lock` pins), and a cookie Plug sets the HttpOnly flag it sets by default.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`secret_key_base` is the secret key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — REDACTED:100
`verification_token_context` is the token-signing key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — lib/nerves_hub/devices/ca_certificate/csr.ex:11
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×2) — lib/nerves_hub/certificate.ex:173, lib/nerves_hub/device_tls.ex:240
Set: Content-Security-Policy, Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Permitted-Cross-Domain-Policies. Missing: X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−0.5 on this card.) The server: lib/nerves_hub_web/device_endpoint.ex:3 — `Phoenix.Endpoint`.
What to do
Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations. This repository constructs key or salt material fixed at compile time at 2 sites, not one: `REDACTED:100` (secret key, `secret_key_base`), `lib/nerves_hub/devices/ca_certificate/csr.ex:11` (token-signing key, `verification_token_context`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 2 sites, not one: `lib/nerves_hub/certificate.ex:173` (:crypto.hash(:sha, …)), `lib/nerves_hub/device_tls.ex:240` (:crypto.hash(:sha, …)). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Add X-Frame-Options beside the headers the Elixir server already sets.
Do you agree with this assessment?
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).
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
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 — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 40 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.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 64 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: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes.
AX2 Stateful singletons — Not applicable: Elixir processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — 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
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — & sed -i \"s/^.*libarchive-.*$/${LIBARCHIVE_SHA256} libarchive-${LIBARCHIVE_VERSION}.tar.gz/\" scripts/third_party.sha256 && ./scripts/download_deps.sh && ./scripts/build_deps.sh && ./autogen.sh && PKG_CONFIG_PATH=$PWD/build/host/deps/usr/lib/pkgconfig ./configure --enable-shared=no && make && make check && make install" did not complete successfully: exit code: 22; likely cause (the repository): a RUN step of the repository's REDACTED exited with code 22 (`/bin/sh -c sed -i \"s/^LIBARCHIVE_VERSION=.*/LIBARCHIVE_VERSION=${LIBARCHIVE_VERSION}/\" scripts/third_party_versions.sh…`): the build's own command failed, for example a compile or test error; runtime evidence skipped The cause is in the repository, not in our sandbox: a RUN step of the repository's REDACTED exited with code 22 (`/bin/sh -c sed -i \"s/^LIBARCHIVE_VERSION=.*/LIBARCHIVE_VERSION=${LIBARCHIVE_VERSION}/\" scripts/third_party_versions.sh…`): the build's own command failed, for example a compile or test error. Nothing here says the surface is inaccessible, only that it was never rendered.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — N/A — too few peers to establish a naming convention (14407 declarations, no unit with a dominant convention).
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
D32 Data Compliance (PII/GDPR) — 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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D5 Coupling — Not applicable — this OTP build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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 — polyglot repository, one half has no runner
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (11 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala and Rust, 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
M4 Documentation accuracy — Not applicable: the 17 current-state document(s) make no claim of a kind M4 checks. 170 claim(s) of kinds M4 does not check were not checked (path 7, environment variable 150, setting 5, route 8); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P9 Domain vs controller coverage — coverage data present for 10 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for Benchee jobs (the entries of a `Benchee.run` job map) or Benchfella `bench "…"` blocks under `use Benchfella` in any `.ex`/`.exs` file, or benchee or benchfella in a mix.exs, 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.
PF3 Async & latency hygiene — Not applicable: Elixir has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 4% of this repository's production lines — elixir (77,120 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 4% of this repository's production lines — elixir (77,120 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 — 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
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 4% of this repository's production lines — elixir (77,120 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 4% of this repository's production lines — elixir (77,120 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
X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Elixir processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
X27 Collection changed while being enumerated — not 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
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 4% of this repository's production lines — elixir (77,120 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 applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Elixir's `nil` is an atom in a dynamically typed language: `@spec`s are checked by an external analysis that has no nullability operator, so there is no null-typed discipline in the language to adopt. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AC2 · Forms & labels· <input> without a programmatic label · ×14
<input> without a programmatic label lib/nerves_hub_web/components/deployment_group_page/settings.ex:249— 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 lib/nerves_hub_web/components/deployment_group_page/settings.ex:261— 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 lib/nerves_hub_web/components/device_page/health_tab.ex:299— 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 lib/nerves_hub_web/components/device_page/settings_tab.ex:110— 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 lib/nerves_hub_web/components/device_page/settings_tab.ex:136— 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 lib/nerves_hub_web/live/devices/index.html.heex:58— 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 lib/nerves_hub_web/live/devices/index.html.heex:73— 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 lib/nerves_hub_web/live/product/errors.html.heex:39— 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 lib/nerves_hub_web/live/product/settings.html.heex:58— 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 lib/nerves_hub_web/live/product/settings.html.heex:120— 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 lib/nerves_hub_web/live/product/settings.html.heex:177— 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 lib/nerves_hub_web/live/product/settings.html.heex:197— 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 lib/nerves_hub_web/live/product/settings.html.heex:220— 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 lib/nerves_hub_web/live/products/new.html.heex:38— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· Custom control with no accessible name on <th> · ×14
Custom control with no accessible name on <th> lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:32— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:38— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:43— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:46— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:49— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:52— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:55— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:58— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:44— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:50— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:54— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:35— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:38— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
Custom control with no accessible name on <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:41— This <th> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <th> · ×14
Click handler on a non-interactive <th> lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:32— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/archive_templates/list_archives_template.html.heex:38— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:43— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:46— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:49— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:52— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:55— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/deployment_groups/index.html.heex:58— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:44— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:50— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/firmware_templates/list_firmware_template.html.heex:54— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:35— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:38— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Click handler on a non-interactive <th> lib/nerves_hub_web/live/support_scripts/index.html.heex:41— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC2 · Forms & labels· <label> that labels no control · ×4
<label> that labels no control lib/nerves_hub_web/components/bulk_actions_sidebar.ex:58— 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 lib/nerves_hub_web/components/bulk_actions_sidebar.ex:86— 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 lib/nerves_hub_web/components/bulk_actions_sidebar.ex:172— 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 lib/nerves_hub_web/components/bulk_actions_sidebar.ex:199— 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· <button> with no accessible text · ×2
<button> with no accessible text lib/nerves_hub_web/components/bulk_actions_sidebar.ex:20— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text lib/nerves_hub_web/components/device_location.ex:147— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· <select> without a programmatic label · ×2
<select> without a programmatic label lib/nerves_hub_web/live/product/health_profiles.html.heex:152— 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 lib/nerves_hub_web/live/product/health_profiles.html.heex:210— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
S1 · Web-Security Posture· Cryptographic key material is a compile-time constant · ×2
Cryptographic key material is a compile-time constant REDACTED:100— `secret_key_base` is the secret key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
Cryptographic key material is a compile-time constant lib/nerves_hub/devices/ca_certificate/csr.ex:11— `verification_token_context` is the token-signing key and is a compile-time constant, so the secret this operation depends on is published with the source. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×1
Click handler on a non-interactive <div> lib/nerves_hub_web/components/layouts/sidebar.html.heex:21— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
Boundary-crossing change coupling: devices.ex ↔ device_json.ex lib/nerves_hub/devices.ex:1— `lib/nerves_hub/devices.ex` (context nerves_hub) and `lib/nerves_hub_web/controllers/api/device_json.ex` (context nerves_hub_web) sit in DIFFERENT parts of the tree yet change together 50% of the time (13 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `63401bb3` Make the device API's create and update bodies match what they save (…; `2819c267` Add API endpoints for per-device shared secrets (#3108); `b4472d07` Introduce a priority queue (#2413) — run `git show` on any of them.
Serious — 360 finding(s)
R4 · Test Coverage· No test reaches this file · ×27
No test reaches this file assets/js/hooks/chart.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 assets/js/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 assets/js/hooks/console.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 assets/js/hooks/tagAutocomplete.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 assets/js/hooks/scriptAutocomplete.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 assets/js/hooks/barChart.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 assets/js/helpers/terminal.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 assets/js/hooks/updateOutcomesChart.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 assets/js/hooks/workflowDiagramFit.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 assets/js/helpers/timeAxis.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 assets/js/hooks/worldMap.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 assets/js/hooks/donutChart.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 assets/js/hooks/deviceLocationMapWithGeocoder.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 assets/js/hooks/loadMoreOnVisible.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 assets/js/hooks/toolTip.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 assets/js/hooks/localShell.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 assets/js/hooks/supportScriptOutput.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 assets/js/hooks/copyToClipboard.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 assets/js/hooks/deviceLocationMap.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 assets/js/hooks/deviceDetailsLayout.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 assets/js/hooks/themeSwitcher.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 assets/js/hooks/sharedSecretClipboardClick.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 assets/js/hooks/updatingTimeAgo.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 assets/js/hooks/pageVisible.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 assets/js/hooks/flash.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.
TodoComment test/nerves_hub_web/live/new_ui/devices/index_test.exs:34— # TODO: (nshoes) — 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 test/nerves_hub_web/live/devices/index_test.exs:55— # TODO: (nshoes) — 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 test/nerves_hub_web/controllers/product_controller_test.exs:31— # TODO: Remove when DERs are saved — 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 test/nerves_hub/products/products_test.exs:113— # TODO: Remove when DERs are saved — 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 test/nerves_hub_web/controllers/product_controller_test.exs:60— # TODO: Remove testing JSON when DERs saved — 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 test/nerves_hub/products/products_test.exs:141— # TODO: Remove testing JSON when DERs saved — 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 test/nerves_hub/ssl_test.exs:53— # TODO: Support cert expiration and test here — 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 test/nerves_hub/firmwares/update_tool_test.exs:18— # TODO: Add test for UpdateTool.device_update_type default implementation in Fwup — 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 lib/nerves_hub_web/components/core_components.ex:860— # TODO: can be removed when we remove our use of Phoenix.HTML.Form — 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 lib/nerves_hub_web/components/device_location.ex:77— # TODO: is this an API we need to document in link? — 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 lib/nerves_hub_web/components/device_page/details_tab.ex:638— # TODO: this is duplicated code, find a new way to reuse it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/nerves_hub/archives.ex:121— # TODO: check on other return signatures — 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 lib/nerves_hub/ssl.ex:164— # TODO: Maybe check for cert expiration — 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 lib/nerves_hub/ssl.ex:315— # TODO: Support device allowing multiple public keys? — 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 lib/nerves_hub/managed_deployments/deployment_group.ex:98— # TODO: (joshk) this column is unused, remove after 1st May — 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 lib/nerves_hub/devices/device_certificate.ex:115— # TODO: Remove this — 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 lib/nerves_hub/devices/device_certificate.ex:128— # TODO: Add this - But lots of tests would need fixing first — 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 lib/nerves_hub/device_link/authentication.ex:303— # TODO: Support JITP profile here to decide if enabled or what tags to use — 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 lib/nerves_hub/accounts/user.ex:44— # TODO: look into removing :password — 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 lib/nerves_hub/accounts/user_token.ex:134— # TODO: This first match is the V1 token that will need to be removed when deprecated — 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.
FileTooLong: device_page/details_tab.ex lib/nerves_hub_web/components/device_page/details_tab.ex— FileTooLong — 1263 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 42 functions. The bar is 500 significant lines; this is 763 over it, 2.53× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: nerves_hub/accounts.ex lib/nerves_hub/accounts.ex— FileTooLong — 1205 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 121 functions. The bar is 500 significant lines; this is 705 over it, 2.41× 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: devices/index.ex lib/nerves_hub_web/live/devices/index.ex— FileTooLong — 1047 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 43 functions. The bar is 500 significant lines; this is 547 over it, 2.09× 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: nerves_hub/devices.ex lib/nerves_hub/devices.ex— FileTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 79 functions. The bar is 500 significant lines; this is 461 over it, 1.92× 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: nerves_hub/firmwares.ex lib/nerves_hub/firmwares.ex— FileTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 79 functions. The bar is 500 significant lines; this is 424 over it, 1.85× 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: nerves_hub/managed_deployments.ex lib/nerves_hub/managed_deployments.ex— FileTooLong — 924 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 67 functions. The bar is 500 significant lines; this is 424 over it, 1.85× 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: deployment_group_page/summary.ex lib/nerves_hub_web/components/deployment_group_page/summary.ex— FileTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 239 over it, 1.48× 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: deployment_group_page/releases.ex lib/nerves_hub_web/components/deployment_group_page/releases.ex— FileTooLong — 689 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 189 over it, 1.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: nerves_hub/device_link.ex lib/nerves_hub/device_link.ex— FileTooLong — 683 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 61 functions. The bar is 500 significant lines; this is 183 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: components/core_components.ex lib/nerves_hub_web/components/core_components.ex— FileTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 31 functions. The bar is 500 significant lines; this is 93 over it, 1.19× 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: device_page/settings_tab.ex lib/nerves_hub_web/components/device_page/settings_tab.ex— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: integrations/components.ex lib/nerves_hub_web/live/org/integrations/components.ex— FileTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 32 functions. The bar is 500 significant lines; this is 12 over it, 1.02× 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 (7 corresponding lines) · ×11
Edited copy of a member (7 corresponding lines) lib/nerves_hub_web/controllers/api/device_log_controller.ex:54— lib/nerves_hub_web/controllers/api/device_log_controller.ex:54-61 | lib/nerves_hub_web/controllers/api/device_metric_controller.ex:54-60 — 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) lib/nerves_hub/firmwares.ex:53— lib/nerves_hub/firmwares.ex:53-59 | lib/nerves_hub/firmwares.ex:280-287 — 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) lib/nerves_hub_web/integrations/slack/socket.ex:102— lib/nerves_hub_web/integrations/slack/socket.ex:102-111 | lib/nerves_hub_web/integrations/slack/socket.ex:191-197 — 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) lib/nerves_hub/managed_deployments.ex:153— lib/nerves_hub/managed_deployments.ex:153-159 | lib/nerves_hub/managed_deployments.ex:164-170 — 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) lib/nerves_hub/firmwares.ex:128— lib/nerves_hub/firmwares.ex:128-134 | lib/nerves_hub/firmwares.ex:139-146 — 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) lib/nerves_hub_web/live/product/insights.ex:169— lib/nerves_hub_web/live/product/insights.ex:169-175 | lib/nerves_hub_web/live/product/insights.ex:228-234 — 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) lib/nerves_hub/integrations/teams/cards.ex:138— lib/nerves_hub/integrations/teams/cards.ex:138-150 | lib/nerves_hub/integrations/teams/cards.ex:160-166 — 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) lib/nerves_hub_web/live/org/certificate_authorities.ex:280— lib/nerves_hub_web/live/org/certificate_authorities.ex:280-286 | lib/nerves_hub_web/live/org/certificate_authorities.ex:290-297 — 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) lib/nerves_hub/devices.ex:955— lib/nerves_hub/devices.ex:955-961 | lib/nerves_hub/devices.ex:1240-1246 — 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) lib/nerves_hub_web/components/device_page/console_tab.ex:103— lib/nerves_hub_web/components/device_page/console_tab.ex:103-109 | lib/nerves_hub_web/components/device_page/local_shell_tab.ex:202-211 — 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) lib/nerves_hub/ssl.ex:248— lib/nerves_hub/ssl.ex:248-254 | lib/nerves_hub_web/channels/event_stream_socket.ex:20-26 — 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 (11 corresponding lines) · ×11
Edited copy of a member (11 corresponding lines) lib/nerves_hub/ssl.ex:199— lib/nerves_hub/ssl.ex:199-209 | lib/nerves_hub/ssl.ex:216-226 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub/devices/bulk_actions.ex:146— lib/nerves_hub/devices/bulk_actions.ex:146-156 | lib/nerves_hub/devices/deployments.ex:207-221 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub/managed_deployments/workflows.ex:439— lib/nerves_hub/managed_deployments/workflows.ex:439-449 | lib/nerves_hub/managed_deployments/workflows.ex:512-525 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/channels/user_console_channel.ex:15— lib/nerves_hub_web/channels/user_console_channel.ex:15-25 | lib/nerves_hub_web/channels/user_local_shell_channel.ex:14-24 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/live/product/settings.ex:211— lib/nerves_hub_web/live/product/settings.ex:211-221 | lib/nerves_hub_web/live/product/settings.ex:225-235 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/live/deployment_groups/show.ex:511— lib/nerves_hub_web/live/deployment_groups/show.ex:511-523 | lib/nerves_hub_web/live/deployment_groups/show.ex:527-537 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/channels/extensions_channel.ex:60— lib/nerves_hub_web/channels/extensions_channel.ex:60-74 | lib/nerves_hub_web/channels/extensions_channel.ex:111-121 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub/devices/certificates.ex:21— lib/nerves_hub/devices/certificates.ex:21-32 | lib/nerves_hub/ssl.ex:327-337 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub/firmwares/update_tool/esp_idf.ex:206— lib/nerves_hub/firmwares/update_tool/esp_idf.ex:206-218 | lib/nerves_hub/firmwares/update_tool/atom_vm.ex:297-307 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub/firmwares/update_tool/esp_idf.ex:542— lib/nerves_hub/firmwares/update_tool/esp_idf.ex:542-552 | lib/nerves_hub/firmwares/update_tool/fwup.ex:161-171 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/nerves_hub_web/components/device_page/activity_tab.ex:22— lib/nerves_hub_web/components/device_page/activity_tab.ex:22-32 | lib/nerves_hub_web/components/device_page/firmware_history_tab.ex:22-32 — 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.
TooManyFunctions: Messages lib/nerves_hub/integrations/slack/messages.ex:1— TooManyFunctions — 51 functions. The bar is 30 functions; this is 21 over it, 1.70× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Workflows lib/nerves_hub/managed_deployments/workflows.ex:1— TooManyFunctions — 49 functions. The bar is 30 functions; this is 19 over it, 1.63× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: EspIdf lib/nerves_hub/firmwares/update_tool/esp_idf.ex:1— TooManyFunctions — 42 functions. The bar is 30 functions; this is 12 over it, 1.40× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: AtomVM lib/nerves_hub/firmwares/update_tool/atom_vm.ex:1— TooManyFunctions — 40 functions. The bar is 30 functions; this is 10 over it, 1.33× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Embeds lib/nerves_hub/integrations/discord/embeds.ex:1— TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Cards lib/nerves_hub/integrations/teams/cards.ex:1— TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Updates lib/nerves_hub/devices/updates.ex:1— TooManyFunctions — 36 functions. The bar is 30 functions; this is 6 over it, 1.20× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: NetworkIdentities lib/nerves_hub/devices/network_identities.ex:1— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Rauc lib/nerves_hub/firmwares/update_tool/rauc.ex:1— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
TooManyFunctions: Products lib/nerves_hub/products.ex:1— TooManyFunctions — 31 functions. The bar is 30 functions; this is 1 over it, 1.03× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×10
Edited copy of a member (9 corresponding lines) lib/nerves_hub/accounts.ex:708— lib/nerves_hub/accounts.ex:708-716 | lib/nerves_hub/products.ex:26-35 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/devices/connections.ex:490— lib/nerves_hub/devices/connections.ex:490-498 | lib/nerves_hub/devices/health.ex:98-108 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/devices/shared_secret_auth.ex:30— lib/nerves_hub/devices/shared_secret_auth.ex:30-40 | lib/nerves_hub/products/shared_secret_auth.ex:24-32 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/slack/messages.ex:181— lib/nerves_hub/integrations/slack/messages.ex:181-193 | lib/nerves_hub/integrations/teams/cards.ex:170-178 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub_web/live/product/insights.ex:150— lib/nerves_hub_web/live/product/insights.ex:150-159 | lib/nerves_hub_web/live/product/insights.ex:212-220 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/chat_webhooks/chat_webhook.ex:79— lib/nerves_hub/integrations/chat_webhooks/chat_webhook.ex:79-89 | lib/nerves_hub/integrations/slack/subscription.ex:67-75 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:254— lib/nerves_hub/integrations/discord/embeds.ex:254-262 | lib/nerves_hub/integrations/teams/cards.ex:230-238 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub_web/live/org/integrations.ex:159— lib/nerves_hub_web/live/org/integrations.ex:159-167 | lib/nerves_hub_web/live/org/integrations.ex:171-180 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub_web/live/firmware.ex:317— lib/nerves_hub_web/live/firmware.ex:317-327 | lib/nerves_hub_web/live/archives.ex:197-205 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/nerves_hub/accounts.ex:906— lib/nerves_hub/accounts.ex:906-914 | lib/nerves_hub/devices.ex:176-185 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×10
Edited copy of a member (4 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:288— lib/nerves_hub/integrations/chat_webhooks.ex:288-291 | lib/nerves_hub/webhooks.ex:269-272 — 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) lib/nerves_hub_web/controllers/api/device_metric_controller.ex:75— lib/nerves_hub_web/controllers/api/device_metric_controller.ex:75-82 | lib/nerves_hub_web/controllers/api/device_log_controller.ex:76-79 — 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) lib/nerves_hub/integrations/chat_webhooks.ex:221— lib/nerves_hub/integrations/chat_webhooks.ex:221-224 | lib/nerves_hub/integrations/slack/subscriptions.ex:234-237 — 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) lib/nerves_hub/archives.ex:37— lib/nerves_hub/archives.ex:37-40 | lib/nerves_hub/firmwares.ex:63-67 — 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) lib/nerves_hub/firmwares/update_tool/fwup.ex:48— lib/nerves_hub/firmwares/update_tool/fwup.ex:48-51 | lib/nerves_hub/firmwares/update_tool/rauc.ex:160-163 — 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) lib/nerves_hub/extensions/health.ex:239— lib/nerves_hub/extensions/health.ex:239-242 | lib/nerves_hub/extensions/metrics.ex:324-327 — 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) lib/nerves_hub/managed_deployments.ex:81— lib/nerves_hub/managed_deployments.ex:81-85 | lib/nerves_hub/managed_deployments/workflows.ex:72-75 — 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) lib/nerves_hub_web/controllers/api/device_log_controller.ex:39— lib/nerves_hub_web/controllers/api/device_log_controller.ex:39-42 | lib/nerves_hub_web/controllers/api/device_metric_controller.ex:36-39 — 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) lib/nerves_hub/integrations/channel_events.ex:103— lib/nerves_hub/integrations/channel_events.ex:103-106 | lib/nerves_hub/webhooks/events.ex:152-155 — 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) lib/nerves_hub/integrations/slack.ex:223— lib/nerves_hub/integrations/slack.ex:223-226 | lib/nerves_hub_web/integrations/slack/unfurls.ex:234-239 — 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.
Duplicated block (6 lines × 2) lib/nerves_hub/devices/deployments.ex:43— lib/nerves_hub/devices/deployments.ex:43-48 | lib/nerves_hub/managed_deployments.ex:594-599 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) lib/nerves_hub/managed_deployments/deployment_group.ex:146— lib/nerves_hub/managed_deployments/deployment_group.ex:146-151 | lib/nerves_hub/managed_deployments/deployment_release.ex:66-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/managed_deployments/deployment_group.ex:146` 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) lib/nerves_hub_web/controllers/api/ca_certificate_controller.ex:122— lib/nerves_hub_web/controllers/api/ca_certificate_controller.ex:122-127 | lib/nerves_hub_web/controllers/api/device_certificate_controller.ex:139-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) lib/nerves_hub/devices.ex:1191— lib/nerves_hub/devices.ex:1191-1196 | lib/nerves_hub/devices.ex:1203-1208 — 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 (6 lines × 2) lib/nerves_hub/archives/archive.ex:85— lib/nerves_hub/archives/archive.ex:85-90 | lib/nerves_hub/firmwares/firmware.ex:114-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) lib/nerves_hub_web/integrations/slack/device_cards.ex:144— lib/nerves_hub_web/integrations/slack/device_cards.ex:144-149 | lib/nerves_hub_web/integrations/slack/script_runs.ex:165-170 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub_web/integrations/slack/device_cards.ex:144` 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 (6 lines × 2) lib/nerves_hub/integrations/chat_webhooks.ex:372— lib/nerves_hub/integrations/chat_webhooks.ex:372-377 | lib/nerves_hub/integrations/slack/subscriptions.ex:396-401 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) lib/nerves_hub/workers/post_chat_webhook_events.ex:30— lib/nerves_hub/workers/post_chat_webhook_events.ex:30-35 | lib/nerves_hub/workers/post_slack_events.ex:30-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/workers/post_chat_webhook_events.ex:30` 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 (6 lines × 2) lib/nerves_hub_web/components/device_page/activity_tab.ex:9— lib/nerves_hub_web/components/device_page/activity_tab.ex:9-14 | lib/nerves_hub_web/components/device_page/firmware_history_tab.ex:9-14 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) lib/nerves_hub/devices.ex:83— lib/nerves_hub/devices.ex:83-88 | lib/nerves_hub/devices.ex:148-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×8
Edited copy of a member (10 corresponding lines) lib/nerves_hub_web/controllers/api/archive_controller.ex:55— lib/nerves_hub_web/controllers/api/archive_controller.ex:55-64 | lib/nerves_hub_web/controllers/api/firmware_controller.ex:77-93 — 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) lib/nerves_hub/products.ex:58— lib/nerves_hub/products.ex:58-67 | lib/nerves_hub/products.ex:87-96 — 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) lib/nerves_hub/integrations/discord.ex:31— lib/nerves_hub/integrations/discord.ex:31-46 | lib/nerves_hub/integrations/teams.ex:41-50 — 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) lib/nerves_hub/integrations/chat_webhooks.ex:208— lib/nerves_hub/integrations/chat_webhooks.ex:208-217 | lib/nerves_hub/integrations/slack/subscriptions.ex:218-230 — 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) lib/nerves_hub/integrations/cache.ex:46— lib/nerves_hub/integrations/cache.ex:46-55 | lib/nerves_hub/products/health_profiles/cache.ex:40-49 — 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) lib/nerves_hub/logger.ex:163— lib/nerves_hub/logger.ex:163-172 | lib/nerves_hub/logger.ex:207-216 — 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) lib/nerves_hub_web/components/device_page/settings_tab.ex:460— lib/nerves_hub_web/components/device_page/settings_tab.ex:460-471 | lib/nerves_hub_web/live/devices/show.ex:313-322 — 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) lib/nerves_hub_web/components/device_page/details_tab.ex:454— lib/nerves_hub_web/components/device_page/details_tab.ex:454-463 | lib/nerves_hub_web/components/device_page/settings_tab.ex:434-443 — 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.
Duplicated block (5 lines × 2) lib/nerves_hub/integrations/discord/embeds.ex:183— lib/nerves_hub/integrations/discord/embeds.ex:183-187 | lib/nerves_hub/integrations/teams/cards.ex:170-174 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/teams/cards.ex` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/nerves_hub_web/components/core_components.ex:633— lib/nerves_hub_web/components/core_components.ex:633-637 | lib/nerves_hub_web/components/core_components.ex:791-795 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) lib/nerves_hub/extensions/health.ex:146— lib/nerves_hub/extensions/health.ex:146-153 | lib/nerves_hub/extensions/metrics.ex:171-175 — 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) lib/nerves_hub/integrations/discord/embeds.ex:202— lib/nerves_hub/integrations/discord/embeds.ex:202-206 | lib/nerves_hub/integrations/teams/cards.ex:182-186 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/teams/cards.ex` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/integrations/discord/embeds.ex:202` 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 (5 lines × 2) lib/nerves_hub_web/components/layouts.ex:189— lib/nerves_hub_web/components/layouts.ex:189-193 | lib/nerves_hub_web/live/devices/show.ex:493-497 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:34— lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:34-38 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:39-43 — 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) lib/nerves_hub_web/channels/user_console_channel.ex:35— lib/nerves_hub_web/channels/user_console_channel.ex:35-39 | lib/nerves_hub_web/channels/user_console_channel.ex:49-53 — 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.
Outbound HTTP without resilience lib/nerves_hub/firmwares/update_tool/atom_vm.ex:574— `Req.get!(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/firmwares/update_tool/esp_idf.ex:725— `Req.get!(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/firmwares/update_tool/fwup.ex:487— `Req.get!(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/integrations/chat_webhooks/client.ex:50— `Req.new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/integrations/chat_webhooks/client.ex:52— `Req.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/webhooks/delivery.ex:48— `Req.new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience lib/nerves_hub/webhooks/delivery.ex:50— `Req.request(` 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×6
Edited copy of a member (18 corresponding lines) lib/nerves_hub/certificate.ex:131— lib/nerves_hub/certificate.ex:131-148 | lib/nerves_hub/certificate.ex:152-169 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:238— lib/nerves_hub/integrations/chat_webhooks.ex:238-255 | lib/nerves_hub/integrations/slack/subscriptions.ex:257-274 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/nerves_hub_web/live/archives.ex:176— lib/nerves_hub_web/live/archives.ex:176-193 | lib/nerves_hub_web/live/firmware.ex:293-313 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/nerves_hub_web.ex:125— lib/nerves_hub_web.ex:125-142 | lib/nerves_hub_web.ex:413-438 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/nerves_hub/devices.ex:999— lib/nerves_hub/devices.ex:999-1016 | lib/nerves_hub/devices.ex:1028-1045 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/nerves_hub_web/live/org/delete.ex:21— lib/nerves_hub_web/live/org/delete.ex:21-43 | lib/nerves_hub_web/live/product/settings.ex:97-114 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×6
Edited copy of a member (12 corresponding lines) lib/nerves_hub/devices.ex:1299— lib/nerves_hub/devices.ex:1299-1310 | lib/nerves_hub/products.ex:386-397 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/components/deployment_group_page/releases.ex:559— lib/nerves_hub_web/components/deployment_group_page/releases.ex:559-570 | lib/nerves_hub_web/components/deployment_group_page/releases.ex:574-585 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/live/org/signing_keys.ex:37— lib/nerves_hub_web/live/org/signing_keys.ex:37-48 | lib/nerves_hub_web/live/orgs/new.ex:18-29 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:357— lib/nerves_hub/integrations/chat_webhooks.ex:357-368 | lib/nerves_hub/integrations/slack/subscriptions.ex:381-392 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/live/deployment_groups/show.ex:323— lib/nerves_hub_web/live/deployment_groups/show.ex:323-335 | lib/nerves_hub_web/live/deployment_groups/show.ex:340-351 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/nerves_hub_web/controllers/api/archive_json.ex:13— lib/nerves_hub_web/controllers/api/archive_json.ex:13-24 | lib/nerves_hub_web/controllers/api/firmware_json.ex:13-26 — 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 (5 corresponding lines) · ×6
Edited copy of a member (5 corresponding lines) lib/nerves_hub/accounts/org_roles.ex:110— lib/nerves_hub/accounts/org_roles.ex:110-115 | lib/nerves_hub/webhooks/payloads.ex:227-231 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) lib/nerves_hub_web/live/devices/index.ex:202— lib/nerves_hub_web/live/devices/index.ex:202-208 | lib/nerves_hub_web/live/support_scripts/index.ex:86-90 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) lib/nerves_hub/analytics/buffer.ex:207— lib/nerves_hub/analytics/buffer.ex:207-212 | lib/nerves_hub/error_reports/group_buffer.ex:394-398 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:86— lib/nerves_hub/integrations/chat_webhooks.ex:86-90 | lib/nerves_hub/webhooks.ex:72-76 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) lib/nerves_hub_web/channels/user_console_channel.ex:91— lib/nerves_hub_web/channels/user_console_channel.ex:91-95 | lib/nerves_hub_web/channels/user_local_shell_channel.ex:54-58 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) lib/nerves_hub/analytics/buffer.ex:151— lib/nerves_hub/analytics/buffer.ex:151-158 | lib/nerves_hub/error_reports/group_buffer.ex:184-188 — 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.
Duplicated block (7 lines × 2) lib/nerves_hub/devices.ex:90— lib/nerves_hub/devices.ex:90-96 | lib/nerves_hub/devices.ex:160-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) lib/nerves_hub/accounts.ex:641— lib/nerves_hub/accounts.ex:641-647 | lib/nerves_hub/products.ex:87-93 — 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 (7 lines × 2) lib/nerves_hub/extensions/health.ex:157— lib/nerves_hub/extensions/health.ex:157-163 | lib/nerves_hub/extensions/metrics.ex:274-280 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) lib/nerves_hub_web/components/filter_sidebar.ex:91— lib/nerves_hub_web/components/filter_sidebar.ex:91-97 | lib/nerves_hub_web/components/list_settings_sidebar.ex:98-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) lib/nerves_hub/accounts.ex:682— lib/nerves_hub/accounts.ex:682-688 | lib/nerves_hub/products.ex:144-150 — 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 (7 lines × 2) lib/nerves_hub/firmwares/update_tool/atom_vm.ex:535— lib/nerves_hub/firmwares/update_tool/atom_vm.ex:535-541 | lib/nerves_hub/firmwares/update_tool/esp_idf.ex:225-231 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
AC1 · Text alternatives· <canvas> without a text alternative · ×5
<canvas> without a text alternative lib/nerves_hub_web/components/device_page/health_tab.ex:341— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative lib/nerves_hub_web/live/product/error_group.html.heex:87— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative lib/nerves_hub_web/live/product/insights.html.heex:125— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative lib/nerves_hub_web/live/product/insights.html.heex:163— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
<canvas> without a text alternative lib/nerves_hub_web/live/product/insights.html.heex:416— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
Change coupling: archives.ex ↔ firmware.ex lib/nerves_hub_web/live/archives.ex:1— `lib/nerves_hub_web/live/archives.ex` and `lib/nerves_hub_web/live/firmware.ex` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f3821b24` Build fwup 1.17.1, and say when firmware needs a newer fwup (#3111); `ce87b4fd` 4 small UI improvements (#3044); `599da8d4` Write firmware uploads directly to the temp dir (#2791) — run `git show` on any of them.
Change coupling: authorization.ex ↔ router.ex lib/nerves_hub_web/helpers/authorization.ex:1— `lib/nerves_hub_web/helpers/authorization.ex` and `lib/nerves_hub_web/router.ex` change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `f9601ebb` Connect Slack workspaces to an organization (#3119); `f91b2550` Require users to accept organization invitations (#3027); `2f9fbb8e` Let a person or an organisation hold an identity, and add a page to m… — run `git show` on any of them.
Change coupling: device_channel.ex ↔ extensions_channel.ex lib/nerves_hub_web/channels/device_channel.ex:1— `lib/nerves_hub_web/channels/device_channel.ex` and `lib/nerves_hub_web/channels/extensions_channel.ex` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4eb4f00a` Keep device connections up when remote dispatch is slow (#3248); `d472318f` Record device messages where the platform produces them (#2961); `4f7c7902` Deliver Effects timers in a ref-carrying envelope (#2945) — run `git show` on any of them.
Change coupling: index.ex ↔ index.ex lib/nerves_hub_web/live/deployment_groups/index.ex:1— `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/devices/index.ex` 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) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c42b8290` Simplify and improve the filter and settings sidebars (#2797); `c909a6a5` Add support for customizing the columns listed (#2763); `c2b1e32e` Fix cases where a logged in user could cause atom exhaustion (#2655) — run `git show` on any of them.
Change coupling: ca_certificate.ex ↔ ssl.ex lib/nerves_hub/devices/ca_certificate.ex:1— `lib/nerves_hub/devices/ca_certificate.ex` and `lib/nerves_hub/ssl.ex` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `fb0b0258` Register CA certificates that have no Authority Key Identifier (#3115); `7e740942` Allow trusted expired CA signers by default (at that commit the file was still `lib/nerves_hub_device/ssl.ex`); `1854db25` add Just In Time Provisioning for Devices (at that commit the files were still `apps/nerves_hub_web_core/lib/nerves_hub_web_core/devices/ca_certificate.ex` and `apps/nerves_hub_device/lib/nerves_hub_device/ssl.ex`) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×5
Edited copy of a member (14 corresponding lines) lib/nerves_hub/managed_deployments.ex:1307— lib/nerves_hub/managed_deployments.ex:1307-1320 | lib/nerves_hub/managed_deployments.ex:1340-1355 — 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) lib/nerves_hub_web/live/org/roles.ex:96— lib/nerves_hub_web/live/org/roles.ex:96-109 | lib/nerves_hub_web/live/org/roles.ex:113-126 — 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) lib/nerves_hub_web/integrations/slack/actions.ex:104— lib/nerves_hub_web/integrations/slack/actions.ex:104-117 | lib/nerves_hub_web/integrations/slack/actions.ex:121-134 — 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) lib/nerves_hub_web/plugs/file_upload.ex:7— lib/nerves_hub_web/plugs/file_upload.ex:7-20 | lib/nerves_hub_web/plugs/static_uploads.ex:9-22 — 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) lib/nerves_hub_web/live/archives.ex:156— lib/nerves_hub_web/live/archives.ex:156-172 | lib/nerves_hub_web/live/firmware.ex:276-289 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) lib/nerves_hub/devices.ex:322— lib/nerves_hub/devices.ex:322-332 | lib/nerves_hub/devices.ex:1159-1166 — 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) lib/nerves_hub_web/components/core_components.ex:633— lib/nerves_hub_web/components/core_components.ex:633-640 | lib/nerves_hub_web/components/core_components.ex:791-798 — 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) lib/nerves_hub_web/live/org/roles.ex:53— lib/nerves_hub_web/live/org/roles.ex:53-60 | lib/nerves_hub_web/live/org/roles.ex:64-73 — 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) lib/nerves_hub_web/live/org/integrations.ex:78— lib/nerves_hub_web/live/org/integrations.ex:78-85 | lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:52-59 — 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) lib/mix/tasks/assets.build.ex:10— lib/mix/tasks/assets.build.ex:10-17 | lib/mix/tasks/assets.install.ex:10-17 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×4
Edited copies of one member (3 members, 13+ corresponding lines) lib/nerves_hub/command_palette.ex:80— lib/nerves_hub/command_palette.ex:80-94 | lib/nerves_hub/command_palette.ex:100-112 | lib/nerves_hub/command_palette.ex:118-132 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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, 13+ corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:124— lib/nerves_hub/integrations/chat_webhooks.ex:124-136 | lib/nerves_hub/integrations/slack/subscriptions.ex:124-136 | lib/nerves_hub/webhooks.ex:138-150 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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, 13+ corresponding lines) lib/nerves_hub/product_notifications.ex:374— lib/nerves_hub/product_notifications.ex:374-388 | lib/nerves_hub/product_notifications.ex:399-411 | lib/nerves_hub/product_notifications.ex:420-434 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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, 13+ corresponding lines) lib/nerves_hub_web/components/device_page/data_history_tab.ex:27— lib/nerves_hub_web/components/device_page/data_history_tab.ex:27-40 | lib/nerves_hub_web/components/device_page/errors_tab.ex:32-46 | lib/nerves_hub_web/components/device_page/logs_tab.ex:80-92 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 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 (16 corresponding lines) · ×4
Edited copy of a member (16 corresponding lines) lib/nerves_hub_web/live/archives.ex:30— lib/nerves_hub_web/live/archives.ex:30-45 | lib/nerves_hub_web/live/firmware.ex:47-64 — 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) lib/nerves_hub_web/components/device_page/details_tab.ex:502— lib/nerves_hub_web/components/device_page/details_tab.ex:502-517 | lib/nerves_hub_web/components/device_page/details_tab.ex:521-536 — 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) lib/nerves_hub_web/controllers/account_controller.ex:211— lib/nerves_hub_web/controllers/account_controller.ex:211-226 | lib/nerves_hub_web/integrations/slack/oauth_controller.ex:59-77 — 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) lib/nerves_hub_web/live/product/error_group.ex:55— lib/nerves_hub_web/live/product/error_group.ex:55-70 | lib/nerves_hub_web/live/product/errors.ex:91-108 — 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 (15 corresponding lines) · ×4
Edited copy of a member (15 corresponding lines) lib/nerves_hub/managed_deployments/workflows.ex:376— lib/nerves_hub/managed_deployments/workflows.ex:376-397 | lib/nerves_hub/managed_deployments/workflows.ex:468-482 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) lib/nerves_hub/devices/update_stats.ex:30— lib/nerves_hub/devices/update_stats.ex:30-44 | lib/nerves_hub/devices/update_stats.ex:85-99 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:270— lib/nerves_hub/integrations/chat_webhooks.ex:270-284 | lib/nerves_hub/integrations/slack/subscriptions.ex:288-302 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) lib/nerves_hub/devices/updates.ex:643— lib/nerves_hub/devices/updates.ex:643-657 | lib/nerves_hub/devices/updates.ex:702-716 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) lib/nerves_hub_web/live/deployment_groups/index.ex:77— lib/nerves_hub_web/live/deployment_groups/index.ex:77-92 | lib/nerves_hub_web/live/support_scripts/index.ex:51-63 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:287— lib/nerves_hub/integrations/discord/embeds.ex:287-299 | lib/nerves_hub/integrations/slack/messages.ex:321-346 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/nerves_hub_web/live/devices/show.ex:204— lib/nerves_hub_web/live/devices/show.ex:204-216 | lib/nerves_hub_web/live/devices/show.ex:220-232 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/nerves_hub/extensions/error_reports.ex:76— lib/nerves_hub/extensions/error_reports.ex:76-88 | lib/nerves_hub/extensions/logging/batched.ex:61-73 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×4
Edited copies of one member (3 members, 4+ corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:312— lib/nerves_hub/integrations/discord/embeds.ex:312-315 | lib/nerves_hub/integrations/slack/messages.ex:359-362 | lib/nerves_hub/integrations/teams/cards.ex:316-319 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) lib/nerves_hub/devices.ex:114— lib/nerves_hub/devices.ex:114-118 | lib/nerves_hub/devices/pinning.ex:56-59 | lib/nerves_hub/firmwares.ex:258-262 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) lib/nerves_hub/firmwares/update_tool/atom_vm.ex:561— lib/nerves_hub/firmwares/update_tool/atom_vm.ex:561-567 | lib/nerves_hub/firmwares/update_tool/esp_idf.ex:712-718 | lib/nerves_hub/firmwares/update_tool/fwup.ex:465-468 — 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.
Edited copies of one member (3 members, 4+ corresponding lines) lib/nerves_hub/firmwares/update_tool/atom_vm.ex:150— lib/nerves_hub/firmwares/update_tool/atom_vm.ex:150-153 | lib/nerves_hub/firmwares/update_tool/fwup.ex:37-40 | lib/nerves_hub/firmwares/update_tool/rauc.ex:149-152 — 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 copy of a member (3 corresponding lines) · ×4
Edited copy of a member (3 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:346— lib/nerves_hub/integrations/chat_webhooks.ex:346-348 | lib/nerves_hub/integrations/slack/subscriptions.ex:370-372 — 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) lib/nerves_hub/firmwares.ex:196— lib/nerves_hub/firmwares.ex:196-198 | lib/nerves_hub/managed_deployments/deployment_group_filtering.ex:72-74 — 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) lib/nerves_hub/analytics/buffer.ex:61— lib/nerves_hub/analytics/buffer.ex:61-64 | lib/nerves_hub/error_reports/group_buffer.ex:104-106 — 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) lib/nerves_hub/extensions/health.ex:71— lib/nerves_hub/extensions/health.ex:71-73 | lib/nerves_hub/extensions/metrics.ex:112-114 — 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· Edited copy of a member (2 corresponding lines) · ×4
Edited copy of a member (2 corresponding lines) lib/nerves_hub_web/live/deployment_groups/index.ex:125— lib/nerves_hub_web/live/deployment_groups/index.ex:125-126 | lib/nerves_hub_web/live/devices/index.ex:245-246 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:383— lib/nerves_hub/integrations/chat_webhooks.ex:383-384 | lib/nerves_hub/integrations/slack/subscriptions.ex:407-408 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) lib/nerves_hub/firmwares/update_tool/atom_vm.ex:556— lib/nerves_hub/firmwares/update_tool/atom_vm.ex:556-557 | lib/nerves_hub/firmwares/update_tool/esp_idf.ex:618-619 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex:722— lib/nerves_hub_web/components/device_page/details_tab.ex:722-723 | lib/nerves_hub_web/components/device_page/health_tab.ex:473-474 — These two members are one piece of code written twice and then edited apart: 2 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.
Duplicated block (13 lines × 2) lib/nerves_hub/certificate.ex:136— lib/nerves_hub/certificate.ex:136-148 | lib/nerves_hub/certificate.ex:157-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/certificate.ex:136` 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 (13 lines × 2) lib/nerves_hub/devices/device_filtering.ex:281— lib/nerves_hub/devices/device_filtering.ex:281-293 | lib/nerves_hub/scripts/script_filtering.ex:31-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/devices/device_filtering.ex:281` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) lib/nerves_hub/devices/update_stats.ex:32— lib/nerves_hub/devices/update_stats.ex:32-44 | lib/nerves_hub/devices/update_stats.ex:87-99 — 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) lib/nerves_hub/devices/bulk_actions.ex:198— lib/nerves_hub/devices/bulk_actions.ex:198-210 | lib/nerves_hub/devices/bulk_actions.ex:251-263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) lib/nerves_hub_web/components/device_page/details_tab.ex:270— lib/nerves_hub_web/components/device_page/details_tab.ex:270-280 | lib/nerves_hub_web/components/device_page/details_tab.ex:550-560 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) lib/nerves_hub/archives.ex:45— lib/nerves_hub/archives.ex:45-55 | lib/nerves_hub/firmwares.ex:158-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) lib/nerves_hub_web/controllers/deployment_group_controller.ex:21— lib/nerves_hub_web/controllers/deployment_group_controller.ex:21-31 | lib/nerves_hub_web/controllers/device_controller.ex:24-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub_web/controllers/deployment_group_controller.ex:21` 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 (11 lines × 2) lib/nerves_hub_web/live/deployment_groups/index.ex:177— lib/nerves_hub_web/live/deployment_groups/index.ex:177-187 | lib/nerves_hub_web/live/support_scripts/index.ex:158-168 — `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/support_scripts/index.ex` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×3
Edited copy of a member (32 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex:376— lib/nerves_hub_web/components/device_page/details_tab.ex:376-407 | lib/nerves_hub_web/components/device_page/details_tab.ex:417-450 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) lib/nerves_hub_web/components/device_page/settings_tab.ex:576— lib/nerves_hub_web/components/device_page/settings_tab.ex:576-607 | lib/nerves_hub_web/live/product/settings.ex:239-270 — These two members are one piece of code written twice and then edited apart: 32 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 (32 corresponding lines) lib/nerves_hub_web/components/deployment_group_page/settings.ex:433— lib/nerves_hub_web/components/deployment_group_page/settings.ex:433-466 | lib/nerves_hub_web/components/deployment_group_page/settings.ex:480-511 — These two members are one piece of code written twice and then edited apart: 32 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) · ×3
Edited copy of a member (21 corresponding lines) lib/nerves_hub/firmwares/upload/file.ex:36— lib/nerves_hub/firmwares/upload/file.ex:36-56 | lib/nerves_hub/firmwares/upload/file.ex:61-89 — 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.
Edited copy of a member (21 corresponding lines) lib/nerves_hub/devices/connections.ex:90— lib/nerves_hub/devices/connections.ex:90-113 | lib/nerves_hub/devices/connections.ex:121-141 — 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.
Edited copy of a member (21 corresponding lines) lib/nerves_hub_web/components/device_page/details_tab.ex:213— lib/nerves_hub_web/components/device_page/details_tab.ex:213-234 | lib/nerves_hub_web/live/devices/show.ex:281-301 — 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 (6 corresponding lines) · ×3
Edited copy of a member (6 corresponding lines) lib/nerves_hub/devices/deployments.ex:144— lib/nerves_hub/devices/deployments.ex:144-149 | lib/nerves_hub/devices/deployments.ex:161-170 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) lib/nerves_hub/accounts.ex:417— lib/nerves_hub/accounts.ex:417-424 | lib/nerves_hub/products.ex:281-286 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) lib/nerves_hub/integrations/chat_webhooks/client.ex:76— lib/nerves_hub/integrations/chat_webhooks/client.ex:76-81 | lib/nerves_hub/integrations/slack/client.ex:193-198 — 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.
Duplicated block (14 lines × 2) lib/nerves_hub_web/live/devices/index.ex:353— lib/nerves_hub_web/live/devices/index.ex:353-366 | lib/nerves_hub_web/live/devices/index.ex:448-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) lib/nerves_hub_web/live/devices/index.ex:968— lib/nerves_hub_web/live/devices/index.ex:968-989 | lib/nerves_hub_web/live/devices/index.ex:995-1008 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) lib/nerves_hub/managed_deployments.ex:1307— lib/nerves_hub/managed_deployments.ex:1307-1320 | lib/nerves_hub/managed_deployments.ex:1342-1355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/managed_deployments.ex:1307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/nerves_hub_web/channels/user_console_channel.ex:136— lib/nerves_hub_web/channels/user_console_channel.ex:136-145 | lib/nerves_hub_web/channels/user_local_shell_channel.ex:66-75 — 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 (10 lines × 2) lib/nerves_hub/firmwares/update_tool/atom_vm.ex:573— lib/nerves_hub/firmwares/update_tool/atom_vm.ex:573-582 | lib/nerves_hub/firmwares/update_tool/esp_idf.ex:724-733 — 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 (10 lines × 2) lib/nerves_hub/integrations/discord/embeds.ex:127— lib/nerves_hub/integrations/discord/embeds.ex:127-136 | lib/nerves_hub/integrations/slack/messages.ex:128-137 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/slack/messages.ex` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/integrations/discord/embeds.ex:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/nerves_hub/firmwares/update_tool/esp_idf.ex:471— lib/nerves_hub/firmwares/update_tool/esp_idf.ex:471-478 | lib/nerves_hub/firmwares/update_tool/fwup.ex:291-298 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/firmwares/update_tool/esp_idf.ex:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/nerves_hub_web/components/device_page/console_tab.ex:117— lib/nerves_hub_web/components/device_page/console_tab.ex:117-124 | lib/nerves_hub_web/components/device_page/local_shell_tab.ex:219-226 — 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) lib/nerves_hub_web/integrations/slack/actions.ex:296— lib/nerves_hub_web/integrations/slack/actions.ex:296-305 | lib/nerves_hub_web/integrations/slack/workflow_steps.ex:150-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub_web/integrations/slack/actions.ex:296` 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.
AC4 · Keyboard semantics· Anchor without href · ×2
Anchor without href lib/nerves_hub_web/components/deployment_group_page/summary.ex:499— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href lib/nerves_hub_web/components/deployment_group_page/summary.ex:509— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×2
Animation without a prefers-reduced-motion guard lib/nerves_hub_web/components/device_page/details_tab.ex— <svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
Animation without a prefers-reduced-motion guard lib/nerves_hub_web/live/org/integrations/slack_section.html.heex:58— <span> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:80— lib/nerves_hub/integrations/discord/embeds.ex:80-100 | lib/nerves_hub/integrations/teams/cards.ex:76-95 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) lib/nerves_hub_web/live/deployment_groups/index.ex:154— lib/nerves_hub_web/live/deployment_groups/index.ex:154-173 | lib/nerves_hub_web/live/support_scripts/index.ex:134-154 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×2
Edited copies of one member (3 members, 16+ corresponding lines) lib/nerves_hub_web/live/org/integrations.ex:140— lib/nerves_hub_web/live/org/integrations.ex:140-155 | lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:104-119 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:117-134 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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, 16+ corresponding lines) lib/nerves_hub_web/live/devices/index.ex:937— lib/nerves_hub_web/live/devices/index.ex:937-962 | lib/nerves_hub_web/live/devices/index.ex:993-1008 | lib/nerves_hub_web/live/devices/index.ex:1012-1027 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:148— lib/nerves_hub/integrations/chat_webhooks.ex:148-161 | lib/nerves_hub/integrations/slack/subscriptions.ex:150-163 | lib/nerves_hub/webhooks.ex:160-173 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) lib/nerves_hub_web/live/org/settings.ex:27— lib/nerves_hub_web/live/org/settings.ex:27-40 | lib/nerves_hub_web/live/support_scripts/edit.ex:34-48 | lib/nerves_hub_web/live/support_scripts/new.ex:27-41 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) lib/nerves_hub_web/live/deployment_groups/new.ex:143— lib/nerves_hub_web/live/deployment_groups/new.ex:143-162 | lib/nerves_hub_web/live/devices/new.ex:22-38 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) lib/nerves_hub/device_link.ex:682— lib/nerves_hub/device_link.ex:682-698 | lib/nerves_hub/device_link/authentication.ex:208-224 — 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 copies of one member (3 members, 6+ corresponding lines) · ×2
Edited copies of one member (3 members, 6+ corresponding lines) lib/nerves_hub/integrations.ex:135— lib/nerves_hub/integrations.ex:135-142 | lib/nerves_hub/integrations.ex:146-152 | lib/nerves_hub/integrations.ex:156-161 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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, 6+ corresponding lines) lib/nerves_hub/devices.ex:1340— lib/nerves_hub/devices.ex:1340-1345 | lib/nerves_hub/devices.ex:1349-1354 | lib/nerves_hub/devices/health.ex:112-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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, 1+ corresponding lines) · ×2
Edited copies of one member (3 members, 1+ corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:397— lib/nerves_hub/integrations/discord/embeds.ex:397-397 | lib/nerves_hub/integrations/slack/messages.ex:593-593 | lib/nerves_hub/integrations/teams/cards.ex:406-412 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 1+ corresponding lines) lib/nerves_hub/devices/log_lines.ex:114— lib/nerves_hub/devices/log_lines.ex:114-114 | lib/nerves_hub/devices/metrics.ex:208-208 | lib/nerves_hub/error_reports.ex:411-411 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×2
Edited copies of one member (3 members, 2+ corresponding lines) lib/nerves_hub/integrations/discord/embeds.ex:419— lib/nerves_hub/integrations/discord/embeds.ex:419-420 | lib/nerves_hub/integrations/slack/messages.ex:631-632 | lib/nerves_hub/integrations/teams/cards.ex:451-452 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) lib/nerves_hub/devices/pub_sub.ex:52— lib/nerves_hub/devices/pub_sub.ex:52-53 | lib/nerves_hub/events/deployment_orchestrator_events.ex:58-59 | lib/nerves_hub/extensions/pub_sub.ex:116-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 3+ corresponding lines) · ×2
Edited copies of one member (3 members, 3+ corresponding lines) lib/nerves_hub_web/components/device_page/settings_tab.ex:657— lib/nerves_hub_web/components/device_page/settings_tab.ex:657-659 | lib/nerves_hub_web/live/product/settings.ex:356-358 | lib/nerves_hub_web/live/products/new.ex: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) lib/nerves_hub/devices/device_filtering.ex:136— lib/nerves_hub/devices/device_filtering.ex:136-138 | lib/nerves_hub/managed_deployments/deployment_group_filtering.ex:9-11 | lib/nerves_hub/scripts/script_filtering.ex:11-13 — 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.
Duplicated block (12 lines × 2) lib/nerves_hub_web/components/deployment_group_page/settings.ex:515— lib/nerves_hub_web/components/deployment_group_page/settings.ex:515-526 | lib/nerves_hub_web/live/deployment_groups/show.ex:129-140 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) lib/nerves_hub/integrations/cache.ex:90— lib/nerves_hub/integrations/cache.ex:90-101 | lib/nerves_hub/products/health_profiles/cache.ex:85-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–11 lines × 2) lib/nerves_hub/analytics/buffer.ex:218— lib/nerves_hub/analytics/buffer.ex:218-228 | lib/nerves_hub/error_reports/group_buffer.ex:404-413 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–11 lines × 2) lib/nerves_hub_web/components/device_page/details_tab.ex:376— lib/nerves_hub_web/components/device_page/details_tab.ex:376-385 | lib/nerves_hub_web/components/device_page/details_tab.ex:417-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub_web/components/device_page/details_tab.ex:376` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) lib/nerves_hub_web/live/org/roles.ex:101— lib/nerves_hub_web/live/org/roles.ex:101-109 | lib/nerves_hub_web/live/org/roles.ex:118-126 — 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) lib/nerves_hub_web/controllers/api/device_log_controller.ex:102— lib/nerves_hub_web/controllers/api/device_log_controller.ex:102-110 | lib/nerves_hub_web/controllers/api/device_metric_controller.ex:93-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub_web/controllers/api/device_log_controller.ex:102` 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.
Weak hash algorithm lib/nerves_hub/certificate.ex:173— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Weak hash algorithm lib/nerves_hub/device_tls.ex:240— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`:crypto.hash(:sha256, data)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark lib/nerves_hub_web/components/layouts/root.html.heex:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC4 · Keyboard semantics· Modal dialog does not manage focus · ×1
Modal dialog does not manage focus lib/nerves_hub_web/components/command_palette.ex:64— 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.
AC4 · Keyboard semantics· Link used as a button (placeholder href) · ×1
Link used as a button (placeholder href) lib/nerves_hub_web/components/layouts/sidebar.html.heex:145— An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
Focus outline removed inline lib/nerves_hub_web/components/command_palette.ex:72— <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
Fwup.do_delta_file (cyclomatic 21) lib/nerves_hub/firmwares/update_tool/fwup.ex:231— Fwup.do_delta_file has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
handleKeydown (cyclomatic 20) assets/js/hooks/advancedQueryEditor.js:709— handleKeydown has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
advancedQueryEditor.classify (cyclomatic 19) assets/js/hooks/advancedQueryEditor.js:94— advancedQueryEditor.classify 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.
mounted (cyclomatic 18) assets/js/hooks/chart.js:6— mounted has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 13 function items inside it that branch (breachLevel, pointColor, pointRadius, …). 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.
Floating source dependency: opentelemetry_oban — Runtime dependency `:opentelemetry_oban` is fetched from source in mix.exs and tracks a branch — the declaration pins no immutable revision, so `mix deps.update` moves this dependency to code nobody reviewed. Pin it with `ref:` (a full commit SHA) or `tag:`.
advancedQueryEditor.classify (cognitive 35) assets/js/hooks/advancedQueryEditor.js:94— advancedQueryEditor.classify has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: assets/js/hooks/advancedQueryEditor.js holds 3 of the 9 methods over the threshold — including the worst — and 38 of the 78 points over it (49%), 2.4× the next-largest file (assets/js/hooks/advancedQueryEditor.js at 16). 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.
advancedQueryEditor.tokenize (cognitive 32) assets/js/hooks/advancedQueryEditor.js:14— advancedQueryEditor.tokenize has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (10 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: assets/js/hooks/advancedQueryEditor.js holds 3 of the 9 methods over the threshold — including the worst — and 38 of the 78 points over it (49%), 2.4× the next-largest file (assets/js/hooks/advancedQueryEditor.js at 16). 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.
handleKeydown (cognitive 31) assets/js/hooks/advancedQueryEditor.js:709— handleKeydown has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Fwup.do_delta_file (cognitive 28) lib/nerves_hub/firmwares/update_tool/fwup.ex:231— Fwup.do_delta_file has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Rauc.read_signature (cognitive 18) lib/nerves_hub/firmwares/update_tool/rauc.ex:249— Rauc.read_signature has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeviceController.create_device (cognitive 18) lib/nerves_hub_web/controllers/api/device_controller.ex:101— DeviceController.create_device has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Index.handle_event (cognitive 18) lib/nerves_hub_web/live/devices/index.ex:412— Index.handle_event has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mounted (cognitive 17) assets/js/hooks/chart.js:6— mounted has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 2. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 13 function items inside it that branch (breachLevel, pointColor, pointRadius, …). 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.
advancedQueryEditor.setCaretOffset (cognitive 16) assets/js/hooks/advancedQueryEditor.js:361— advancedQueryEditor.setCaretOffset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function item inside it that branches (walk). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest. This file is where this pass's cognitive complexity CONCENTRATES: assets/js/hooks/advancedQueryEditor.js holds 3 of the 9 methods over the threshold — including the worst — and 38 of the 78 points over it (49%), 2.4× the next-largest file (assets/js/hooks/advancedQueryEditor.js at 16). 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.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) lib/nerves_hub_web/components/device_page/console_tab.ex:136— lib/nerves_hub_web/components/device_page/console_tab.ex:136-169 | lib/nerves_hub_web/components/device_page/local_shell_tab.ex:85-117 — These two members are one piece of code written twice and then edited apart: 33 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· Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (9 members, 50+ identical tokens) lib/nerves_hub/devices/bulk_actions.ex:85— lib/nerves_hub/devices/bulk_actions.ex:85-90 | lib/nerves_hub/devices/bulk_actions.ex:107-112 | lib/nerves_hub/devices/bulk_actions.ex:126-131 | lib/nerves_hub/devices/bulk_actions.ex:326-333 | lib/nerves_hub/devices/bulk_actions.ex:344-349 | lib/nerves_hub/devices/bulk_actions.ex:360-365 | lib/nerves_hub/devices/bulk_actions.ex:383-388 | lib/nerves_hub/devices/bulk_actions.ex:405-413 | lib/nerves_hub/devices/bulk_actions.ex:518-523 — These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×1
Edited copy of a member (50 corresponding lines) lib/nerves_hub/devices/connections.ex:245— lib/nerves_hub/devices/connections.ex:245-294 | lib/nerves_hub/devices/connections.ex:310-359 — These two members are one piece of code written twice and then edited apart: 50 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 (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) lib/nerves_hub/devices/update_history.ex:229— lib/nerves_hub/devices/update_history.ex:229-269 | lib/nerves_hub/devices/update_history.ex:283-320 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:299— lib/nerves_hub/integrations/chat_webhooks.ex:299-321 | lib/nerves_hub/integrations/slack/subscriptions.ex:320-344 — 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 (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) lib/nerves_hub_web/live/firmware.ex:158— lib/nerves_hub_web/live/firmware.ex:158-181 | lib/nerves_hub_web/live/firmware.ex:186-212 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) lib/nerves_hub/integrations/slack/messages.ex:279— lib/nerves_hub/integrations/slack/messages.ex:279-304 | lib/nerves_hub/integrations/slack/messages.ex:480-509 — 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 copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) lib/nerves_hub_web/live/org/certificate_authorities.ex:56— lib/nerves_hub_web/live/org/certificate_authorities.ex:56-74 | lib/nerves_hub_web/live/org/certificate_authorities.ex:78-97 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) lib/nerves_hub/integrations/chat_webhooks.ex:388— lib/nerves_hub/integrations/chat_webhooks.ex:388-412 | lib/nerves_hub/integrations/slack/subscriptions.ex:412-437 — 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 copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) lib/nerves_hub_web/live/org/integrations.ex:186— lib/nerves_hub_web/live/org/integrations.ex:186-194 | lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:138-146 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:153-163 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 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, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) lib/nerves_hub_web/live/product/health_profiles.ex:52— lib/nerves_hub_web/live/product/health_profiles.ex:52-65 | lib/nerves_hub_web/live/product/health_profiles.ex:69-87 | lib/nerves_hub_web/live/product/health_profiles.ex:91-106 | lib/nerves_hub_web/live/product/health_profiles.ex:110-126 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) lib/nerves_hub_web/live/devices/index.ex:555— lib/nerves_hub_web/live/devices/index.ex:555-566 | lib/nerves_hub_web/live/devices/index.ex:571-585 | lib/nerves_hub_web/live/devices/index.ex:590-604 | lib/nerves_hub_web/live/devices/index.ex:609-626 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) lib/nerves_hub/product_notifications.ex:207— lib/nerves_hub/product_notifications.ex:207-224 | lib/nerves_hub/product_notifications.ex:280-296 | lib/nerves_hub/product_notifications.ex:317-331 — 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 (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) lib/nerves_hub_web/components/device_page/activity_tab.ex:88— lib/nerves_hub_web/components/device_page/activity_tab.ex:88-97 | lib/nerves_hub_web/components/device_page/activity_tab.ex:101-113 | lib/nerves_hub_web/components/device_page/firmware_history_tab.ex:110-119 | lib/nerves_hub_web/components/device_page/firmware_history_tab.ex:123-135 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) lib/nerves_hub/accounts.ex:568— lib/nerves_hub/accounts.ex:568-574 | lib/nerves_hub/devices.ex:249-256 | lib/nerves_hub/error_reports.ex:192-197 | lib/nerves_hub/managed_deployments.ex:69-74 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:123— lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:123-132 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:48-57 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:138-147 — 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 (1 corresponding lines) · ×1
Edited copy of a member (1 corresponding lines) lib/nerves_hub/devices/log_lines.ex:111— lib/nerves_hub/devices/log_lines.ex:111-111 | lib/nerves_hub/devices/metrics.ex:205-205 — These two members are one piece of code written twice and then edited apart: 1 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.
Duplicated block (17–21 lines × 2) lib/nerves_hub/devices/connections.ex:339— lib/nerves_hub/devices/connections.ex:339-355 | lib/nerves_hub/devices/update_history.ex:295-315 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/devices/connections.ex:339` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/nerves_hub/devices/update_history.ex:316` calls `fragment` and `lib/nerves_hub/devices/connections.ex:356` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (21 lines × 2) lib/nerves_hub_web/live/deployment_groups/show.ex:197— lib/nerves_hub_web/live/deployment_groups/show.ex:197-217 | lib/nerves_hub_web/live/deployment_groups/show.ex:249-269 — 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 (15–19 lines × 2) lib/nerves_hub/devices/connections.ex:276— lib/nerves_hub/devices/connections.ex:276-290 | lib/nerves_hub/devices/update_history.ex:246-264 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/devices/connections.ex:276` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/nerves_hub/devices/update_history.ex:265` calls `fragment` and `lib/nerves_hub/devices/connections.ex:291` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (29–30 lines × 2) lib/nerves_hub_web/components/device_page/console_tab.ex:136— lib/nerves_hub_web/components/device_page/console_tab.ex:136-165 | lib/nerves_hub_web/components/device_page/local_shell_tab.ex:85-113 — 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 (18 lines × 2) lib/nerves_hub_web.ex:185— lib/nerves_hub_web.ex:185-202 | lib/nerves_hub_web.ex:312-329 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 3) lib/nerves_hub_web.ex:184— lib/nerves_hub_web.ex:184-200 | lib/nerves_hub_web.ex:261-277 | lib/nerves_hub_web.ex:311-327 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–17 lines × 2) lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:151— lib/nerves_hub_web/live/org/integrations/chat_webhook_section.ex:151-167 | lib/nerves_hub_web/live/org/integrations/slack_section.ex:180-192 — 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 (15 lines × 2) lib/nerves_hub/integrations/chat_webhooks.ex:307— lib/nerves_hub/integrations/chat_webhooks.ex:307-321 | lib/nerves_hub/integrations/slack/subscriptions.ex:330-344 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/integrations/chat_webhooks.ex:307` 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 (13–15 lines × 2) lib/nerves_hub/product_notifications.ex:282— lib/nerves_hub/product_notifications.ex:282-296 | lib/nerves_hub/product_notifications.ex:346-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 3) lib/nerves_hub_web/components/deployment_group_page/releases.ex:722— lib/nerves_hub_web/components/deployment_group_page/releases.ex:722-734 | lib/nerves_hub_web/components/deployment_group_page/releases.ex:739-751 | lib/nerves_hub_web/live/deployment_groups/new.ex:166-178 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (11 lines × 3) lib/nerves_hub_web/live/deployment_groups/new.ex:152— lib/nerves_hub_web/live/deployment_groups/new.ex:152-162 | lib/nerves_hub_web/live/support_scripts/edit.ex:38-48 | lib/nerves_hub_web/live/support_scripts/new.ex:31-41 — 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.
Duplicated block (9–11 lines × 2) lib/nerves_hub_web.ex:126— lib/nerves_hub_web.ex:126-134 | lib/nerves_hub_web.ex:204-214 — 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–10 lines × 2) lib/nerves_hub/device_link.ex:688— lib/nerves_hub/device_link.ex:688-696 | lib/nerves_hub/device_link/authentication.ex:213-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8–10 lines × 2) lib/nerves_hub/integrations/teams/cards.ex:277— lib/nerves_hub/integrations/teams/cards.ex:277-284 | lib/nerves_hub/integrations/teams/cards.ex:292-301 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note 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 (4–6 lines × 3) lib/nerves_hub/integrations/discord/embeds.ex:80— lib/nerves_hub/integrations/discord/embeds.ex:80-85 | lib/nerves_hub/integrations/slack/messages.ex:90-93 | lib/nerves_hub/integrations/teams/cards.ex:76-81 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/slack/messages.ex` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 3) lib/nerves_hub/integrations/discord/embeds.ex:106— lib/nerves_hub/integrations/discord/embeds.ex:106-115 | lib/nerves_hub/integrations/slack/messages.ex:110-119 | lib/nerves_hub/integrations/teams/cards.ex:101-110 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/slack/messages.ex` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 3) lib/nerves_hub/extensions/alarms.ex:188— lib/nerves_hub/extensions/alarms.ex:188-196 | lib/nerves_hub/extensions/error_reports.ex:118-126 | lib/nerves_hub/extensions/metrics.ex:189-197 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/nerves_hub/extensions/alarms.ex:188` 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 (6 lines × 3) lib/nerves_hub/integrations/discord/embeds.ex:326— lib/nerves_hub/integrations/discord/embeds.ex:326-331 | lib/nerves_hub/integrations/slack/messages.ex:381-386 | lib/nerves_hub/integrations/teams/cards.ex:330-335 — before extracting anything, compare `lib/nerves_hub/integrations/discord/embeds.ex` and `lib/nerves_hub/integrations/slack/messages.ex` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 5) lib/nerves_hub_web/live/archives.ex:74— lib/nerves_hub_web/live/archives.ex:74-78 | lib/nerves_hub_web/live/deployment_groups/index.ex:105-109 | lib/nerves_hub_web/live/devices/index.ex:194-198 | lib/nerves_hub_web/live/firmware.ex:106-110 | lib/nerves_hub_web/live/support_scripts/index.ex:77-81 — `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/support_scripts/index.ex` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (9 lines × 5) lib/nerves_hub_web/live/archives.ex:86— lib/nerves_hub_web/live/archives.ex:86-94 | lib/nerves_hub_web/live/deployment_groups/index.ex:133-141 | lib/nerves_hub_web/live/devices/index.ex:165-173 | lib/nerves_hub_web/live/firmware.ex:117-126 | lib/nerves_hub_web/live/support_scripts/index.ex:98-106 — `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/support_scripts/index.ex` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (7 lines × 5) lib/nerves_hub_web/live/archives.ex:209— lib/nerves_hub_web/live/archives.ex:209-215 | lib/nerves_hub_web/live/deployment_groups/index.ex:191-197 | lib/nerves_hub_web/live/devices/index.ex:1160-1166 | lib/nerves_hub_web/live/firmware.ex:331-337 | lib/nerves_hub_web/live/support_scripts/index.ex:188-194 — `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/support_scripts/index.ex` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (5 lines × 3) lib/nerves_hub_web/live/deployment_groups/index.ex:146— lib/nerves_hub_web/live/deployment_groups/index.ex:146-150 | lib/nerves_hub_web/live/devices/index.ex:178-182 | lib/nerves_hub_web/live/support_scripts/index.ex:112-116 — `lib/nerves_hub_web/live/deployment_groups/index.ex` and `lib/nerves_hub_web/live/support_scripts/index.ex` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 38 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (7 lines × 3) lib/nerves_hub/integrations/chat_webhooks.ex:167— lib/nerves_hub/integrations/chat_webhooks.ex:167-173 | lib/nerves_hub/integrations/slack/subscriptions.ex:169-175 | lib/nerves_hub/webhooks.ex:182-188 — 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.
Duplicated block (5 lines × 9) lib/nerves_hub/devices/bulk_actions.ex:86— lib/nerves_hub/devices/bulk_actions.ex:86-90 | lib/nerves_hub/devices/bulk_actions.ex:108-112 | lib/nerves_hub/devices/bulk_actions.ex:127-131 | lib/nerves_hub/devices/bulk_actions.ex:329-333 | lib/nerves_hub/devices/bulk_actions.ex:345-349 | lib/nerves_hub/devices/bulk_actions.ex:361-365 | lib/nerves_hub/devices/bulk_actions.ex:384-388 | lib/nerves_hub/devices/bulk_actions.ex:409-413 | lib/nerves_hub/devices/bulk_actions.ex:519-523 — all 9 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.
Type Safety — 0 typed · 39 plain JS — the untyped files are assets/js/app.js, assets/js/helpers/fonts.js, assets/js/helpers/fonts.test.js, assets/js/helpers/mapStyle.js, assets/js/helpers/mapStyle.test.js, assets/js/helpers/terminal.js (+33 more).
R10 · Code Duplication· Duplicated block with local edits (82 matched lines × 2 locations) · ×1
Duplicated block with local edits (82 matched lines × 2 locations) assets/js/hooks/scriptAutocomplete.js:45— assets/js/hooks/scriptAutocomplete.js:45 · assets/js/hooks/tagAutocomplete.js:37 — the two spans are one implementation copied and then locally edited — 467 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 (38 lines × 2 locations) assets/js/hooks/console.js:9— assets/js/hooks/console.js:9 · assets/js/hooks/localShell.js:8 — 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 (13 lines × 2 locations) assets/js/hooks/console.js:115— assets/js/hooks/console.js:115 · assets/js/hooks/localShell.js:59 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (13 matched lines × 2 locations) · ×1
Duplicated block with local edits (13 matched lines × 2 locations) assets/js/hooks/donutChart.js:75— assets/js/hooks/donutChart.js:75 · assets/js/hooks/updateOutcomesChart.js:105 — 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.
R10 · Code Duplication· Duplicated block with local edits (12 matched lines × 2 locations) · ×1
Duplicated block with local edits (12 matched lines × 2 locations) assets/js/hooks/barChart.js:65— assets/js/hooks/barChart.js:65 · assets/js/hooks/updateOutcomesChart.js:50 — the two spans are one implementation copied and then locally edited — 77 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 (10 matched lines × 2 locations) · ×1
Duplicated block with local edits (10 matched lines × 2 locations) assets/js/app.js:156— assets/js/app.js:156 · assets/js/app.js:168 — 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.
Duplicated block (10 lines × 2 locations) assets/js/hooks/scriptAutocomplete.js:21— assets/js/hooks/scriptAutocomplete.js:21 · assets/js/hooks/tagAutocomplete.js:29 — 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 (5 lines × 3 locations) assets/js/hooks/chart.js:165— assets/js/hooks/chart.js:165 · assets/js/hooks/chart.js:177 · assets/js/hooks/chart.js:190 — all 3 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
Complex function handleKeydown (cyclomatic 20, cognitive 31) assets/js/hooks/advancedQueryEditor.js:709— handleKeydown has cyclomatic complexity 20 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function classify (cyclomatic 19, cognitive 35) assets/js/hooks/advancedQueryEditor.js:94— classify has cyclomatic complexity 19 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function tokenize (cyclomatic 15, cognitive 32) assets/js/hooks/advancedQueryEditor.js:14— tokenize has cyclomatic complexity 15 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· assets/js/hooks/advancedQueryEditor.js · ×1
assets/js/hooks/advancedQueryEditor.js: 692 lines of code assets/js/hooks/advancedQueryEditor.js:1— assets/js/hooks/advancedQueryEditor.js has 692 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Unused dependency '@xterm/addon-search' REDACTED:15— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'popper.js' REDACTED:31— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'tailwind-scrollbar' REDACTED:34— Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Silent fallback default on error lib/nerves_hub_web/live/devices/index.ex:543— `handle_event` matches `_` and answers `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/live/devices/index.ex:1064— `still_allowed_target` matches `{:error, :not_found}` and answers `:not_allowed` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/integrations/slack/unfurls.ex:100— `unfurl` matches `_` and answers `:nothing` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/integrations/slack/unfurls.ex:129— `page` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/integrations/slack/workflow_steps.ex:73— `click` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/integrations/slack/workflow_steps.ex:134— `step` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/helpers/client_ip.ex:146— `parse` matches `{:error, _reason}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/helpers/client_ip.ex:172— `format` matches `{:error, _reason}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/controllers/account_controller.ex:78— `render_invite` matches `{:error, :not_found}` and answers `:register` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/controllers/password_reset_controller.ex:25— `create` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/controllers/api/deployment_group_controller.ex:217— `resolve_firmware` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/controllers/api/deployment_group_controller.ex:230— `resolve_archive` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/channels/device_socket.ex:115— `redirect_target` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/channels/user_console_channel.ex:143— `authorized?` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub_web/channels/user_local_shell_channel.ex:73— `authorized?` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/accounts.ex:824— `maybe_copy_firmware_keys` matches `_` and answers `[]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/accounts.ex:1683— `get_user_by_reset_password_token` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/certificate.ex:33— `get_aki` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/device_tls.ex:124— `installed_sha1` matches `_` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/error_reports.ex:134— `encode_frames` matches `{:error, _reason}` and answers `"[]"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/firmwares.ex:669— `metadata_from_device` matches `{:error, _}` and answers `{:ok, nil}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/firmwares.ex:1059— `do_attempt_firmware_delta` matches `{:ok, %FirmwareDelta{}}` and answers `{:ok, :delta_already_exists}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/ssl.ex:278— `maybe_jitp_device` matches `_` and answers `:device_not_registered` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/proxy_protocol/tcp.ex:139— `own_address` matches `{:error, _reason}` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Silent fallback default on error lib/nerves_hub/managed_deployments/orchestrator/coordinator.ex:40— `schedule_devices!` matches `{:error, :updates_blocked, _device}` and answers `false` — a failure becomes a plausible value and a silent behavior change with no trail. Log the reason or return the `{:error, reason}` tuple. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Duplicated predicate lib/nerves_hub_web/live/devices/index.ex:1322— `Application.get_env(:nerves_hub, :devices_websocket_url) || URI.parse(NervesHubWeb.Endpoint.url()).host` appears character-identically in 2 files — lib/nerves_hub_web/live/devices/index.ex, lib/nerves_hub_web/live/product/insights.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub_web/auth.ex:346— `conn.assigns.current_scope && conn.assigns.current_scope.user` appears character-identically in 2 files — lib/nerves_hub_web/auth.ex, lib/nerves_hub_web/controllers/account_controller.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub_web/helpers/client_ip.ex:110— `conn.private[:phoenix_endpoint] || NervesHubWeb.Endpoint` appears character-identically in 2 files — lib/nerves_hub_web/helpers/client_ip.ex, lib/nerves_hub_web/plugs/attack.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/devices/deployments.ex:45— `f.product_id == d.product_id and f.uuid == fragment("?->>'uuid'", d.firmware_metadata) and is_nil(f.deleted_at)` appears character-identically in 2 files — lib/nerves_hub/devices/deployments.ex, lib/nerves_hub/managed_deployments.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/devices/updates.ex:210— `fd.source_id == f.id and fd.target_id == tr.firmware_id` appears character-identically in 2 files — lib/nerves_hub/devices/updates.ex, lib/nerves_hub/managed_deployments.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/integrations/discord/embeds.ex:303— `get_in(data, ["deployment_group", "name"]) || "a deployment group"` appears character-identically in 2 files — lib/nerves_hub/integrations/discord/embeds.ex, lib/nerves_hub/integrations/teams/cards.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/integrations/discord/embeds.ex:302— `get_in(data, ["step", "name"]) || "a step"` appears character-identically in 3 files — lib/nerves_hub/integrations/discord/embeds.ex, lib/nerves_hub/integrations/slack/messages.ex, lib/nerves_hub/integrations/teams/cards.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/integrations/discord/embeds.ex:400— `get_in(event, ["device", "identifier"]) || "a device"` appears character-identically in 2 files — lib/nerves_hub/integrations/discord/embeds.ex, lib/nerves_hub/integrations/teams/cards.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/accounts/scope.ex:34— `is_atom(role) or is_struct(role, OrgRole)` appears character-identically in 2 files — lib/nerves_hub/accounts/scope.ex, lib/nerves_hub_web/helpers/authorization.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/device_tls.ex:70— `is_binary(key_pem) and is_binary(chain_pem)` appears character-identically in 2 files — lib/nerves_hub/device_tls.ex, lib/nerves_hub/device_tls/cluster.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub_web/integrations/slack/actions.ex:177— `is_binary(team_id) and is_binary(slack_user_id)` appears character-identically in 2 files — lib/nerves_hub_web/integrations/slack/actions.ex, lib/nerves_hub_web/integrations/slack/commands.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub/integrations/discord/embeds.ex:313— `is_integer(number) and is_integer(steps)` appears character-identically in 3 files — lib/nerves_hub/integrations/discord/embeds.ex, lib/nerves_hub/integrations/slack/messages.ex, lib/nerves_hub/integrations/teams/cards.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub_web/components/device_page/details_tab.ex:640— `is_nil(connection) || connection.status != :connected` appears character-identically in 2 files — lib/nerves_hub_web/components/device_page/details_tab.ex, lib/nerves_hub_web/live/devices/show.ex. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate lib/nerves_hub_web/live/archives.ex:183— `pagination_opts["sort"] || "inserted_at"` appears character-identically in 2 files — lib/nerves_hub_web/live/archives.ex, lib/nerves_hub_web/live/firmware.ex. 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.
Orphaned file priv/repo/seeds.exs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/nerves_hub_web/channels/presence.ex: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.
Partial audit-trail evidence — An audit mechanism is present, but the trail is not yet complete — missing: a write-side hook every change flows through (ExAudit.Repo, PaperTrail, AshPaperTrail, Carbonite, a Commanded middleware recording each command, or an event-sourced store), per-model coverage (a change-history library on each model that needs a who-changed-what trail, or an event-sourced aggregate).
C4 · Data Retention· Partial data-retention evidence · ×1
Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 125 significant file(s) lose their only recent owner: lib/nerves_hub/firmwares.ex, lib/nerves_hub/managed_deployments/workflows.ex, lib/nerves_hub/devices/updates.ex, lib/nerves_hub/firmwares/update_tool/esp_idf.ex, lib/nerves_hub/firmwares/update_tool/rauc.ex, lib/nerves_hub/devices/network_identities.ex, lib/nerves_hub/product_notifications.ex, lib/nerves_hub/integrations/slack/messages.ex (+117 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (127 single-owned of 311 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; 311 of the 796 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lib/nerves_hub_web/briefly_upload_writer.ex, lib/nerves_hub_web/controllers/api/schemas/archive_schemas.ex.
No ADRs found mix.exs:26— 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 `mix.exs` makes this repository a deployable product (line 26).
redundant comment assets/js/hooks/deviceLocationMapWithGeocoder.js:34— "Add the control to the map." repeats the code it sits on: 3 of its 3 words (add, control, map) are already in `this.map.addControl(geocoder)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion mix.exs:1— `(repository root)` (70018 LoC, 617 module-visible types across 70 directories) overshoots its size bounds. 1 of 2 build unit(s) (Mix, npm) overshoot their size bounds, lowering Project Cohesion to 0.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 2 of 311 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; 311 of the 796 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: priv/repo/seeds.exs, lib/nerves_hub_web/channels/presence.ex. 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.
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· Dependabot does not watch npm · ×1
Dependabot does not watch npm REDACTED:3— `REDACTED` schedules updates, but no `package-ecosystem` entry covers `npm`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety REDACTED:291— Deployment is orchestrated by compose, but no service declares a `healthcheck:` and nothing pins a previous image to fall back to — the runtime can tell that the container is up, not that it is serving, so a bad release is harder to detect and reverse.
Security headers incomplete — Set: Content-Security-Policy, Referrer-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Permitted-Cross-Domain-Policies. Missing: X-Frame-Options — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−0.5 on this card.) The server: lib/nerves_hub_web/device_endpoint.ex:3 — `Phoenix.Endpoint`.
Silent fallback default in rescue lib/nerves_hub_web/helpers/server_name.ex:36— `server_name` rescues `Bandit.TransportError` and answers `nil` — a failure becomes a plausible value and a silent behavior change with no trail. Log the exception or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be produced, say so in a comment at the clause or in the `@doc`, and the row stops firing.
Outdated: dialyxir — `:dialyxir` is locked at 1.4.8 but 1.4.9 is the current stable release on hex.pm, and it already satisfies the `"~> 1.4"` requirement declared in mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update dialyxir` and commit the updated mix.lock.
Outdated: hackney — `:hackney` is locked at 4.9.1 but 4.12.0 is the current stable release on hex.pm, and it already satisfies the `"~> 4.7"` requirement declared in mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update hackney` and commit the updated mix.lock.
Outdated: live_flow — `:live_flow` is locked at 0.3.2 but 0.3.3 is the current stable release on hex.pm, and it already satisfies the `"~> 0.3.2"` requirement declared in mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update live_flow` and commit the updated mix.lock.
Outdated: oban_web — `:oban_web` is locked at 2.13.1 but 2.13.2 is the current stable release on hex.pm, and it already satisfies the `"~> 2.11"` requirement declared in mix.exs — so the lockfile is behind this repository's own declared range. Run `mix deps.update oban_web` and commit the updated mix.lock.
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.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
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.
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.
Run 01a1e000-d8fe-7c32-9594-85853d88b84b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 90 · Warnings: 360 · Recommendations: 73 · Info: 4 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 16:18 UTC.
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.