Public report of cachix/devenv, published 14 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, 14 November 2026, 17:13 UTC · Survey ID cd_e7db82857b254cd28fd485dc0c8b49f1
cachix/devenv
Measured 14 November 2026, 17:13 UTC, at code version 6c954cc
CAI scoreAt riskNo change since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 107,428 lines of product code in 21 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Security and Compliance, 21
Findings by how serious they are
120 critical497 serious20 minor
30 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
14 November 2026, 17:13 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
56of 56 dimensions measured by tools.
613of 637 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
56dimensions across 7 lenses, read from 107,428 lines of product code in 21 projects.
cachix/devenv is rated At risk because critical security findings are open, most of them in the build pipeline. Its score is held back because we found no access checks on the code's endpoints or handlers and four of the dependencies have a known vulnerability. It scores 44 out of 100, which the At risk rating leaves unchanged.
Security and Compliance, at 21, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 14 points. Restoring certificate checks comes next, worth about 10 points. Raising Security and Compliance to 70 would lift the score to about 63.
Sixty-nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twenty-two secrets can leak from the build pipeline, and twelve pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Pinning each tool to an exact version, limiting each secret to its own step and passing outside input through environment variables would close these risks. Fixing the weaknesses the scanner points to would fix the six security weaknesses in the code, and updating the vulnerable packages would deal with the four packages with a known security hole. The set of files in separate parts that keep changing together needs that dependency made explicit.
The product code is 107,428 lines, about €110,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.
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: 29 findings
These 29 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one.
Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium vulnerability: [GHSA redacted] REDACTED
Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0346 REDACTED
Rebuild cost: about €110,000 · Estimate
Cost to rebuild
€36,000 to €180,000, for 606 to 1,923 hours of work, about 0.8 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 44. 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
Large: 107,428 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
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 14 points · Medium effort · Access Controls
2
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
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 €110,000 to build again, about 0.8 person-years of work. Its weakest lens is Security and Compliance, at 21 (Critical). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 14 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 106,345 lines over the last 90 days, which is about 431,288 lines a year. At that pace, the extra work comes to an estimated 21.6 to 143.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
190 modules, with 280 dependencies between them. 3 loops run through 7 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 150 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.
devenv_activity.builders uses devenv_activity.events, so a change to devenv_activity.events can break devenv_activity.builders, while a change to devenv_activity.builders can't break devenv_activity.events.
Position
Below the diagonal: devenv_activity.builders uses a module listed above it, which is the healthy direction.
12→21 devenv_activity.builders uses devenv_activity.activitypart of a loop✕
Connections
4 pairs of types, where a type in devenv_activity.builders uses a type in devenv_activity.activity.
devenv_activity.builders uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_activity.builders, while a change to devenv_activity.builders can't break devenv_activity.activity.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
devenv_core.ports uses devenv_activity.serde_valuable, so a change to devenv_activity.serde_valuable can break devenv_core.ports, while a change to devenv_core.ports can't break devenv_activity.serde_valuable.
Position
Below the diagonal: devenv_core.ports uses a module listed above it, which is the healthy direction.
devenv_core.settings uses devenv_core.config, so a change to devenv_core.config can break devenv_core.settings, while a change to devenv_core.settings can't break devenv_core.config.
Position
Below the diagonal: devenv_core.settings uses a module listed above it, which is the healthy direction.
devenv_processes.process_guardian uses devenv_activity.events, so a change to devenv_activity.events can break devenv_processes.process_guardian, while a change to devenv_processes.process_guardian can't break devenv_activity.events.
Position
Below the diagonal: devenv_processes.process_guardian uses a module listed above it, which is the healthy direction.
devenv_processes.process_guardian uses devenv_processes.config, so a change to devenv_processes.config can break devenv_processes.process_guardian, while a change to devenv_processes.process_guardian can't break devenv_processes.config.
Position
Below the diagonal: devenv_processes.process_guardian uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor_state uses devenv_processes.config, so a change to devenv_processes.config can break devenv_processes.supervisor_state, while a change to devenv_processes.supervisor_state can't break devenv_processes.config.
Position
Below the diagonal: devenv_processes.supervisor_state uses a module listed above it, which is the healthy direction.
devenv_shell.dialect uses devenv_shell.keybindings, so a change to devenv_shell.keybindings can break devenv_shell.dialect, while a change to devenv_shell.dialect can't break devenv_shell.keybindings.
Position
Below the diagonal: devenv_shell.dialect uses a module listed above it, which is the healthy direction.
devenv_shell.session uses devenv_mailbox, so a change to devenv_mailbox can break devenv_shell.session, while a change to devenv_shell.session can't break devenv_mailbox.
Position
Below the diagonal: devenv_shell.session uses a module listed above it, which is the healthy direction.
devenv_shell.session uses devenv_shell.keybindings, so a change to devenv_shell.keybindings can break devenv_shell.session, while a change to devenv_shell.session can't break devenv_shell.keybindings.
Position
Below the diagonal: devenv_shell.session uses a module listed above it, which is the healthy direction.
devenv_tui.config uses devenv_activity.serde_valuable, so a change to devenv_activity.serde_valuable can break devenv_tui.config, while a change to devenv_tui.config can't break devenv_activity.serde_valuable.
Position
Below the diagonal: devenv_tui.config uses a module listed above it, which is the healthy direction.
devenv_tui.config uses devenv_shell.keybindings, so a change to devenv_shell.keybindings can break devenv_tui.config, while a change to devenv_tui.config can't break devenv_shell.keybindings.
Position
Below the diagonal: devenv_tui.config uses a module listed above it, which is the healthy direction.
devenv.devenv.machines uses devenv_activity.events, so a change to devenv_activity.events can break devenv.devenv.machines, while a change to devenv.devenv.machines can't break devenv_activity.events.
Position
Below the diagonal: devenv.devenv.machines uses a module listed above it, which is the healthy direction.
devenv.devenv.machines uses devenv_core.settings, so a change to devenv_core.settings can break devenv.devenv.machines, while a change to devenv.devenv.machines can't break devenv_core.settings.
Position
Below the diagonal: devenv.devenv.machines uses a module listed above it, which is the healthy direction.
devenv.devenv.machines uses devenv_processes.supervisor_state, so a change to devenv_processes.supervisor_state can break devenv.devenv.machines, while a change to devenv.devenv.machines can't break devenv_processes.supervisor_state.
Position
Below the diagonal: devenv.devenv.machines uses a module listed above it, which is the healthy direction.
20→36 devenv.devenv.machines uses devenv.devenvpart of a loop✕
Connections
1 pair of types, where a type in devenv.devenv.machines uses a type in devenv.devenv.
devenv.devenv.machines uses devenv.devenv, so a change to devenv.devenv can break devenv.devenv.machines, while a change to devenv.devenv.machines can't break devenv.devenv.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
devenv_activity.activity uses devenv_activity.events, so a change to devenv_activity.events can break devenv_activity.activity, while a change to devenv_activity.activity can't break devenv_activity.events.
Position
Below the diagonal: devenv_activity.activity uses a module listed above it, which is the healthy direction.
devenv_activity.activity uses devenv_activity.builders, so a change to devenv_activity.builders can break devenv_activity.activity, while a change to devenv_activity.activity can't break devenv_activity.builders.
Position
Below the diagonal: devenv_activity.activity uses a module listed above it, which is the healthy direction.
devenv_core.nix_config uses devenv_core.config, so a change to devenv_core.config can break devenv_core.nix_config, while a change to devenv_core.nix_config can't break devenv_core.config.
Position
Below the diagonal: devenv_core.nix_config uses a module listed above it, which is the healthy direction.
devenv_core.nix_config uses devenv_core.paths, so a change to devenv_core.paths can break devenv_core.nix_config, while a change to devenv_core.nix_config can't break devenv_core.paths.
Position
Below the diagonal: devenv_core.nix_config uses a module listed above it, which is the healthy direction.
devenv_core.nix_config uses devenv_core.settings, so a change to devenv_core.settings can break devenv_core.nix_config, while a change to devenv_core.nix_config can't break devenv_core.settings.
Position
Below the diagonal: devenv_core.nix_config uses a module listed above it, which is the healthy direction.
devenv_tui.model uses devenv_activity.events, so a change to devenv_activity.events can break devenv_tui.model, while a change to devenv_tui.model can't break devenv_activity.events.
Position
Below the diagonal: devenv_tui.model uses a module listed above it, which is the healthy direction.
devenv_tui.model uses devenv_tui.config, so a change to devenv_tui.config can break devenv_tui.model, while a change to devenv_tui.model can't break devenv_tui.config.
Position
Below the diagonal: devenv_tui.model uses a module listed above it, which is the healthy direction.
23→26 devenv_tui.model uses devenv_tui.apppart of a loop✕
Connections
1 pair of types, where a type in devenv_tui.model uses a type in devenv_tui.app.
devenv_tui.model uses devenv_tui.app, so a change to devenv_tui.app can break devenv_tui.model, while a change to devenv_tui.model can't break devenv_tui.app.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
devenv_core.nix_log_bridge uses devenv_activity.events, so a change to devenv_activity.events can break devenv_core.nix_log_bridge, while a change to devenv_core.nix_log_bridge can't break devenv_activity.events.
Position
Below the diagonal: devenv_core.nix_log_bridge uses a module listed above it, which is the healthy direction.
devenv_core.nix_log_bridge uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_core.nix_log_bridge, while a change to devenv_core.nix_log_bridge can't break devenv_activity.activity.
Position
Below the diagonal: devenv_core.nix_log_bridge uses a module listed above it, which is the healthy direction.
devenv_processes.manager uses devenv_activity.events, so a change to devenv_activity.events can break devenv_processes.manager, while a change to devenv_processes.manager can't break devenv_activity.events.
Position
Below the diagonal: devenv_processes.manager uses a module listed above it, which is the healthy direction.
devenv_processes.manager uses devenv_processes.config, so a change to devenv_processes.config can break devenv_processes.manager, while a change to devenv_processes.manager can't break devenv_processes.config.
Position
Below the diagonal: devenv_processes.manager uses a module listed above it, which is the healthy direction.
devenv_processes.manager uses devenv_processes.process_guardian, so a change to devenv_processes.process_guardian can break devenv_processes.manager, while a change to devenv_processes.manager can't break devenv_processes.process_guardian.
Position
Below the diagonal: devenv_processes.manager uses a module listed above it, which is the healthy direction.
devenv_processes.manager uses devenv_processes.supervisor_state, so a change to devenv_processes.supervisor_state can break devenv_processes.manager, while a change to devenv_processes.manager can't break devenv_processes.supervisor_state.
Position
Below the diagonal: devenv_processes.manager uses a module listed above it, which is the healthy direction.
devenv_processes.manager uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_processes.manager, while a change to devenv_processes.manager can't break devenv_activity.activity.
Position
Below the diagonal: devenv_processes.manager uses a module listed above it, which is the healthy direction.
devenv_tui.app uses devenv_activity.events, so a change to devenv_activity.events can break devenv_tui.app, while a change to devenv_tui.app can't break devenv_activity.events.
Position
Below the diagonal: devenv_tui.app uses a module listed above it, which is the healthy direction.
devenv_tui.app uses devenv_mailbox, so a change to devenv_mailbox can break devenv_tui.app, while a change to devenv_tui.app can't break devenv_mailbox.
Position
Below the diagonal: devenv_tui.app uses a module listed above it, which is the healthy direction.
devenv_tui.app uses tokio_shutdown, so a change to tokio_shutdown can break devenv_tui.app, while a change to devenv_tui.app can't break tokio_shutdown.
Position
Below the diagonal: devenv_tui.app uses a module listed above it, which is the healthy direction.
devenv_tui.app uses devenv_tui.config, so a change to devenv_tui.config can break devenv_tui.app, while a change to devenv_tui.app can't break devenv_tui.config.
Position
Below the diagonal: devenv_tui.app uses a module listed above it, which is the healthy direction.
devenv_tui.app uses devenv_tui.model, so a change to devenv_tui.model can break devenv_tui.app, while a change to devenv_tui.app can't break devenv_tui.model.
Position
Below the diagonal: devenv_tui.app uses a module listed above it, which is the healthy direction.
devenv_eval_cache.caching_eval uses devenv_eval_cache.ffi_cache, so a change to devenv_eval_cache.ffi_cache can break devenv_eval_cache.caching_eval, while a change to devenv_eval_cache.caching_eval can't break devenv_eval_cache.ffi_cache.
Position
Below the diagonal: devenv_eval_cache.caching_eval uses a module listed above it, which is the healthy direction.
devenv_eval_cache.caching_eval uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_eval_cache.caching_eval, while a change to devenv_eval_cache.caching_eval can't break devenv_activity.activity.
Position
Below the diagonal: devenv_eval_cache.caching_eval uses a module listed above it, which is the healthy direction.
devenv_eval_cache.caching_eval uses devenv_core.nix_log_bridge, so a change to devenv_core.nix_log_bridge can break devenv_eval_cache.caching_eval, while a change to devenv_eval_cache.caching_eval can't break devenv_core.nix_log_bridge.
Position
Below the diagonal: devenv_eval_cache.caching_eval uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_activity.serde_valuable, so a change to devenv_activity.serde_valuable can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_activity.serde_valuable.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_core.config, so a change to devenv_core.config can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_core.config.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_core.paths, so a change to devenv_core.paths can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_core.paths.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_core.store, so a change to devenv_core.store can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_core.store.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_eval_cache.ffi_cache, so a change to devenv_eval_cache.ffi_cache can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_eval_cache.ffi_cache.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_core.settings, so a change to devenv_core.settings can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_core.settings.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_activity.activity.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_nix_backend.backend uses devenv_core.nix_log_bridge, so a change to devenv_core.nix_log_bridge can break devenv_nix_backend.backend, while a change to devenv_nix_backend.backend can't break devenv_core.nix_log_bridge.
Position
Below the diagonal: devenv_nix_backend.backend uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor uses devenv_processes.config, so a change to devenv_processes.config can break devenv_processes.supervisor, while a change to devenv_processes.supervisor can't break devenv_processes.config.
Position
Below the diagonal: devenv_processes.supervisor uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor uses devenv_processes.process_guardian, so a change to devenv_processes.process_guardian can break devenv_processes.supervisor, while a change to devenv_processes.supervisor can't break devenv_processes.process_guardian.
Position
Below the diagonal: devenv_processes.supervisor uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor uses devenv_processes.supervisor_state, so a change to devenv_processes.supervisor_state can break devenv_processes.supervisor, while a change to devenv_processes.supervisor can't break devenv_processes.supervisor_state.
Position
Below the diagonal: devenv_processes.supervisor uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_processes.supervisor, while a change to devenv_processes.supervisor can't break devenv_activity.activity.
Position
Below the diagonal: devenv_processes.supervisor uses a module listed above it, which is the healthy direction.
devenv_processes.supervisor uses devenv_processes.manager, so a change to devenv_processes.manager can break devenv_processes.supervisor, while a change to devenv_processes.supervisor can't break devenv_processes.manager.
Position
Below the diagonal: devenv_processes.supervisor uses a module listed above it, which is the healthy direction.
devenv_tasks.types uses devenv_core.settings, so a change to devenv_core.settings can break devenv_tasks.types, while a change to devenv_tasks.types can't break devenv_core.settings.
Position
Below the diagonal: devenv_tasks.types uses a module listed above it, which is the healthy direction.
devenv_tasks.types uses devenv_processes.manager, so a change to devenv_processes.manager can break devenv_tasks.types, while a change to devenv_tasks.types can't break devenv_processes.manager.
Position
Below the diagonal: devenv_tasks.types uses a module listed above it, which is the healthy direction.
devenv.devenv.cachix uses tokio_shutdown, so a change to tokio_shutdown can break devenv.devenv.cachix, while a change to devenv.devenv.cachix can't break tokio_shutdown.
Position
Below the diagonal: devenv.devenv.cachix uses a module listed above it, which is the healthy direction.
devenv.devenv.cachix uses devenv_core.settings, so a change to devenv_core.settings can break devenv.devenv.cachix, while a change to devenv.devenv.cachix can't break devenv_core.settings.
Position
Below the diagonal: devenv.devenv.cachix uses a module listed above it, which is the healthy direction.
devenv.devenv.cachix uses devenv_nix_backend.backend, so a change to devenv_nix_backend.backend can break devenv.devenv.cachix, while a change to devenv.devenv.cachix can't break devenv_nix_backend.backend.
Position
Below the diagonal: devenv.devenv.cachix uses a module listed above it, which is the healthy direction.
devenv_tasks.config uses devenv_processes.config, so a change to devenv_processes.config can break devenv_tasks.config, while a change to devenv_tasks.config can't break devenv_processes.config.
Position
Below the diagonal: devenv_tasks.config uses a module listed above it, which is the healthy direction.
devenv_tasks.config uses devenv_tasks.types, so a change to devenv_tasks.types can break devenv_tasks.config, while a change to devenv_tasks.config can't break devenv_tasks.types.
Position
Below the diagonal: devenv_tasks.config uses a module listed above it, which is the healthy direction.
devenv.cli uses devenv_core.config, so a change to devenv_core.config can break devenv.cli, while a change to devenv.cli can't break devenv_core.config.
Position
Below the diagonal: devenv.cli uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in devenv.cli uses a type in devenv_tasks.config.
The types involved
devenv.cli.UpArgs → devenv_tasks.config.RunMode
Direction
devenv.cli uses devenv_tasks.config, so a change to devenv_tasks.config can break devenv.cli, while a change to devenv.cli can't break devenv_tasks.config.
Position
Below the diagonal: devenv.cli uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_processes.config, so a change to devenv_processes.config can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_processes.config.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_core.settings, so a change to devenv_core.settings can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_core.settings.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_activity.activity.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_processes.manager, so a change to devenv_processes.manager can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_processes.manager.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_tasks.types, so a change to devenv_tasks.types can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_tasks.types.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.task_state uses devenv_tasks.config, so a change to devenv_tasks.config can break devenv_tasks.task_state, while a change to devenv_tasks.task_state can't break devenv_tasks.config.
Position
Below the diagonal: devenv_tasks.task_state uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_processes.config, so a change to devenv_processes.config can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_processes.config.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses tokio_shutdown, so a change to tokio_shutdown can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break tokio_shutdown.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_core.settings, so a change to devenv_core.settings can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_core.settings.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_activity.activity.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_processes.manager, so a change to devenv_processes.manager can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_processes.manager.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_tasks.types, so a change to devenv_tasks.types can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_tasks.types.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_tasks.config, so a change to devenv_tasks.config can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_tasks.config.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv_tasks.tasks uses devenv_tasks.task_state, so a change to devenv_tasks.task_state can break devenv_tasks.tasks, while a change to devenv_tasks.tasks can't break devenv_tasks.task_state.
Position
Below the diagonal: devenv_tasks.tasks uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_activity.events, so a change to devenv_activity.events can break devenv.devenv, while a change to devenv.devenv can't break devenv_activity.events.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_activity.serde_valuable, so a change to devenv_activity.serde_valuable can break devenv.devenv, while a change to devenv.devenv can't break devenv_activity.serde_valuable.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.backend, so a change to devenv_core.backend can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.backend.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.config, so a change to devenv_core.config can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.config.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.paths, so a change to devenv_core.paths can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.paths.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_eval_cache.ffi_cache, so a change to devenv_eval_cache.ffi_cache can break devenv.devenv, while a change to devenv.devenv can't break devenv_eval_cache.ffi_cache.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.ports, so a change to devenv_core.ports can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.ports.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.settings, so a change to devenv_core.settings can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.settings.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv.devenv.machines, so a change to devenv.devenv.machines can break devenv.devenv, while a change to devenv.devenv can't break devenv.devenv.machines.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_activity.activity, so a change to devenv_activity.activity can break devenv.devenv, while a change to devenv.devenv can't break devenv_activity.activity.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_core.nix_config, so a change to devenv_core.nix_config can break devenv.devenv, while a change to devenv.devenv can't break devenv_core.nix_config.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_processes.manager, so a change to devenv_processes.manager can break devenv.devenv, while a change to devenv.devenv can't break devenv_processes.manager.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_nix_backend.backend, so a change to devenv_nix_backend.backend can break devenv.devenv, while a change to devenv.devenv can't break devenv_nix_backend.backend.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_tasks.types, so a change to devenv_tasks.types can break devenv.devenv, while a change to devenv.devenv can't break devenv_tasks.types.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_tasks.config, so a change to devenv_tasks.config can break devenv.devenv, while a change to devenv.devenv can't break devenv_tasks.config.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.devenv uses devenv_tasks.tasks, so a change to devenv_tasks.tasks can break devenv.devenv, while a change to devenv.devenv can't break devenv_tasks.tasks.
Position
Below the diagonal: devenv.devenv uses a module listed above it, which is the healthy direction.
devenv.reload.owner uses devenv_core.settings, so a change to devenv_core.settings can break devenv.reload.owner, while a change to devenv.reload.owner can't break devenv_core.settings.
Position
Below the diagonal: devenv.reload.owner uses a module listed above it, which is the healthy direction.
devenv.reload.owner uses devenv.devenv, so a change to devenv.devenv can break devenv.reload.owner, while a change to devenv.reload.owner can't break devenv.devenv.
Position
Below the diagonal: devenv.reload.owner uses a module listed above it, which is the healthy direction.
devenv.main uses devenv_core.config, so a change to devenv_core.config can break devenv.main, while a change to devenv.main can't break devenv_core.config.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.main uses devenv_shell.keybindings, so a change to devenv_shell.keybindings can break devenv.main, while a change to devenv.main can't break devenv_shell.keybindings.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.main uses devenv_core.settings, so a change to devenv_core.settings can break devenv.main, while a change to devenv.main can't break devenv_core.settings.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.main uses devenv_tui.config, so a change to devenv_tui.config can break devenv.main, while a change to devenv.main can't break devenv_tui.config.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.main uses devenv_tasks.config, so a change to devenv_tasks.config can break devenv.main, while a change to devenv.main can't break devenv_tasks.config.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.main uses devenv.reload.owner, so a change to devenv.reload.owner can break devenv.main, while a change to devenv.main can't break devenv.reload.owner.
Position
Below the diagonal: devenv.main uses a module listed above it, which is the healthy direction.
devenv.reload uses devenv_core.config, so a change to devenv_core.config can break devenv.reload, while a change to devenv.reload can't break devenv_core.config.
Position
Below the diagonal: devenv.reload uses a module listed above it, which is the healthy direction.
devenv.reload uses devenv_shell.keybindings, so a change to devenv_shell.keybindings can break devenv.reload, while a change to devenv.reload can't break devenv_shell.keybindings.
Position
Below the diagonal: devenv.reload uses a module listed above it, which is the healthy direction.
devenv.reload uses devenv_activity.builders, so a change to devenv_activity.builders can break devenv.reload, while a change to devenv.reload can't break devenv_activity.builders.
Position
Below the diagonal: devenv.reload uses a module listed above it, which is the healthy direction.
devenv.reload uses devenv.reload.owner, so a change to devenv.reload.owner can break devenv.reload, while a change to devenv.reload can't break devenv.reload.owner.
Position
Below the diagonal: devenv.reload uses a module listed above it, which is the healthy direction.
devenv.tracing.activity_json_layer uses devenv.main, so a change to devenv.main can break devenv.tracing.activity_json_layer, while a change to devenv.tracing.activity_json_layer can't break devenv.main.
Position
Below the diagonal: devenv.tracing.activity_json_layer uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 61% · Adequate · gated by R1 ·
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
110
High / Critical
A03:2025 — Software Supply Chain Failures
75
High / Critical
A02:2025 — Security Misconfiguration
5
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off; Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
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 — 120
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 — 497
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 — 20
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 30
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 56 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 — 56 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, 613 of 637 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: the .NET half could not be measured — no coverage produced (collector absent, or test run exceeded the inline budget); the JavaScript/TypeScript half could not be measured — the dependency install for docs/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://codeload.github.com/cachix/site-kit/tar.gz/1e9bb1e181430d4a8d632bc8c1487e16de946091), so the suite never ran. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
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 30 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 39 test source file(s) (.py, .rs) 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 MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for docs/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://codeload.github.com/cachix/site-kit/tar.gz/1e9bb1e181430d4a8d632bc8c1487e16de946091), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
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 for the node:test suite in docs/ was NOT MEASURED: the dependency install for docs/ could not reach codeload.github.com, which the analyzer sandbox's egress allowlist does not carry (npm error 403 403 Forbidden - GET https://codeload.github.com/cachix/site-kit/tar.gz/1e9bb1e181430d4a8d632bc8c1487e16de946091), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Cargo manifest, but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Cargo dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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 package.json, but the licence verdict published here was taken over its gem 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.
D17 Explicit Debt — 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 0 deducted marker(s) and the 0.0/KLoC density on this row were taken over this repository's .NET projects ALONE: .rs (104,961 lines, 98% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 15 task marker(s) (TODO/FIXME/HACK/XXX) across 11 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
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.
D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust 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.
X1 Async correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X13 Undrained process stream — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X14 Bypassable address classification — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X15 Unvalidated length from an untrusted reader — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X17 Uncapped recursion over a caller-supplied document — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X18 Disposal-pattern correctness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X19 Unrestored process-global state — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X22 Contradicted release 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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X25 Inert configuration knob — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X26 Unsynchronised callback handoff — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X29 Per-element action decided by a fixed element — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X30 Support guard that admits what it rejects — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X32 Type resolved by simple name across every loaded assembly — 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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 is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, 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.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 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.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
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.
66 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was devenv_tui::view::ActivityItem at 99. A further 22 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Commands::as_str at 33 — they are counted neither in the figure above nor in this dimension's score. 4 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: devenv/src/cli.rs (Commands::as_str at 33), devenv-shell/src/keybindings.rs (devenv_shell::keybindings::shifted_character at 22), devenv-tui/src/statusline.rs (devenv_tui::statusline::component_is_empty at 20), docs/src/data/technology-registry.ts (technology-registry.validateTechnologyRegistry at 17). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 33 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with devenv_tui::view::ActivityItem (cyclomatic 99), devenv_tui::view::build_help_content (cyclomatic 77), devenv_tui::app::MainView (cyclomatic 74). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cyclomatic Complexity from 6.0 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 45 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 60 down to 60 or less in Cognitive Complexity — start with devenv_tui::app::MainView (cognitive 145), devenv_tui::view::build_help_content (cognitive 145), devenv_tui::view::ActivityItem (cognitive 144). — 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 12 together lifts Cognitive Complexity from 4.4 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 25 FileTooLong finding(s) in God Classes — start with config.rs (2), mod.rs, machines.rs. — One of this dimension's main actionable groups (25 warning-level).
Resolve the 21 MethodTooLong finding(s) in God Classes — start with session.rs (3), machines.rs (2), backend.rs (2). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 14 FunctionTooLong finding(s) in God Classes — start with view.rs (4), expanded_view.rs (4), app.rs. — One of this dimension's main actionable groups (14 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.
97 duplicated block group(s) detected. 2.7 % of the production lines (2,928 of 107,428) are in a reported copy. A further 35 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 132 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 52 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with activity.rs (2), otel.rs (2), nix_log_bridge.rs. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 11 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with activity.rs, socket_activation.rs, keybindings.rs. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with activity.rs (2), executor.rs (2), process_guardian.rs. — 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.
Do you agree with this assessment?
D5 · Coupling6.3 / 10Adequate✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
21 production modules (Gradle+Maven+Cargo), 0 dependency cycle(s), 3 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 6 module(s) off the main sequence, with abstractness counted on 16 of the 21 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: devenv-cache-core · ×6
Unstable project devenv
Unstable project devenv-reload
Unstable project devenv-tasks
What to do
Resolve the 6 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Unstable project devenv finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Unstable project devenv-reload finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with lib.rs (2), devenv_layer.rs, config.rs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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 30 tests. Measured on the JavaScript/TypeScript suite only — at least 39 test source file(s) (.py, .rs) 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.
1 outdated direct gem(s), 0 pinning defect(s). 3 declaration(s) graded against rubygems.org, 1 of them against a version resolved in a committed REDACTED. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
Outdated: solargraph
✓ On the Gold path — maintain.
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.
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 39 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 39 gem(s) a consumer installs — this repository's runtime declarations closed transitively over its committed REDACTED. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. 1 of them publish no licence on rubygems.org; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Cargo manifest and package.json, and the licences of those dependency graphs 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.
Top hotspots: devenv-tui/src/view.rs (16×99=1584); devenv/src/devenv/mod.rs (43×33=1419); devenv/src/main.rs (23×52=1196) Repeated repair below the complexity floor: devenv-processes/src/manager.rs (10 of 15 changes were fixes); devenv-processes/src/supervisor.rs (5 of 9 changes were fixes); devenv-nix-backend/src/lib.rs (5 of 7 changes were fixes)
Resolve the 18 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.rs (3), view.rs, mod.rs. — One of this dimension's main actionable groups (18 warning-level).
Resolve the 8 Repeated repair finding(s) in Churn × Complexity Hotspots — start with manager.rs, supervisor.rs, lib.rs. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.3 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
25 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is devenv/src/devenv/machines.rs. Counted over 145 of the 186 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×2
What to do
Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 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.
0 deducted debt markers + 0 dead symbols across 0 LoC in the .NET projects (0.0/KLoC) → score 10.0. Measured on the .NET source only: .rs (98% of production source) was not read, and carries at least 15 uncounted task marker(s) in 11 file(s).
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.
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.
1 finding(s): 0 critical, 1 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 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 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).
110 finding(s): 0 critical, 109 high, 1 medium, 0 low. 69 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `devenv/src/main.rs` (line 12, line 35) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 7 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (13 issue-level).
Resolve the 12 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED, REDACTED. — One of this dimension's main actionable groups (12 issue-level).
No action in Static Analysis (SAST) — all 69 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (69 issue-level, 0 of them charged here).
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 REDACTED 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 18 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (18). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 14 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (13), REDACTED. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 4 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 2 Critical IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 145 of the 186 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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 executor.rs. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 Change coupling finding(s) in Change Coupling — start with executor.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 4 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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 2 platform declaration(s) and 4 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.
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.
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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
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.
This repository serves requests — a server (axum::serve) (devenv/src/mcp.rs:631) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — devenv/src/mcp.rs:631
What to do
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
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 an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Only 13/17 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `devenv-proxy`, `devenv-run-tests`, `xtask`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 18 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:7
What to do
Add a SAST step to CI running what this repository's stack ships: cargo-audit / cargo-deny (or clippy) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`run_mcp_server` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — devenv/src/mcp.rs:563
`start_capability_broker` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — devenv-processes/src/capabilities.rs:126
`render_loop` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — devenv-tui/src/inline_terminal.rs:170
What to do
Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
Do you agree with this assessment?
R1 · Type Safety2.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.
1 typed · 4 plain JS — the untyped files are functions/_middleware.js, functions/api/generate.js, functions/api/github.js, functions/api/search.js.
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.
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.
readRpc has cyclomatic complexity 16 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — functions/api/search.js:5
onRequestGet has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — functions/api/search.js:40
Do you agree with this assessment?
R3 · Large Files10.0 / 10Exemplary✓ 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.
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 · Tooling6.7 / 10Adequate✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json 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: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add eslint as package.json scripts and run them in CI.
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.
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 Rust 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 (`axum::serve(` (devenv/src/mcp.rs:631)), so its Rust 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 Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.
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.
`.danger_accept_invalid_certs(true)` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on. — devenv-event-sources/src/http_probe.rs:38
None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (devenv/src/mcp.rs:631).
No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `axum::serve(` (devenv/src/mcp.rs:631).
What to do
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
Validate what the server reads from a request — path, query, headers, body size and shape — and answer what fails with 400 (413 for an oversized body) before a handler acts on it: derive `validator::Validate` (or `garde::Validate`) on the request types and reject with `StatusCode::BAD_REQUEST`, and cap bodies with `DefaultBodyLimit::max`/`RequestBodyLimitLayer` or actix's `JsonConfig::default().limit(…)`.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 4 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
SC1 Supply-chain hygiene — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 68 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .py, .rs, .ts — the .NET project files present are an immaterial minority — so the dimension does not apply.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 3 candidate(s) found and not reported.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py, .rs source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — This repository is one project, `Globalization` (0 LoC, 0 public types across 0 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured — .NET and JavaScript/TypeScript suite
DM1 Domain Modelling — applicable but not scored (3 signals for this style, 3 needed — the count is met but a required primary signal is absent): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 47 value object(s); 7 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — reported, not scored — this repository's C# declares no analysable method bodies (a constants, record or DTO assembly), and this score is a density of unfinished work per method, which has no denominator here. The file-level signals below were still collected and are shown in full
M4 Documentation accuracy — Not applicable: the 178 current-state document(s) make no claim of a kind M4 checks. 70 claim(s) of kinds M4 does not check were not checked (path 39, command argument 7, environment variable 20, setting 3, cd 1); 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 not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R4 Test Coverage — 2 test file(s) reach none of 4 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
X1 Async correctness — 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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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 — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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 — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — 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
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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.
Boundary-crossing change coupling: executor.rs ↔ main.rs devenv-tasks/src/executor.rs:1— `devenv-tasks/src/executor.rs` (context devenv-tasks) and `devenv/src/main.rs` (context devenv) sit in DIFFERENT parts of the tree yet 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) — 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 5 shared commits counted here, the most recent 3 are `f5e4b9c1` devenv: fixup source locations in traces; `7ea7c651` fix: resolve all compiler warnings; `0bd47f45` refactor(shell): run enterShell tasks via SubprocessExecutor instead … — run `git show` on any of them.
TLS certificate validation disabled devenv-event-sources/src/http_probe.rs:38— `.danger_accept_invalid_certs(true)` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on.
FileTooLong: devenv/mod.rs devenv/src/devenv/mod.rs— FileTooLong — 2894 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 2394 over it, 5.79× 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: devenv/machines.rs devenv/src/devenv/machines.rs— FileTooLong — 2342 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 65% of them inside a single declaration: Devenv (1178-3263). The bar is 500 significant lines; this is 1842 over it, 4.68× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/view.rs devenv-tui/src/view.rs— FileTooLong — 1619 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1119 over it, 3.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/session.rs devenv-shell/src/session.rs— FileTooLong — 1538 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1038 over it, 3.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/expanded_view.rs devenv-tui/src/expanded_view.rs— FileTooLong — 1524 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 1024 over it, 3.05× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/manager.rs devenv-processes/src/manager.rs— FileTooLong — 1453 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 953 over it, 2.91× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/config.rs devenv-tui/src/config.rs— FileTooLong — 1340 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 840 over it, 2.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/main.rs devenv/src/main.rs— FileTooLong — 1293 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 793 over it, 2.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/tasks.rs devenv-tasks/src/tasks.rs— FileTooLong — 1282 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: Tasks (3 blocks, 161-1817). The bar is 500 significant lines; this is 782 over it, 2.56× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/backend.rs devenv-nix-backend/src/backend.rs— FileTooLong — 1227 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: NixCBackend (4 blocks, 152-1473). The bar is 500 significant lines; this is 727 over it, 2.45× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/model.rs devenv-tui/src/model.rs— FileTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: ActivityModel (3 blocks, 32-1822). The bar is 500 significant lines; this is 706 over it, 2.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/config.rs devenv-core/src/config.rs— FileTooLong — 1031 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: Config (4 blocks, 324-1735). The bar is 500 significant lines; this is 531 over it, 2.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/cli.rs devenv/src/cli.rs— FileTooLong — 992 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 492 over it, 1.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/app.rs devenv-tui/src/app.rs— FileTooLong — 959 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 459 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: src/serde_valuable.rs devenv-activity/src/serde_valuable.rs— FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 301 over it, 1.60× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/fs.rs devenv-event-sources/src/fs.rs— FileTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 293 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/capabilities.rs devenv-processes/src/capabilities.rs— FileTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 268 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/components.rs devenv-tui/src/components.rs— FileTooLong — 711 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 211 over it, 1.42× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/statusline.rs devenv-tui/src/statusline.rs— FileTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 158 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/inline_terminal.rs devenv-tui/src/inline_terminal.rs— FileTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: InlineTerminal (3 blocks, 136-749). The bar is 500 significant lines; this is 109 over it, 1.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/builders.rs devenv-activity/src/builders.rs— FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 94 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: src/cachix_daemon.rs devenv-nix-backend/src/cachix_daemon.rs— FileTooLong — 557 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). 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: src/supervisor.rs devenv-processes/src/supervisor.rs— FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 55 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: machines/deploy.py src/modules/machines/deploy.py— FileTooLong — 531 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 31 over it, 1.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/status_line.rs devenv-shell/src/status_line.rs— FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2 over it, 1.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
MethodTooLong: Tasks.run_internal devenv-tasks/src/tasks.rs:1396— MethodTooLong — run_internal runs 271 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Config.load_sources devenv-core/src/config.rs:583— MethodTooLong — load_sources runs 267 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Devenv.machines_install devenv/src/devenv/machines.rs:1240— MethodTooLong — machines_install runs 240 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShellCoordinator.run devenv-reload/src/coordinator.rs:135— MethodTooLong — run runs 236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShellSession.event_loop devenv-shell/src/session.rs:2010— MethodTooLong — event_loop runs 236 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ShellSession.run devenv-shell/src/session.rs:1668— MethodTooLong — run runs 198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EscapeScanner.scan_into devenv-shell/src/escape/mod.rs:519— MethodTooLong — scan_into runs 190 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FileWatcher.new devenv-event-sources/src/fs.rs:976— MethodTooLong — new runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TuiApp.run devenv-tui/src/app.rs:244— MethodTooLong — run runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NixCBackend.dev_env_inner devenv-nix-backend/src/backend.rs:823— MethodTooLong — dev_env_inner runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TaskState.run_inner devenv-tasks/src/task_state.rs:483— MethodTooLong — run_inner runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Devenv.install_one_machine devenv/src/devenv/machines.rs:1590— MethodTooLong — install_one_machine runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ProcessRunner.launch_setup devenv-processes/src/manager.rs:1451— MethodTooLong — launch_setup runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StatusLine.build_element_with_elapsed devenv-shell/src/status_line.rs:608— MethodTooLong — build_element_with_elapsed runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NixCBackend.build_shell_uncached devenv-nix-backend/src/backend.rs:562— MethodTooLong — build_shell_uncached runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InlineTerminal.render_loop devenv-tui/src/inline_terminal.rs:170— MethodTooLong — render_loop runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: NixLogBridge.handle_activity_start devenv-core/src/nix_log_bridge.rs:467— MethodTooLong — handle_activity_start runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Renderer.render_with_scroll devenv-shell/src/session.rs:1148— MethodTooLong — render_with_scroll runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DownloadActivityComponent.render devenv-tui/src/components.rs:612— MethodTooLong — render runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BashDialect.env_diff_helpers devenv-shell/src/dialect/bash.rs:118— MethodTooLong — env_diff_helpers runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CachixIntegration.init devenv/src/devenv/cachix.rs:75— MethodTooLong — init runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: devenv-tui/src/view.rs devenv-tui/src/view.rs:633— devenv-tui/src/view.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in devenv_tui::view::ActivityItem at line 633. 3 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tui/src/view.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv/src/devenv/mod.rs devenv/src/devenv/mod.rs:1389— devenv/src/devenv/mod.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Devenv::run_attached_view at line 1389. 26 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv/src/devenv/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv/src/main.rs devenv/src/main.rs:1353— devenv/src/main.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in devenv::dispatch_command at line 1353. 11 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tui/src/app.rs devenv-tui/src/app.rs:989— devenv-tui/src/app.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in devenv_tui::app::MainView at line 989. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tui/src/app.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tasks/src/tasks.rs devenv-tasks/src/tasks.rs:1396— devenv-tasks/src/tasks.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in Tasks::run_internal at line 1396. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tasks/src/tasks.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tui/src/expanded_view.rs devenv-tui/src/expanded_view.rs:1494— devenv-tui/src/expanded_view.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in devenv_tui::expanded_view::render_expanded_view_custom at line 1494. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tui/src/expanded_view.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-nix-backend/src/backend.rs devenv-nix-backend/src/backend.rs:823— devenv-nix-backend/src/backend.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in NixCBackend::dev_env_inner at line 823. 7 of those changes were fix/bug commits, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-nix-backend/src/backend.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-core/src/config.rs devenv-core/src/config.rs:583— devenv-core/src/config.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in Config::load_sources at line 583. 2 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-core/src/config.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-run-tests/src/main.rs devenv-run-tests/src/main.rs:445— devenv-run-tests/src/main.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in devenv_run_tests::run_tests_in_directory at line 445. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-run-tests/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv/src/console.rs devenv/src/console.rs:182— devenv/src/console.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ConsoleOutput::handle at line 182. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv/src/console.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-shell/src/session.rs devenv-shell/src/session.rs:1668— devenv-shell/src/session.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ShellSession::run at line 1668. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-shell/src/session.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-event-sources/src/fs.rs devenv-event-sources/src/fs.rs:976— devenv-event-sources/src/fs.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in FileWatcher::new at line 976. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-event-sources/src/fs.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tasks/src/main.rs devenv-tasks/src/main.rs:180— devenv-tasks/src/main.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in devenv_tasks::run_tasks at line 180. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tasks/src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tasks/src/task_state.rs devenv-tasks/src/task_state.rs:483— devenv-tasks/src/task_state.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in TaskState::run_inner at line 483. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tasks/src/task_state.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-run-tests/src/pty.rs devenv-run-tests/src/pty.rs:41— devenv-run-tests/src/pty.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in devenv_run_tests::pty::run at line 41. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-run-tests/src/pty.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-tasks/src/executor.rs devenv-tasks/src/executor.rs:98— devenv-tasks/src/executor.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in devenv_tasks::executor::execute at line 98. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-tasks/src/executor.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-reload/src/coordinator.rs devenv-reload/src/coordinator.rs:135— devenv-reload/src/coordinator.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ShellCoordinator::run at line 135. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-reload/src/coordinator.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: devenv-nix-backend/src/project.rs devenv-nix-backend/src/project.rs:147— devenv-nix-backend/src/project.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in devenv_nix_backend::project::resolve_project at line 147. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-nix-backend/src/project.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×18
devenv_tui::app::MainView (cognitive 145) devenv-tui/src/app.rs:989— devenv_tui::app::MainView has cognitive complexity 145 (threshold 15). Drivers by points: if/else 41 (112 pts), boolean chains 22, match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 77). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
devenv_tui::view::build_help_content (cognitive 145) devenv-tui/src/view.rs:1520— devenv_tui::view::build_help_content has cognitive complexity 145 (threshold 15). Drivers by points: if/else 71 (128 pts), boolean chains 15, match/switch 1 (2 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::view::ActivityItem (cognitive 144) devenv-tui/src/view.rs:633— devenv_tui::view::ActivityItem has cognitive complexity 144 (threshold 15). Drivers by points: if/else 57 (98 pts), match/switch 10 (26 pts), boolean chains 16, loops 1 (4 pts) (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::expanded_view::render_expanded_view_custom (cognitive 87) devenv-tui/src/expanded_view.rs:1494— devenv_tui::expanded_view::render_expanded_view_custom has cognitive complexity 87 (threshold 15). Drivers by points: if/else 53 (75 pts), loops 2 (6 pts), boolean chains 4, match/switch 2 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::view::build_summary_view_impl (cognitive 61) devenv-tui/src/view.rs:1867— devenv_tui::view::build_summary_view_impl has cognitive complexity 61 (threshold 15). Drivers by points: if/else 29 (48 pts), match/switch 4 (7 pts), boolean chains 6 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::expanded_view::ExpandedLogView (cognitive 54) devenv-tui/src/expanded_view.rs:181— devenv_tui::expanded_view::ExpandedLogView has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (38 pts), loops 4 (6 pts), match/switch 3 (6 pts), boolean chains 4 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::expanded_view::build_line_elements (cognitive 32) devenv-tui/src/expanded_view.rs:1949— devenv_tui::expanded_view::build_line_elements has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::view::build_summary_content (cognitive 32) devenv-tui/src/view.rs:1431— devenv_tui::view::build_summary_content has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (31 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::view::view (cognitive 29) devenv-tui/src/view.rs:227— devenv_tui::view::view has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 7, match/switch 3 (5 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
devenv_tui::expanded_view::handle_log_search_key (cognitive 26) devenv-tui/src/expanded_view.rs:922— devenv_tui::expanded_view::handle_log_search_key has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::expanded_view::handle_key_event (cognitive 25) devenv-tui/src/expanded_view.rs:1141— devenv_tui::expanded_view::handle_key_event has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 3 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::inline_terminal::read_cursor_position (cognitive 21) devenv-tui/src/inline_terminal.rs:634— devenv_tui::inline_terminal::read_cursor_position has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::config::validate_format (cognitive 18) devenv-tui/src/config.rs:746— devenv_tui::config::validate_format has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::statusline::fit (cognitive 18) devenv-tui/src/statusline.rs:747— devenv_tui::statusline::fit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tui::expanded_view::handle_mouse_event (cognitive 17) devenv-tui/src/expanded_view.rs:1273— devenv_tui::expanded_view::handle_mouse_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv_tui::bin::tui-replay::main (cognitive 16) devenv-tui/src/bin/tui-replay.rs:389— devenv_tui::bin::tui-replay::main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FunctionTooLong: devenv_tui::view::ActivityItem devenv-tui/src/view.rs:633— FunctionTooLong — devenv_tui::view::ActivityItem runs 465 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 365 over it, 4.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::expanded_view::render_expanded_view_custom devenv-tui/src/expanded_view.rs:1494— FunctionTooLong — devenv_tui::expanded_view::render_expanded_view_custom runs 354 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 254 over it, 3.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::app::MainView devenv-tui/src/app.rs:989— FunctionTooLong — devenv_tui::app::MainView runs 318 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::expanded_view::ExpandedLogView devenv-tui/src/expanded_view.rs:181— FunctionTooLong — devenv_tui::expanded_view::ExpandedLogView runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::view::build_summary_view_impl devenv-tui/src/view.rs:1867— FunctionTooLong — devenv_tui::view::build_summary_view_impl runs 206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 106 over it, 2.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::view::view devenv-tui/src/view.rs:227— FunctionTooLong — devenv_tui::view::view runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::view::build_help_content devenv-tui/src/view.rs:1520— FunctionTooLong — devenv_tui::view::build_help_content runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_nix_backend::project::resolve_project devenv-nix-backend/src/project.rs:147— FunctionTooLong — devenv_nix_backend::project::resolve_project runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tasks::executor::execute devenv-tasks/src/executor.rs:98— FunctionTooLong — devenv_tasks::executor::execute runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv::proxy::ensure_running devenv/src/proxy.rs:402— FunctionTooLong — devenv::proxy::ensure_running runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::expanded_view::handle_log_search_key devenv-tui/src/expanded_view.rs:922— FunctionTooLong — devenv_tui::expanded_view::handle_log_search_key runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::statusline::component_values devenv-tui/src/statusline.rs:389— FunctionTooLong — devenv_tui::statusline::component_values runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv::devenv::machines::impact::analyze devenv/src/devenv/machines/impact.rs:89— FunctionTooLong — devenv::devenv::machines::impact::analyze runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: devenv_tui::expanded_view::build_line_elements devenv-tui/src/expanded_view.rs:1949— FunctionTooLong — devenv_tui::expanded_view::build_line_elements runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities· Medium CVE · ×14
Duplicated block (10 lines × 2) devenv-activity/src/activity.rs:484— devenv-activity/src/activity.rs:484-493 | devenv-activity/src/activity.rs:592-601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) devenv-activity/src/activity.rs:498— devenv-activity/src/activity.rs:498-507 | devenv-activity/src/activity.rs:606-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) devenv-core/src/nix_log_bridge.rs:522— devenv-core/src/nix_log_bridge.rs:522-531 | devenv-core/src/nix_log_bridge.rs:587-596 — 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 `devenv-core/src/nix_log_bridge.rs:522` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) devenv-shell/src/dialect/bash.rs:314— devenv-shell/src/dialect/bash.rs:314-323 | devenv-shell/src/dialect/zsh.rs:166-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 (10 lines × 2) devenv-shell/src/session.rs:2146— devenv-shell/src/session.rs:2146-2155 | devenv-shell/src/session.rs:2173-2182 — 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 (10 lines × 2) devenv-tasks/src/task_cache.rs:352— devenv-tasks/src/task_cache.rs:352-361 | devenv-tasks/src/task_cache.rs:378-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-tasks/src/task_cache.rs:352` 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 (10 lines × 2) devenv-tui/src/app.rs:1200— devenv-tui/src/app.rs:1200-1209 | devenv-tui/src/app.rs:1222-1231 — 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 `devenv-tui/src/app.rs:1200` 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 (10 lines × 2) devenv/src/tracing/otel.rs:215— devenv/src/tracing/otel.rs:215-224 | devenv/src/tracing/otel.rs:256-265 — 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 `devenv/src/tracing/otel.rs:215` 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) devenv/src/tracing/otel.rs:226— devenv/src/tracing/otel.rs:226-235 | devenv/src/tracing/otel.rs:267-276 — 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 `devenv/src/tracing/otel.rs:226` 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) devenv/src/devenv/machines.rs:2175— devenv/src/devenv/machines.rs:2175-2184 | devenv/src/devenv/machines.rs:2242-2251 — 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 `devenv/src/devenv/machines.rs:2175` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) devenv-core/src/ports.rs:657— devenv-core/src/ports.rs:657-666 | devenv-processes/src/manager.rs:703-712 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) devenv/src/devenv/container.rs:51— devenv/src/devenv/container.rs:51-60 | devenv/src/devenv/container.rs:78-87 — 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 (10 lines × 2) devenv-tui/src/view.rs:903— devenv-tui/src/view.rs:903-912 | devenv-tui/src/view.rs:1281-1290 — 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 `devenv-tui/src/view.rs:903` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) devenv-run-tests/src/main.rs:563— devenv-run-tests/src/main.rs:563-572 | devenv-run-tests/src/main.rs:645-654 — 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 `devenv-run-tests/src/main.rs:563` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×12
devenv_tui::view::ActivityItem (cyclomatic 99) devenv-tui/src/view.rs:633— devenv_tui::view::ActivityItem has cyclomatic complexity 99 (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.
devenv_tui::view::build_help_content (cyclomatic 77) devenv-tui/src/view.rs:1520— devenv_tui::view::build_help_content has cyclomatic complexity 77 (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.
devenv_tui::app::MainView (cyclomatic 74) devenv-tui/src/app.rs:989— devenv_tui::app::MainView has cyclomatic complexity 74 (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.
devenv_tui::expanded_view::render_expanded_view_custom (cyclomatic 44) devenv-tui/src/expanded_view.rs:1494— devenv_tui::expanded_view::render_expanded_view_custom has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::view::build_summary_view_impl (cyclomatic 39) devenv-tui/src/view.rs:1867— devenv_tui::view::build_summary_view_impl has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::expanded_view::ExpandedLogView (cyclomatic 29) devenv-tui/src/expanded_view.rs:181— devenv_tui::expanded_view::ExpandedLogView has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::expanded_view::handle_key_event (cyclomatic 25) devenv-tui/src/expanded_view.rs:1141— devenv_tui::expanded_view::handle_key_event has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::view::view (cyclomatic 22) devenv-tui/src/view.rs:227— devenv_tui::view::view has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
devenv_tui::expanded_view::handle_log_search_key (cyclomatic 18) devenv-tui/src/expanded_view.rs:922— devenv_tui::expanded_view::handle_log_search_key has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::expanded_view::handle_mouse_event (cyclomatic 16) devenv-tui/src/expanded_view.rs:1273— devenv_tui::expanded_view::handle_mouse_event has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tui::view::build_summary_content (cyclomatic 16) devenv-tui/src/view.rs:1431— devenv_tui::view::build_summary_content has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×11
Duplicated block (11 lines × 2) devenv-activity/src/activity.rs:469— devenv-activity/src/activity.rs:469-479 | devenv-activity/src/activity.rs:577-587 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) devenv-processes/src/socket_activation.rs:294— devenv-processes/src/socket_activation.rs:294-304 | devenv-processes/src/socket_activation.rs:312-322 — 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) devenv-shell/src/keybindings.rs:103— devenv-shell/src/keybindings.rs:103-113 | devenv-tui/src/config.rs:1570-1580 — 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 `devenv-shell/src/keybindings.rs:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) devenv-tui/src/app.rs:1008— devenv-tui/src/app.rs:1008-1018 | devenv-tui/src/expanded_view.rs:268-278 — before extracting anything, compare `devenv-tui/src/app.rs` and `devenv-tui/src/expanded_view.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) devenv-tui/src/bin/tui-replay.rs:478— devenv-tui/src/bin/tui-replay.rs:478-488 | devenv-tui/src/bin/tui-replay.rs:499-509 — 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 `devenv-tui/src/bin/tui-replay.rs:478` 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, `devenv-tui/src/bin/tui-replay.rs:510` calls `send` and `devenv-tui/src/bin/tui-replay.rs:489` 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 (11 lines × 2) devenv-tui/src/inline_terminal.rs:434— devenv-tui/src/inline_terminal.rs:434-444 | devenv-tui/src/inline_terminal.rs:511-522 — 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 `devenv-tui/src/inline_terminal.rs:434` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) devenv/src/mcp.rs:351— devenv/src/mcp.rs:351-361 | devenv/src/mcp.rs:377-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv/src/mcp.rs:351` 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) devenv/src/tracing/otel.rs:237— devenv/src/tracing/otel.rs:237-247 | devenv/src/tracing/otel.rs:278-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv/src/tracing/otel.rs:237` 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) xtask/src/config_docs.rs:156— xtask/src/config_docs.rs:156-166 | xtask/src/config_docs.rs:199-209 — 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) devenv-nix-backend/src/gc_store.rs:62— devenv-nix-backend/src/gc_store.rs:62-73 | devenv-nix-backend/src/gc_store.rs:172-182 — 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 `devenv-nix-backend/src/gc_store.rs:62` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) devenv-shell/src/status_line.rs:748— devenv-shell/src/status_line.rs:748-758 | devenv-shell/src/status_line.rs:780-790 — 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 `devenv-shell/src/status_line.rs:748` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) devenv-activity/src/activity.rs:443— devenv-activity/src/activity.rs:443-451 | devenv-activity/src/activity.rs:551-559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) devenv-activity/src/activity.rs:456— devenv-activity/src/activity.rs:456-464 | devenv-activity/src/activity.rs:564-572 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) devenv-processes/src/process_guardian.rs:221— devenv-processes/src/process_guardian.rs:221-229 | devenv-processes/src/process_guardian.rs:273-281 — 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 `devenv-processes/src/process_guardian.rs:221` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) devenv-processes/src/process_scope.rs:511— devenv-processes/src/process_scope.rs:511-519 | devenv-processes/src/process_scope.rs:527-535 — 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 `devenv-processes/src/process_scope.rs:511` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) devenv-tasks/src/executor.rs:175— devenv-tasks/src/executor.rs:175-183 | devenv-tasks/src/executor.rs:195-203 — 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 `devenv-tasks/src/executor.rs:175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) devenv-tui/src/app.rs:513— devenv-tui/src/app.rs:513-521 | devenv-tui/src/app.rs:523-531 — 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 `devenv-tui/src/app.rs:513` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) devenv/src/devenv/machines.rs:2311— devenv/src/devenv/machines.rs:2311-2319 | devenv/src/devenv/machines.rs:3245-3253 — 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) devenv-shell/src/dialect/bash.rs:325— devenv-shell/src/dialect/bash.rs:325-333 | devenv-shell/src/dialect/zsh.rs:177-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) devenv-tasks/src/native_manager.rs:56— devenv-tasks/src/native_manager.rs:56-64 | devenv-tui/src/bin/tui-replay.rs:210-218 — 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 (9 lines × 2) devenv-tasks/src/executor.rs:186— devenv-tasks/src/executor.rs:186-194 | devenv-tasks/src/executor.rs:206-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. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-tasks/src/executor.rs:186` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) devenv-processes/src/capabilities.rs:441— devenv-processes/src/capabilities.rs:441-448 | devenv-processes/src/capabilities.rs:485-492 — 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 `devenv-processes/src/capabilities.rs:441` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `devenv-processes/src/capabilities.rs:449` calls `channel` and `devenv-processes/src/capabilities.rs:493` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) devenv-processes/src/external_manager.rs:378— devenv-processes/src/external_manager.rs:378-385 | devenv-processes/src/external_manager.rs:505-512 — 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 `devenv-processes/src/external_manager.rs:378` 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) devenv-tui/src/model.rs:1092— devenv-tui/src/model.rs:1092-1099 | devenv-tui/src/model.rs:1124-1131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) devenv-tui/src/statusline.rs:624— devenv-tui/src/statusline.rs:624-631 | devenv-tui/src/view.rs:1433-1440 — 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 `devenv-tui/src/statusline.rs:624` 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) devenv-tui/src/view.rs:2026— devenv-tui/src/view.rs:2026-2033 | devenv-tui/src/view.rs:2057-2067 — 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 `devenv-tui/src/view.rs:2026` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) devenv-tui/src/view.rs:2183— devenv-tui/src/view.rs:2183-2190 | devenv-tui/src/view.rs:2198-2205 — 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 `devenv-tui/src/view.rs:2183` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) devenv-core/src/dotenv.rs:149— devenv-core/src/dotenv.rs:149-156 | devenv/src/devenv/mod.rs:2385-2392 — 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 lines × 2) devenv-tasks/src/native_manager.rs:38— devenv-tasks/src/native_manager.rs:38-45 | devenv-tui/src/bin/tui-replay.rs:192-199 — 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 lines × 2) devenv-tasks/src/native_manager.rs:47— devenv-tasks/src/native_manager.rs:47-54 | devenv-tui/src/bin/tui-replay.rs:201-208 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Repeated repair: devenv-processes/src/manager.rs devenv-processes/src/manager.rs:1901— devenv-processes/src/manager.rs changed 15 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is ProcessRunner::restart at line 1901), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(tui): show failed process prerequisites (#3275)”; “fix(tasks): start never-started process dependencies (#3238)”; “fix(activity): improve activity tracing performance”; “fix(processes): make Linux capabilities work (#3151)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-processes/src/manager.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv-processes/src/supervisor.rs devenv-processes/src/supervisor.rs:448— devenv-processes/src/supervisor.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is SupervisorRuntime::handle_notification at line 448), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(activity): improve activity tracing performance”; “fix(processes): make Linux capabilities work (#3151)”; “fix(event-sources): optimize file watching”; “fix(tasks): cover heterogeneous dependency edge cases”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-processes/src/supervisor.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv-nix-backend/src/lib.rs devenv-nix-backend/src/lib.rs:100— devenv-nix-backend/src/lib.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is devenv_nix_backend::create_flake_input at line 100), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): load YAML from remote --from sources (#3167)”; “fix(backend): preserve GC roots across project moves”; “fix(eval-cache): implement dotenv support as generic input tracking”; “fix(backend): split up dotenv integration into parts”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-nix-backend/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv/src/commands/daemon_processes.rs devenv/src/commands/daemon_processes.rs:16— devenv/src/commands/daemon_processes.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 1 (its worst body is devenv::commands::daemon_processes::run at line 16), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(processes): wait for live daemon startup (#3237)”; “fix(tasks): move main process manager to tasks”; “fix(processes): split up process manager internals into composable chunks”; “fix(devenv): add missing info modules and reuse lockfile name”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv/src/commands/daemon_processes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv/src/reload/owner.rs devenv/src/reload/owner.rs:122— devenv/src/reload/owner.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is devenv::reload::owner::is_watchable_input at line 122), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: keep task PATH exports on their own line in shell-env.sh (#3166)”; “fix(shell): resolve allocated ports from running manager (#3211)”; “fix(reload): prevent missing .env dir from forcing recursive root hashing”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv/src/reload/owner.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv-shell/src/dialect/mod.rs devenv-shell/src/dialect/mod.rs:72— devenv-shell/src/dialect/mod.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is devenv_shell::dialect::create_dialect at line 72), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(shell): pass reload_file to bash_helper in nushell (#3286)”; “fix(shell): preserve structured Nushell env on reload (#3231)”; “fix(fish): exit hook shell on cd before prompt (#3210)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-shell/src/dialect/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv-eval-cache/src/caching_eval.rs devenv-eval-cache/src/caching_eval.rs:238— devenv-eval-cache/src/caching_eval.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is CachingEvalService::validate_inputs at line 238), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(eval-cache): implement dotenv support as generic input tracking”; “fix(backend): split up dotenv integration into parts”; “fix(activity): optimize activity event stream processing”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-eval-cache/src/caching_eval.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: devenv-core/src/dotenv.rs devenv-core/src/dotenv.rs:35— devenv-core/src/dotenv.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is devenv_core::dotenv::load_dotenv_tracked at line 35), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(eval-cache): implement dotenv support as generic input tracking”; “fix(backend): split up dotenv integration into parts”; “fix(backend): prevent the dotenv integration from clearing the eval state”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:37:12 +00:00' --until='2026-11-13 09:37:12 +00:00' --full-history --no-merges -- devenv-core/src/dotenv.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Devenv::machines_install (cognitive 95) devenv/src/devenv/machines.rs:1240— Devenv::machines_install has cognitive complexity 95 (threshold 15). Drivers by points: if/else 27 (60 pts), loops 12 (27 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 51). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Devenv::run_attached_view (cognitive 72) devenv/src/devenv/mod.rs:1389— Devenv::run_attached_view has cognitive complexity 72 (threshold 15). Drivers by points: match/switch 11 (34 pts), if/else 10 (33 pts), loops 2 (5 pts) (nesting depth added 49). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Devenv::start_processes (cognitive 54) devenv/src/devenv/mod.rs:2813— Devenv::start_processes has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (42 pts), match/switch 6 (9 pts), boolean chains 3 (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.
Devenv::apply_machine_plan (cognitive 31) devenv/src/devenv/machines.rs:2855— Devenv::apply_machine_plan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 6 (10 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Devenv::machines_plan (cognitive 29) devenv/src/devenv/machines.rs:2511— Devenv::machines_plan has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Devenv::install_one_machine (cognitive 24) devenv/src/devenv/machines.rs:1590— Devenv::install_one_machine has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Devenv::new (cognitive 17) devenv/src/devenv/mod.rs:555— Devenv::new has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 5, match/switch 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Devenv::resolve_launch_processes (cognitive 17) devenv/src/devenv/mod.rs:1152— Devenv::resolve_launch_processes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (7 lines × 2) devenv-eval-cache/src/caching_eval.rs:761— devenv-eval-cache/src/caching_eval.rs:761-767 | devenv-eval-cache/src/caching_eval.rs:805-811 — 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 `devenv-eval-cache/src/caching_eval.rs:761` 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, `devenv-eval-cache/src/caching_eval.rs:812` calls `from_str`, `map_err` and `devenv-eval-cache/src/caching_eval.rs:768` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) devenv-shell/src/session.rs:2241— devenv-shell/src/session.rs:2241-2252 | devenv-shell/src/session.rs:2348-2354 — 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 `devenv-shell/src/session.rs:2241` 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 (7 lines × 2) devenv-shell/src/dialect/fish.rs:190— devenv-shell/src/dialect/fish.rs:190-197 | devenv-shell/src/dialect/nushell.rs:150-156 — 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 `devenv-shell/src/dialect/fish.rs:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) devenv-event-sources/src/exec_probe.rs:30— devenv-event-sources/src/exec_probe.rs:30-36 | devenv-event-sources/src/http_probe.rs:28-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 `devenv-event-sources/src/exec_probe.rs:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) devenv-processes/src/external_manager.rs:122— devenv-processes/src/external_manager.rs:122-128 | devenv/src/devenv/mod.rs:3264-3270 — 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 `devenv-processes/src/external_manager.rs:122` 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 (7 lines × 2) xtask/src/config_docs.rs:29— xtask/src/config_docs.rs:29-35 | xtask/src/config_docs.rs:40-46 — 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 `xtask/src/config_docs.rs:29` 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 (7 lines × 2) devenv-core/src/cachix.rs:229— devenv-core/src/cachix.rs:229-235 | devenv-core/src/cachix.rs:374-380 — 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 `devenv-core/src/cachix.rs:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) devenv-tui/src/app.rs:1474— devenv-tui/src/app.rs:1474-1480 | devenv-tui/src/app.rs:1506-1512 — 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 `devenv-tui/src/app.rs:1474` 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, `devenv-tui/src/app.rs:1515` calls `ContextProvider`, `owned` and `devenv-tui/src/app.rs:1483` 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.
Devenv::machines_install (cyclomatic 45) devenv/src/devenv/machines.rs:1240— Devenv::machines_install has cyclomatic complexity 45 (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.
Devenv::run_attached_view (cyclomatic 33) devenv/src/devenv/mod.rs:1389— Devenv::run_attached_view has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Devenv::start_processes (cyclomatic 32) devenv/src/devenv/mod.rs:2813— Devenv::start_processes has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Devenv::install_one_machine (cyclomatic 21) devenv/src/devenv/machines.rs:1590— Devenv::install_one_machine 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.
Devenv::apply_machine_plan (cyclomatic 17) devenv/src/devenv/machines.rs:2855— Devenv::apply_machine_plan has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Devenv::machines_plan (cyclomatic 16) devenv/src/devenv/machines.rs:2511— Devenv::machines_plan has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Devenv::new (cyclomatic 16) devenv/src/devenv/mod.rs:555— Devenv::new has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Tasks::run_internal (cognitive 67) devenv-tasks/src/tasks.rs:1396— Tasks::run_internal has cognitive complexity 67 (threshold 15). Drivers by points: if/else 22 (46 pts), match/switch 4 (11 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tasks::resolve_dependencies (cognitive 56) devenv-tasks/src/tasks.rs:404— Tasks::resolve_dependencies has cognitive complexity 56 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (9 pts), match/switch 2 (8 pts), boolean chains 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tasks::schedule (cognitive 32) devenv-tasks/src/tasks.rs:571— Tasks::schedule has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 6 (10 pts), boolean chains 4, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tasks::get_completion_status (cognitive 31) devenv-tasks/src/tasks.rs:259— Tasks::get_completion_status has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tasks::unstarted_process_dependencies (cognitive 31) devenv-tasks/src/tasks.rs:874— Tasks::unstarted_process_dependencies has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 1 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Tasks::start_with_deps (cognitive 26) devenv-tasks/src/tasks.rs:714— Tasks::start_with_deps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (9 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Tasks::run_oneshot_task (cognitive 17) devenv-tasks/src/tasks.rs:1106— Tasks::run_oneshot_task has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv::dispatch_command (cognitive 28) devenv/src/main.rs:1353— devenv::dispatch_command has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 7 (13 pts), boolean chains 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv::devenv::machines::target_secretspec_manifest (cognitive 25) devenv/src/devenv/machines.rs:957— devenv::devenv::machines::target_secretspec_manifest has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv::proxy::project_routes (cognitive 24) devenv/src/proxy.rs:199— devenv::proxy::project_routes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv::prepare_command (cognitive 22) devenv/src/main.rs:439— devenv::prepare_command has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv::proxy::ensure_running (cognitive 21) devenv/src/proxy.rs:402— devenv::proxy::ensure_running has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv::devenv::format_tasks_tree::format_task (cognitive 17) devenv/src/devenv/mod.rs:4123— devenv::devenv::format_tasks_tree::format_task has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv::devenv::machines::impact::analyze (cognitive 17) devenv/src/devenv/machines/impact.rs:89— devenv::devenv::machines::impact::analyze has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ClassTooLong: Tasks devenv-tasks/src/tasks.rs:171— ClassTooLong — 1041 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 3 blocks, lines 161-1817. The bar is 400 significant lines; this is 641 over it, 2.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ActivityModel devenv-tui/src/model.rs:32— ClassTooLong — 920 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 54 methods, 3 blocks, lines 32-1822. The bar is 400 significant lines; this is 520 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: NixCBackend devenv-nix-backend/src/backend.rs:152— ClassTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 4 blocks, lines 152-1473. The bar is 400 significant lines; this is 519 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ProcessRunner devenv-processes/src/manager.rs:516— ClassTooLong — 823 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 3 blocks, lines 516-2379. The bar is 400 significant lines; this is 423 over it, 2.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Config devenv-core/src/config.rs:324— ClassTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 23 methods, 4 blocks, lines 324-1735. The bar is 400 significant lines; this is 393 over it, 1.98× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ShellSession devenv-shell/src/session.rs:1592— ClassTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 3 blocks, lines 1592-2527. The bar is 400 significant lines; this is 186 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TaskState devenv-tasks/src/task_state.rs:61— ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 3 blocks, lines 20-712. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Off the main sequence: devenv-cache-core — devenv-cache-core: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: devenv-proxy — devenv-proxy: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: nix-conf-parser — nix-conf-parser: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: tokio-shutdown — tokio-shutdown: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: devenv-activity — devenv-activity: abstractness 0.06, instability 0.10, distance 0.84 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
Off the main sequence: devenv-shell — devenv-shell: abstractness 0.02, instability 0.25, distance 0.73 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Low cohesion: DevenvLayer (LCOM4 4) devenv/src/tracing/devenv_layer.rs:61— DevenvLayer's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Config (LCOM4 4) devenv-core/src/config.rs:324— Config's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Router (LCOM4 4) devenv-proxy/src/lib.rs:49— Router's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Pty (LCOM4 4) devenv-shell/src/pty.rs:38— Pty's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: UiState (LCOM4 4) devenv-tui/src/model.rs:160— UiState's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Shutdown (LCOM4 4) tokio-shutdown/src/lib.rs:31— Shutdown's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×6
JavaScript dependencies are not locked examples/claude-agents/package.json:10— examples/claude-agents/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked examples/javascript-bun/package.json:11— examples/javascript-bun/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked examples/javascript-yarn/package.json:11— examples/javascript-yarn/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked examples/javascript/package.json:11— examples/javascript/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked tests/javascript-directory/directory/package.json:11— tests/javascript-directory/directory/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
JavaScript dependencies are not locked tests/javascript-pnpm/package.json:11— tests/javascript-pnpm/package.json declares dependencies that no committed lockfile resolves — there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it — so its installs aren't reproducible (SSDF PW.4.4). Commit its package manager's lockfile (or add it to the locked workspace) and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
Tasks::run_internal (cyclomatic 33) devenv-tasks/src/tasks.rs:1396— Tasks::run_internal has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tasks::resolve_dependencies (cyclomatic 23) devenv-tasks/src/tasks.rs:404— Tasks::resolve_dependencies has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tasks::schedule (cyclomatic 20) devenv-tasks/src/tasks.rs:571— Tasks::schedule 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.
Tasks::get_completion_status (cyclomatic 18) devenv-tasks/src/tasks.rs:259— Tasks::get_completion_status has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Tasks::start_with_deps (cyclomatic 17) devenv-tasks/src/tasks.rs:714— Tasks::start_with_deps has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tasks::task_cache::find_files_matching_patterns (cognitive 48) devenv-tasks/src/task_cache.rs:137— devenv_tasks::task_cache::find_files_matching_patterns has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 5 (8 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tasks::run_tasks (cognitive 30) devenv-tasks/src/main.rs:180— devenv_tasks::run_tasks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 5, loops 1 (4 pts), match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tasks::tasks::compute_display_hierarchy (cognitive 30) devenv-tasks/src/tasks.rs:1863— devenv_tasks::tasks::compute_display_hierarchy has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (11 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_tasks::executor::execute (cognitive 27) devenv-tasks/src/executor.rs:98— devenv_tasks::executor::execute has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 11 (20 pts), if/else 4 (5 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv_tasks::tasks::compute_hierarchy_edges (cognitive 17) devenv-tasks/src/tasks.rs:1982— devenv_tasks::tasks::compute_hierarchy_edges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 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.
TooManyMethods: Devenv devenv/src/devenv/mod.rs:441— TooManyMethods — 145 methods, declared across 5 files: devenv/mod.rs (97), devenv/machines.rs (41), devenv/container.rs (3), devenv/search.rs (3), +1 more file(s). The bar is 30 methods; this is 115 over it, 4.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActivityModel devenv-tui/src/model.rs:32— TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProcessRunner devenv-processes/src/manager.rs:516— TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: NixCBackend devenv-nix-backend/src/backend.rs:152— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Activity devenv-activity/src/activity.rs:152— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (12 lines × 2) devenv-core/src/config.rs:616— devenv-core/src/config.rs:616-627 | devenv-core/src/config.rs:1463-1474 — 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 `devenv-core/src/config.rs:616` 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 (12 lines × 2) devenv-nix-backend/src/build_environment.rs:152— devenv-nix-backend/src/build_environment.rs:152-163 | devenv/src/devenv/machines.rs:821-832 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) devenv-processes/src/supervisor.rs:435— devenv-processes/src/supervisor.rs:435-446 | devenv-processes/src/supervisor.rs:550-561 — 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 `devenv-processes/src/supervisor.rs:435` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `devenv-processes/src/supervisor.rs:549` calls `name` and `devenv-processes/src/supervisor.rs:434` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) devenv-shell/src/session.rs:2041— devenv-shell/src/session.rs:2041-2052 | devenv-shell/src/session.rs:2058-2069 — 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 `devenv-shell/src/session.rs:2041` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `devenv-shell/src/session.rs:2057` calls `state_mut`, `clear_reloaded` and `devenv-shell/src/session.rs:2040` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) devenv-tasks/src/tasks.rs:426— devenv-tasks/src/tasks.rs:426-437 | devenv-tasks/src/tasks.rs:478-489 — 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 `devenv-tasks/src/tasks.rs:426` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `devenv-tasks/src/tasks.rs:422` calls `read` and `devenv-tasks/src/tasks.rs:475` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
devenv_tasks::task_cache::find_files_matching_patterns (cyclomatic 24) devenv-tasks/src/task_cache.rs:137— devenv_tasks::task_cache::find_files_matching_patterns has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tasks::executor::execute (cyclomatic 22) devenv-tasks/src/executor.rs:98— devenv_tasks::executor::execute has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
devenv_tasks::run_tasks (cyclomatic 18) devenv-tasks/src/main.rs:180— devenv_tasks::run_tasks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_tasks::tasks::compute_display_hierarchy (cyclomatic 16) devenv-tasks/src/tasks.rs:1863— devenv_tasks::tasks::compute_display_hierarchy has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Duplicated block (13 lines × 2) devenv-tui/src/components.rs:442— devenv-tui/src/components.rs:442-454 | devenv-tui/src/components.rs:477-490 — 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 `devenv-tui/src/components.rs:442` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) devenv-tui/src/config.rs:1134— devenv-tui/src/config.rs:1134-1146 | devenv-tui/src/config.rs:1156-1168 — 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 `devenv-tui/src/config.rs:1134` 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) devenv-tui/src/expanded_view.rs:1710— devenv-tui/src/expanded_view.rs:1710-1722 | devenv-tui/src/expanded_view.rs:1893-1905 — 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) tokio-shutdown/src/lib.rs:146— tokio-shutdown/src/lib.rs:146-158 | tokio-shutdown/src/lib.rs:398-410 — 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.
devenv::dispatch_command (cyclomatic 52) devenv/src/main.rs:1353— devenv::dispatch_command has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
devenv::main_inner (cyclomatic 17) devenv/src/main.rs:104— devenv::main_inner has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
devenv::prepare_command (cyclomatic 16) devenv/src/main.rs:439— devenv::prepare_command has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config::load_sources (cognitive 110) devenv-core/src/config.rs:583— Config::load_sources has cognitive complexity 110 (threshold 15). Drivers by points: if/else 34 (82 pts), loops 13 (21 pts), boolean chains 6, match/switch 1 (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Config::collect_import_files (cognitive 22) devenv-core/src/config.rs:1412— Config::collect_import_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Config::soft_canonicalize_inner (cognitive 19) devenv-core/src/config.rs:1254— Config::soft_canonicalize_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 3 (9 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession::event_loop (cognitive 107) devenv-shell/src/session.rs:2010— ShellSession::event_loop has cognitive complexity 107 (threshold 15). Drivers by points: if/else 27 (82 pts), match/switch 4 (12 pts), boolean chains 9, loops 2 (4 pts) (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession::run (cognitive 38) devenv-shell/src/session.rs:1668— ShellSession::run has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 6 (10 pts), loops 5, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellSession::dispatch_stdin_event (cognitive 22) devenv-shell/src/session.rs:2360— ShellSession::dispatch_stdin_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (4 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv_processes::log_tailer::tail_lines (cognitive 40) devenv-processes/src/log_tailer.rs:17— devenv_processes::log_tailer::tail_lines has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 7 (18 pts), boolean chains 2, loops 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_processes::process_scope::stop_process_scopes (cognitive 33) devenv-processes/src/process_scope.rs:415— devenv_processes::process_scope::stop_process_scopes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_processes::capabilities::run_broker (cognitive 18) devenv-processes/src/capabilities.rs:669— devenv_processes::capabilities::run_broker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityModel::handle_task_event (cognitive 22) devenv-tui/src/model.rs:661— ActivityModel::handle_task_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ActivityModel::handle_activity_complete (cognitive 18) devenv-tui/src/model.rs:957— ActivityModel::handle_activity_complete has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ActivityModel::calculate_summary (cognitive 16) devenv-tui/src/model.rs:1529— ActivityModel::calculate_summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) devenv-eval-cache/src/caching_eval.rs:760— devenv-eval-cache/src/caching_eval.rs:760-777 | devenv-eval-cache/src/caching_eval.rs:804-823 — 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) devenv-proxy/src/routes.rs:65— devenv-proxy/src/routes.rs:65-87 | devenv-proxy/src/routes.rs:89-106 — 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) devenv-shell/src/session.rs:372— devenv-shell/src/session.rs:372-389 | devenv-shell/src/session.rs:398-417 — 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) · ×3
Edited copy of a member (12 corresponding lines) devenv-shell/src/dialect/fish.rs:170— devenv-shell/src/dialect/fish.rs:170-186 | devenv-shell/src/dialect/zsh.rs:164-175 — 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) devenv-activity/src/activity.rs:397— devenv-activity/src/activity.rs:397-408 | devenv-activity/src/activity.rs:412-423 — 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) devenv-run-tests/src/main.rs:769— devenv-run-tests/src/main.rs:769-781 | devenv/src/main.rs:1826-1837 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) devenv-shell/src/dialect/fish.rs:188— devenv-shell/src/dialect/fish.rs:188-197 | devenv-shell/src/dialect/nushell.rs:148-156 — 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) devenv-event-sources/src/fs.rs:126— devenv-event-sources/src/fs.rs:126-135 | devenv-event-sources/src/fs.rs:137-145 — 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) devenv-core/src/cachix.rs:387— devenv-core/src/cachix.rs:387-395 | devenv/src/devenv/mod.rs:3959-3967 — 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.
Duplicated block (10–11 lines × 2) devenv-processes/src/supervisor.rs:547— devenv-processes/src/supervisor.rs:547-556 | devenv-processes/src/supervisor.rs:623-633 — 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 `devenv-processes/src/supervisor.rs:547` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10–11 lines × 2) devenv-tui/src/view.rs:1207— devenv-tui/src/view.rs:1207-1216 | devenv-tui/src/view.rs:1224-1234 — 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 `devenv-tui/src/view.rs:1207` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (10–11 lines × 2) devenv-tui/src/view.rs:1251— devenv-tui/src/view.rs:1251-1260 | devenv-tui/src/view.rs:1266-1276 — 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 `devenv-tui/src/view.rs:1251` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Sync-over-async blocking devenv/src/mcp.rs:563— `run_mcp_server` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
Sync-over-async blocking devenv-processes/src/capabilities.rs:126— `start_capability_broker` is async and calls thread::sleep — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
Sync-over-async blocking devenv-tui/src/inline_terminal.rs:170— `render_loop` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
ShellSession::event_loop (cyclomatic 50) devenv-shell/src/session.rs:2010— ShellSession::event_loop has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShellSession::run (cyclomatic 29) devenv-shell/src/session.rs:1668— ShellSession::run has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NixLogBridge::handle_activity_result (cyclomatic 24) devenv-core/src/nix_log_bridge.rs:655— NixLogBridge::handle_activity_result has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NixLogBridge::handle_activity_start (cyclomatic 16) devenv-core/src/nix_log_bridge.rs:467— NixLogBridge::handle_activity_start has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_processes::log_tailer::tail_lines (cyclomatic 20) devenv-processes/src/log_tailer.rs:17— devenv_processes::log_tailer::tail_lines 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.
devenv_processes::process_scope::stop_process_scopes (cyclomatic 16) devenv-processes/src/process_scope.rs:415— devenv_processes::process_scope::stop_process_scopes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NixCBackend::dev_env_inner (cognitive 50) devenv-nix-backend/src/backend.rs:823— NixCBackend::dev_env_inner has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (33 pts), match/switch 7 (16 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NixCBackend::build (cognitive 37) devenv-nix-backend/src/backend.rs:1369— NixCBackend::build has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 3 (13 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NixLogBridge::handle_activity_result (cognitive 47) devenv-core/src/nix_log_bridge.rs:655— NixLogBridge::handle_activity_result has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 3 (8 pts), boolean chains 5 (nesting depth added 27). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NixLogBridge::handle_activity_start (cognitive 20) devenv-core/src/nix_log_bridge.rs:467— NixLogBridge::handle_activity_start has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DaemonClient::read_push_events (cognitive 26) devenv-nix-backend/src/cachix_daemon.rs:861— DaemonClient::read_push_events has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (20 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DaemonClient::event_loop (cognitive 17) devenv-nix-backend/src/cachix_daemon.rs:723— DaemonClient::event_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_nix_backend::project::resolve_project (cognitive 23) devenv-nix-backend/src/project.rs:147— devenv_nix_backend::project::resolve_project has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_nix_backend::gc_store::legacy_collect_garbage (cognitive 21) devenv-nix-backend/src/gc_store.rs:189— devenv_nix_backend::gc_store::legacy_collect_garbage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Keymap::validate (cognitive 21) devenv-tui/src/config.rs:1223— Keymap::validate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Keymap::match_sequence (cognitive 17) devenv-tui/src/config.rs:1262— Keymap::match_sequence has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 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.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) devenv-processes/src/capabilities.rs:438— devenv-processes/src/capabilities.rs:438-469 | devenv-processes/src/capabilities.rs:482-502 — 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) devenv-tui/src/config.rs:1126— devenv-tui/src/config.rs:1126-1146 | devenv-tui/src/config.rs:1148-1168 — 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 (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) xtask/src/config_docs.rs:106— xtask/src/config_docs.rs:106-122 | xtask/src/config_docs.rs:304-323 — 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) devenv-tui/src/view.rs:572— devenv-tui/src/view.rs:572-588 | devenv-tui/src/view.rs:598-614 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) devenv/src/mcp.rs:338— devenv/src/mcp.rs:338-361 | devenv/src/mcp.rs:364-387 — 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.
Edited copy of a member (24 corresponding lines) devenv/src/devenv/machines.rs:2073— devenv/src/devenv/machines.rs:2073-2096 | devenv/src/devenv/machines.rs:2108-2135 — 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 (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) devenv-processes/src/process_scope.rs:506— devenv-processes/src/process_scope.rs:506-519 | devenv-processes/src/process_scope.rs:522-535 — 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) devenv/src/reload/owner.rs:241— devenv/src/reload/owner.rs:241-258 | devenv/src/reload/owner.rs:260-273 — 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 (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) devenv-tasks/src/task_cache.rs:351— devenv-tasks/src/task_cache.rs:351-370 | devenv-tasks/src/task_cache.rs:377-400 — 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) tokio-shutdown/src/lib.rs:141— tokio-shutdown/src/lib.rs:141-160 | tokio-shutdown/src/lib.rs:393-414 — 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 copy of a member (13 corresponding lines) · ×2
Edited copy of a member (13 corresponding lines) devenv-tui/src/app.rs:938— devenv-tui/src/app.rs:938-950 | devenv-tui/src/app.rs:952-964 — 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) devenv-event-sources/src/fs.rs:1279— devenv-event-sources/src/fs.rs:1279-1291 | devenv-event-sources/src/fs.rs:1293-1305 — 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 copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) devenv-nix-backend/src/logger.rs:137— devenv-nix-backend/src/logger.rs:137-159 | devenv-nix-backend/src/logger.rs:170-184 — 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) devenv-activity/src/stack.rs:192— devenv-activity/src/stack.rs:192-206 | devenv-activity/src/stack.rs:253-272 — 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 (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) devenv-cache-core/src/file.rs:26— devenv-cache-core/src/file.rs:26-35 | devenv-cache-core/src/file.rs:122-131 — 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) devenv-core/src/cachix.rs:471— devenv-core/src/cachix.rs:471-480 | devenv/src/proxy.rs:559-568 — 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 (13–14 lines × 2) devenv-tui/src/app.rs:1113— devenv-tui/src/app.rs:1113-1126 | devenv-tui/src/expanded_view.rs:391-403 — before extracting anything, compare `devenv-tui/src/app.rs` and `devenv-tui/src/expanded_view.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-tui/src/app.rs:1113` 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–14 lines × 2) devenv-tui/src/view.rs:835— devenv-tui/src/view.rs:835-847 | devenv-tui/src/view.rs:854-867 — 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 `devenv-tui/src/view.rs:835` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–11 lines × 2) devenv-shell/src/session.rs:377— devenv-shell/src/session.rs:377-387 | devenv-shell/src/session.rs:408-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–11 lines × 2) devenv/src/devenv/container.rs:115— devenv/src/devenv/container.rs:115-122 | devenv/src/devenv/mod.rs:2258-2268 — 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 `devenv/src/devenv/container.rs:115` 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 (10 lines × 3) devenv-core/src/config.rs:619— devenv-core/src/config.rs:619-628 | devenv-core/src/config.rs:767-776 | devenv-core/src/config.rs:1466-1475 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-core/src/config.rs:619` 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 × 3) devenv-tui/src/view.rs:838— devenv-tui/src/view.rs:838-847 | devenv-tui/src/view.rs:857-866 | devenv-tui/src/view.rs:890-899 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-tui/src/view.rs:838` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) devenv-nix-backend/src/backend.rs:536— devenv-nix-backend/src/backend.rs:536-545 | devenv-nix-backend/src/backend.rs:715-723 — 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 `devenv-nix-backend/src/backend.rs:536` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) devenv-run-tests/src/main.rs:832— devenv-run-tests/src/main.rs:832-840 | devenv/src/metadata.rs:77-86 — 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 `devenv-run-tests/src/main.rs:832` 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) devenv-core/src/cachix.rs:622— devenv-core/src/cachix.rs:622-627 | devenv-core/src/cachix.rs:641-646 — 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 `devenv-core/src/cachix.rs:622` 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) xtask/src/config_docs.rs:112— xtask/src/config_docs.rs:112-117 | xtask/src/config_docs.rs:313-318 — 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 `xtask/src/config_docs.rs:112` 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.
No authorization devenv/src/mcp.rs:631— This repository serves requests — a server (axum::serve) (devenv/src/mcp.rs:631) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
EscapeScanner::scan_into (cyclomatic 55) devenv-shell/src/escape/mod.rs:519— EscapeScanner::scan_into has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Config::load_sources (cyclomatic 49) devenv-core/src/config.rs:583— Config::load_sources has cyclomatic complexity 49 (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.
catalog-search.enhanceSearch (cyclomatic 45) docs/src/lib/catalog-search.ts:9— catalog-search.enhanceSearch has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 7 of the 45 points are its own statements and the rest belongs to 17 function items inside it that branch (entryCard, createGroup::render, decorateDocs, …). 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.
ConsoleOutput::handle (cyclomatic 43) devenv/src/console.rs:182— ConsoleOutput::handle has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TuiApp::run (cyclomatic 34) devenv-tui/src/app.rs:244— TuiApp::run has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Renderer::render_with_scroll (cyclomatic 32) devenv-shell/src/session.rs:1148— Renderer::render_with_scroll has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ShellCoordinator::run (cyclomatic 30) devenv-reload/src/coordinator.rs:135— ShellCoordinator::run has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileWatcher::new (cyclomatic 29) devenv-event-sources/src/fs.rs:976— FileWatcher::new has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TasksUi::handle_task_event (cyclomatic 28) devenv-tasks/src/ui.rs:181— TasksUi::handle_task_event has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
landing-environment-core.createLandingEnvironmentCore.parseEnvironment (cyclomatic 26) docs/src/lib/landing-environment-core.ts:412— landing-environment-core.createLandingEnvironmentCore.parseEnvironment has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
Executor.start (cyclomatic 25) src/modules/machines/deploy.py:256— Executor.start has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NixCBackend::dev_env_inner (cyclomatic 24) devenv-nix-backend/src/backend.rs:823— NixCBackend::dev_env_inner has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActivityArgs::parse (cyclomatic 23) devenv-activity-macros/src/lib.rs:47— ActivityArgs::parse has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
KeyCodeSpec::parse (cyclomatic 23) devenv-tui/src/config.rs:1729— KeyCodeSpec::parse has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Action::as_str (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
TaskState::run_inner (cyclomatic 22) devenv-tasks/src/task_state.rs:483— TaskState::run_inner has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SupervisorState::on_event (cyclomatic 21) devenv-processes/src/supervisor_state.rs:167— SupervisorState::on_event has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
NativeProcessManager::handle_api_client (cyclomatic 21) devenv-tasks/src/native_manager.rs:209— NativeProcessManager::handle_api_client has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
InlineTerminal::render_loop (cyclomatic 21) devenv-tui/src/inline_terminal.rs:170— InlineTerminal::render_loop has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
landing-environment-core.createLandingEnvironmentCore.selectPromptMatches (cyclomatic 21) docs/src/lib/landing-environment-core.ts:312— landing-environment-core.createLandingEnvironmentCore.selectPromptMatches has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
createSearchHandler (cyclomatic 20) functions/api/search.js:39— createSearchHandler has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 5 function items inside it that branch (onRequestGet, onRequestGet::rpc, onRequestGet::json, …). 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.
search.createSearchHandler.onRequestGet (cyclomatic 19) functions/api/search.js:40— search.createSearchHandler.onRequestGet has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MachinePlan::parse (cyclomatic 18) devenv/src/devenv/machines.rs:222— MachinePlan::parse has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Executor.worker (cyclomatic 18) src/modules/machines/deploy.py:365— Executor.worker has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RegistrationState::affected_targets (cyclomatic 17) devenv-event-sources/src/fs.rs:320— RegistrationState::affected_targets has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
devenv_nix_backend::project::resolve_project (cyclomatic 17) devenv-nix-backend/src/project.rs:147— devenv_nix_backend::project::resolve_project has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ActivityModel::calculate_summary (cyclomatic 17) devenv-tui/src/model.rs:1529— ActivityModel::calculate_summary has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ViewportRenderer::render (cyclomatic 16) devenv-shell/src/session.rs:518— ViewportRenderer::render has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
landing-environment-core.createLandingEnvironmentCore.contextualLines (cyclomatic 16) docs/src/lib/landing-environment-core.ts:271— landing-environment-core.createLandingEnvironmentCore.contextualLines has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
landing-environment-core.createLandingEnvironmentCore.removeEnvironmentEntry (cyclomatic 16) docs/src/lib/landing-environment-core.ts:538— landing-environment-core.createLandingEnvironmentCore.removeEnvironmentEntry has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
readRpc (cyclomatic 16) functions/api/search.js:5— readRpc has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EscapeScanner::scan_into (cognitive 89) devenv-shell/src/escape/mod.rs:519— EscapeScanner::scan_into has cognitive complexity 89 (threshold 15). Drivers by points: if/else 26 (53 pts), match/switch 9 (33 pts), boolean chains 2, loops 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TuiApp::run (cognitive 79) devenv-tui/src/app.rs:244— TuiApp::run has cognitive complexity 79 (threshold 15). Drivers by points: if/else 16 (44 pts), loops 9 (24 pts), match/switch 3 (8 pts), boolean chains 3 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileWatcher::new (cognitive 57) devenv-event-sources/src/fs.rs:976— FileWatcher::new has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 8 (15 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ShellCoordinator::run (cognitive 57) devenv-reload/src/coordinator.rs:135— ShellCoordinator::run has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (36 pts), match/switch 6 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Renderer::render_with_scroll (cognitive 57) devenv-shell/src/session.rs:1148— Renderer::render_with_scroll has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 5 (14 pts), boolean chains 12, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TaskState::run_inner (cognitive 52) devenv-tasks/src/task_state.rs:483— TaskState::run_inner has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 2 (8 pts), match/switch 2 (7 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ActivityArgs::parse (cognitive 50) devenv-activity-macros/src/lib.rs:47— ActivityArgs::parse has cognitive complexity 50 (threshold 15). Drivers by points: if/else 7 (29 pts), loops 3 (10 pts), boolean chains 6, match/switch 2 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TasksUi::handle_task_event (cognitive 47) devenv-tasks/src/ui.rs:181— TasksUi::handle_task_event has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (32 pts), match/switch 4 (10 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 25). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
catalog-search.enhanceSearch (cognitive 46) docs/src/lib/catalog-search.ts:9— catalog-search.enhanceSearch has cognitive complexity 46 (threshold 15). Drivers by points: if/else 29 (32 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (2 pts), loops 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to 17 function items inside it that branch (createGroup::render, entryCard, decorateDocs, …). 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.
ViewportRenderer::render (cognitive 44) devenv-shell/src/session.rs:518— ViewportRenderer::render has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 2 (5 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
landing-environment-core.createLandingEnvironmentCore.parseEnvironment (cognitive 34) docs/src/lib/landing-environment-core.ts:412— landing-environment-core.createLandingEnvironmentCore.parseEnvironment has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 10). None of this is in the body itself: all 34 points belong to one function literal inside it that branches (line 428). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
InlineTerminal::render_loop (cognitive 33) devenv-tui/src/inline_terminal.rs:170— InlineTerminal::render_loop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 2 (4 pts), loops 3, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
readRpc (cognitive 30) functions/api/search.js:5— readRpc has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 2 (4 pts), boolean chains 2, other 2 (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.
MachinePlan::parse (cognitive 29) devenv/src/devenv/machines.rs:222— MachinePlan::parse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xtask::config_docs::collect_sections (cognitive 28) xtask/src/config_docs.rs:124— xtask::config_docs::collect_sections has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Executor.start (cognitive 28) src/modules/machines/deploy.py:256— Executor.start has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 9, ternaries 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
landing-environment-core.createLandingEnvironmentCore.removeEnvironmentEntry (cognitive 26) docs/src/lib/landing-environment-core.ts:538— landing-environment-core.createLandingEnvironmentCore.removeEnvironmentEntry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 11). Of this number, 21 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RegistrationState::affected_targets (cognitive 25) devenv-event-sources/src/fs.rs:320— RegistrationState::affected_targets has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
devenv_eval_cache::eval_inputs::check_file_state (cognitive 23) devenv-eval-cache/src/eval_inputs.rs:223— devenv_eval_cache::eval_inputs::check_file_state has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
landing-environment-core.createLandingEnvironmentCore.addEnvironmentEntry (cognitive 23) docs/src/lib/landing-environment-core.ts:499— landing-environment-core.createLandingEnvironmentCore.addEnvironmentEntry has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConsoleOutput::handle (cognitive 22) devenv/src/console.rs:182— ConsoleOutput::handle has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
devenv_cache_core::file::compute_directory_hash (cognitive 22) devenv-cache-core/src/file.rs:166— devenv_cache_core::file::compute_directory_hash has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (7 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VtInputFilter::filter (cognitive 22) devenv-shell/src/session.rs:698— VtInputFilter::filter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativeProcessManager::handle_api_client (cognitive 20) devenv-tasks/src/native_manager.rs:209— NativeProcessManager::handle_api_client has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 6 (9 pts), boolean chains 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
search.createSearchHandler.onRequestGet (cognitive 20) functions/api/search.js:40— search.createSearchHandler.onRequestGet has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (7 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 4). Of this number, 13 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
landing-environment-core.createLandingEnvironmentCore.selectPromptMatches (cognitive 20) docs/src/lib/landing-environment-core.ts:312— landing-environment-core.createLandingEnvironmentCore.selectPromptMatches has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 9. Of this number, 17 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SupervisorState::on_event (cognitive 19) devenv-processes/src/supervisor_state.rs:167— SupervisorState::on_event has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Executor.worker (cognitive 18) src/modules/machines/deploy.py:365— Executor.worker has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
landing-environment-core.yamlValueLines (cognitive 18) docs/src/lib/landing-environment-core.ts:88— landing-environment-core.yamlValueLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 99, 91). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ShellSettings::resolve_with_shell_hint_env_and_login_shell (cognitive 17) devenv-core/src/settings.rs:322— ShellSettings::resolve_with_shell_hint_env_and_login_shell has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ProcessSetupWrapper::pre_spawn (cognitive 17) devenv-processes/src/socket_activation.rs:246— ProcessSetupWrapper::pre_spawn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EscapeState::apply_dec_mode (cognitive 17) devenv-shell/src/escape_state.rs:81— EscapeState::apply_dec_mode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CachixIntegration::init (cognitive 16) devenv/src/devenv/cachix.rs:75— CachixIntegration::init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3, boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PortAllocator::allocate (cognitive 16) devenv-core/src/ports.rs:248— PortAllocator::allocate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProcessRunner::launch_setup (cognitive 16) devenv-processes/src/manager.rs:1451— ProcessRunner::launch_setup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
createSearchHandler::onRequestGet (cognitive 16) functions/api/search.js:40— createSearchHandler::onRequestGet has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (6 pts), if/else 4, error handling 2 (3 pts), boolean chains 2, other 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: executor.rs ↔ tasks.rs devenv-tasks/src/executor.rs:1— `devenv-tasks/src/executor.rs` and `devenv-tasks/src/tasks.rs` 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 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 5 shared commits counted here, the most recent 3 are `a73c5b84` fix(tasks): wait for cancellation cleanup before scheduler exit (#3256); `f5e4b9c1` devenv: fixup source locations in traces; `7ea7c651` fix: resolve all compiler warnings — run `git show` on any of them.
Near-duplicate member pair (31 shared lines) devenv/src/tracing/otel.rs:211— devenv/src/tracing/otel.rs:211-247 | devenv/src/tracing/otel.rs:252-288 — These two members are variants of one another: 31 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (4 members, 50+ identical tokens) devenv/src/devenv/machines.rs:2150— devenv/src/devenv/machines.rs:2150-2192 | devenv/src/devenv/machines.rs:2204-2262 | devenv/src/devenv/machines.rs:2310-2339 | devenv/src/devenv/machines.rs:3244-3262 — These 4 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 4 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 4 times.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) devenv-processes/src/process_guardian.rs:214— devenv-processes/src/process_guardian.rs:214-245 | devenv-processes/src/process_guardian.rs:264-302 — 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 (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) devenv-event-sources/src/fs.rs:732— devenv-event-sources/src/fs.rs:732-769 | devenv-event-sources/src/fs.rs:807-841 — These two members are one piece of code written twice and then edited apart: 35 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 (66 corresponding lines) · ×1
Edited copy of a member (66 corresponding lines) devenv-shell/src/dialect/fish.rs:75— devenv-shell/src/dialect/fish.rs:75-158 | devenv-shell/src/dialect/zsh.rs:89-154 — These two members are one piece of code written twice and then edited apart: 66 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, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) devenv-shell/src/keybindings.rs:102— devenv-shell/src/keybindings.rs:102-120 | devenv-shell/src/keybindings.rs:122-140 | devenv-tui/src/config.rs:1569-1587 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 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, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) xtask/src/config_docs.rs:26— xtask/src/config_docs.rs:26-35 | xtask/src/config_docs.rs:37-46 | xtask/src/config_docs.rs:48-58 — 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 (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) devenv-processes/src/pty.rs:126— devenv-processes/src/pty.rs:126-144 | devenv-processes/src/pty.rs:147-162 — 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 copies of one member (6 members, 11+ corresponding lines) · ×1
Edited copies of one member (6 members, 11+ corresponding lines) devenv-activity/src/builders.rs:496— devenv-activity/src/builders.rs:496-506 | devenv-activity/src/builders.rs:520-530 | devenv-activity/src/builders.rs:587-599 | devenv-activity/src/builders.rs:647-657 | devenv-activity/src/builders.rs:761-771 | devenv-activity/src/builders.rs:916-927 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) devenv-shell/src/terminal.rs:66— devenv-shell/src/terminal.rs:66-73 | devenv-tui/src/app.rs:687-694 — 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.
Duplicated block (40–42 lines × 2) devenv-reload/src/coordinator.rs:334— devenv-reload/src/coordinator.rs:334-375 | devenv-reload/src/coordinator.rs:425-464 — 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 `devenv-reload/src/coordinator.rs:334` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `devenv-reload/src/coordinator.rs:421` calls `drain`, `collect` and `devenv-reload/src/coordinator.rs:332` 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 (32–33 lines × 2) devenv-core/src/ports.rs:680— devenv-core/src/ports.rs:680-712 | devenv-processes/src/manager.rs:661-692 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (32 lines × 2) devenv-tui/src/app.rs:1035— devenv-tui/src/app.rs:1035-1066 | devenv-tui/src/expanded_view.rs:233-264 — before extracting anything, compare `devenv-tui/src/app.rs` and `devenv-tui/src/expanded_view.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) devenv-tui/src/expanded_view.rs:965— devenv-tui/src/expanded_view.rs:965-987 | devenv-tui/src/expanded_view.rs:997-1019 — 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 `devenv-tui/src/expanded_view.rs:965` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17–20 lines × 3) devenv-shell/src/escape/mod.rs:677— devenv-shell/src/escape/mod.rs:677-693 | devenv-shell/src/escape/mod.rs:718-737 | devenv-shell/src/escape/mod.rs:768-787 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-shell/src/escape/mod.rs:677` 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 (19 lines × 2) devenv/src/devenv/machines.rs:1189— devenv/src/devenv/machines.rs:1189-1207 | devenv/src/devenv/machines.rs:1252-1270 — 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–18 lines × 2) devenv-shell/src/session.rs:2103— devenv-shell/src/session.rs:2103-2120 | devenv-shell/src/session.rs:2129-2143 — 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 × 2) devenv-tui/src/app.rs:1277— devenv-tui/src/app.rs:1277-1293 | devenv-tui/src/app.rs:1339-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 `devenv-tui/src/app.rs:1277` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–17 lines × 2) devenv/src/devenv/machines.rs:2152— devenv/src/devenv/machines.rs:2152-2168 | devenv/src/devenv/machines.rs:2216-2230 — 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 `devenv/src/devenv/machines.rs:2216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) devenv-shell/src/escape/mod.rs:532— devenv-shell/src/escape/mod.rs:532-547 | devenv-shell/src/escape/mod.rs:729-744 | devenv-shell/src/escape/mod.rs:779-794 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-shell/src/escape/mod.rs:532` 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 (16 lines × 2) devenv-tasks/src/tasks.rs:1188— devenv-tasks/src/tasks.rs:1188-1203 | devenv-tasks/src/tasks.rs:1214-1229 — 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 `devenv-tasks/src/tasks.rs:1188` 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 (15 lines × 2) devenv-tui/src/view.rs:926— devenv-tui/src/view.rs:926-940 | devenv-tui/src/view.rs:1003-1017 — 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 `devenv-tui/src/view.rs:926` 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 before the matched lines, `devenv-tui/src/view.rs:924` calls `build_activity_prefix` and `devenv-tui/src/view.rs:1001` 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 (14 lines × 3) devenv-tui/src/app.rs:1150— devenv-tui/src/app.rs:1150-1163 | devenv-tui/src/app.rs:1278-1291 | devenv-tui/src/app.rs:1340-1353 — 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 (11 lines × 4) devenv-shell/src/escape/mod.rs:531— devenv-shell/src/escape/mod.rs:531-541 | devenv-shell/src/escape/mod.rs:684-694 | devenv-shell/src/escape/mod.rs:728-738 | devenv-shell/src/escape/mod.rs:778-788 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-shell/src/escape/mod.rs:531` 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–11 lines × 2) devenv-tui/src/app.rs:1101— devenv-tui/src/app.rs:1101-1111 | devenv-tui/src/expanded_view.rs:384-389 — before extracting anything, compare `devenv-tui/src/app.rs` and `devenv-tui/src/expanded_view.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-tui/src/app.rs:1101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) devenv-core/src/nix_log_bridge.rs:522— devenv-core/src/nix_log_bridge.rs:522-530 | devenv-core/src/nix_log_bridge.rs:587-595 | devenv-core/src/nix_log_bridge.rs:613-621 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-core/src/nix_log_bridge.rs:522` 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 (7 lines × 4) devenv/src/devenv/machines.rs:2152— devenv/src/devenv/machines.rs:2152-2158 | devenv/src/devenv/machines.rs:2218-2224 | devenv/src/devenv/machines.rs:2311-2317 | devenv/src/devenv/machines.rs:3245-3251 — all 4 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 (6–7 lines × 2) devenv-eval-cache/src/eval_inputs.rs:150— devenv-eval-cache/src/eval_inputs.rs:150-156 | devenv-eval-cache/src/eval_inputs.rs:194-199 — 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 `devenv-eval-cache/src/eval_inputs.rs:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `path` to `&std::path::Path` in one and `&Path` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (3–5 lines × 6) devenv-shell/src/status_line.rs:626— devenv-shell/src/status_line.rs:626-628 | devenv-shell/src/status_line.rs:657-661 | devenv-shell/src/status_line.rs:676-680 | devenv-shell/src/status_line.rs:706-708 | devenv-shell/src/status_line.rs:737-739 | devenv-shell/src/status_line.rs:767-769 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-shell/src/status_line.rs:626` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `devenv-shell/src/status_line.rs:661` calls `View` and `devenv-shell/src/status_line.rs:628` does not — after which the two agree again for 5 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 (14 lines × 2) devenv-tui/src/bin/tui-replay.rs:276— devenv-tui/src/bin/tui-replay.rs:276-289 | devenv-tui/src/bin/tui-replay.rs:304-317 — 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 `devenv-tui/src/bin/tui-replay.rs:276` 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 × 3) devenv-core/src/config.rs:617— devenv-core/src/config.rs:617-624 | devenv-core/src/config.rs:668-678 | devenv-core/src/config.rs:1464-1471 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-core/src/config.rs:617` 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 (5 lines × 3) devenv-shell/src/dialect/bash.rs:314— devenv-shell/src/dialect/bash.rs:314-318 | devenv-shell/src/dialect/fish.rs:171-176 | devenv-shell/src/dialect/zsh.rs:166-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `devenv-shell/src/dialect/fish.rs:171` 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 (5 lines × 2) devenv-event-sources/src/fs.rs:813— devenv-event-sources/src/fs.rs:813-817 | devenv-event-sources/src/fs.rs:906-910 — 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.
Complex function readRpc (cyclomatic 16, cognitive 30) functions/api/search.js:5— readRpc has cyclomatic complexity 16 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 onRequestGet (cyclomatic 14, cognitive 16) functions/api/search.js:40— onRequestGet has cyclomatic complexity 14 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Silent fallback default on Err devenv/src/devenv/cachix.rs:303— `load_known_keys` turns every `Err` into `BTreeMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err devenv-core/src/nix_log_bridge.rs:180— `take_pre_repl_errors` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err devenv-processes/src/log_tailer.rs:171— `read_tail` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Subsumed condition operand devenv-tasks/src/task_cache.rs:65— `raw.starts_with("/.")` can never decide this `||` — every value satisfying `raw.starts_with("/.")` also satisfies `raw.contains("/.")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand devenv-nix-backend/tests/test_nix_backend.rs:123— `lock.contains("nixos-unstable")` can never decide this `||` — every value satisfying `lock.contains("nixos-unstable")` also satisfies `lock.contains("unstable")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand devenv-nix-backend/tests/test_nix_backend.rs:393— `msg.contains("nonexistent.attribute.path")` can never decide this `||` — every value satisfying `msg.contains("nonexistent.attribute.path")` also satisfies `msg.contains("attribute")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 15 significant file(s) lose their only recent owner: devenv-processes/src/external_manager.rs, devenv-processes/src/process_scope.rs, devenv-processes/src/process_guardian.rs, devenv-processes/src/manager_capabilities.rs, devenv-nix-backend/src/cachix_protocol.rs, devenv/src/tracing/otel.rs, devenv-nix-backend/src/gc_store.rs, devenv/src/tracing/activity_json_layer.rs (+7 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: devenv/src/devenv/machines.rs, devenv-processes/src/capabilities.rs, devenv-eval-cache/src/eval_inputs.rs, devenv-proxy/src/lib.rs, devenv-proxy/src/routes.rs, devenv-proxy/src/control.rs, devenv-processes/src/pid.rs, devenv-event-sources/src/http_probe.rs (+2 more). Pair on, review, or document these before any departure.
Duplicated predicate docs/src/lib/environment-generation.ts:27— `typeof payload?.devenv_nix !== 'string' || !payload.devenv_nix.trim()` appears character-identically in 2 files — docs/src/lib/environment-generation.ts, functions/api/generate.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate devenv-tui/src/app.rs:892— `!key_consumed && key_event.code == KeyCode::Backspace` appears character-identically in 2 files — devenv-tui/src/app.rs, devenv-tui/src/expanded_view.rs. 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.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
Logging is not universal — Only 13/17 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `devenv-proxy`, `devenv-run-tests`, `xtask`.
No SAST REDACTED:7— No static application security testing detected. For this repository's stack, add cargo-audit / cargo-deny (or clippy) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 18 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (devenv/src/mcp.rs:631).
No inbound request validation detected — No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `axum::serve(` (devenv/src/mcp.rs:631).
Outdated: solargraph — `solargraph` is resolved to 0.58.1 in the committed REDACTED but 0.62.1 is the current release on rubygems.org, and src/modules/lib/ruby-lsp/Gemfile declares no version requirement for it, so nothing but the lockfile is holding it back. This build is therefore missing every fix published since, including any security fix. Run `bundle update solargraph` and commit the updated REDACTED.
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.
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 01a1db0c-8a8f-7c54-82a7-cfddd472bbaa · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 120 · Warnings: 497 · Recommendations: 19 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 17:13 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.