Public report of smol-machines/smolvm, published 27 October 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.10.5). Watchdog 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, 27 October 2026, 21:31 UTC · Survey ID cd_f8b9c7cbda6940fd80267d1288114de8
smol-machines/smolvm
Measured 27 October 2026, 21:27 UTC, at code version f75836c
No regression since the last survey
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
Up 5 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: 261,504 lines of product code in 18 projects, tests not counted · Estimated rebuild effort: about 1.8 person-years · Weakest lens: Accessibility, 46
Findings by how serious they are
109 critical1095 serious122 minor
13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 21:27 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 Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸
72of 72 dimensions measured by tools.
1277of 1326 findings point to an exact file and line, so you can open each one in the code. The other 49 concern the repository as a whole, such as missing documentation.
72dimensions across 8 lenses, read from 261,504 lines of product code in 18 projects.
smol-machines/smolvm falls short of our standard for production, held back most by its Accessibility lens, the interface's usability with a keyboard or assistive technology. It scores 55 out of 100 and is rated Adequate, and 102 of its 109 critical findings are security problems.
Accessibility, at 46, is the weakest lens and counts most in the score. The best first step is adding text alternatives, worth about 6 points. Automating accessibility checks comes next, worth about 4 points. Raising Accessibility to 70 would lift the score to about 61.
Ninety-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Three pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline, and six sets of files in separate parts keep changing together, which points to hidden dependencies. Pinning each tool to an exact version, passing outside input through environment variables and making the hidden dependencies explicit would close these risks. Correcting the flagged pipeline settings would fix the three weaknesses in the build pipeline's configuration, and the three pipeline steps that run downloads without checking them need each download checked against a known checksum first. Moving the write out of the read operation would take care of the read operation that also writes data.
The product code is 261,504 lines, about €260,000 to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Accessibility rose from 46 to 70, the lowest score rated Strong, the score would rise from 55 to about 61.
Code composition: what the lines of code are
Product code 98%Tests 2%
New since the last survey: 124 findings
These 124 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares 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: 43 findings
These 43 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.
Visual & motion safety · Focus outline removed in CSS without a :focus replacement src/agent/vnc_client.html
Rebuild cost: about €260,000 · Estimate
Cost to rebuild
€88,000 to €440,000, for 1,460 to 4,632 hours of work, about 1.8 person-years for 1 to 4 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.8 at a score of 55. 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: 261,504 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: Watchdog prices 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
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 6 points · Medium effort · Text alternatives
2
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Raises the score by about 4 points · Medium effort · A11y enforcement
3
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Raises the score by about 4 points · Medium effort · Page structure
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €260,000 to build again, about 1.8 person-years of work. Its weakest lens is Accessibility, at 46 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video. Of all the actions in this report, it raises the score most for the work it takes: about 6 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 6.5 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 4% to 8% on every change. The history of the code shows how much it changes: about 239,807 lines over the last 90 days, which is about 972,551 lines a year. At that pace, the extra work comes to an estimated 91.5 to 549.1 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 Watchdog's 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.
270 modules, with 510 dependencies between them. 4 loops run through 20 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 230 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.
smolvm.agent.fork uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.agent.fork, while a change to smolvm.agent.fork can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.agent.fork uses a module listed above it, which is the healthy direction.
8→14 smolvm.agent.fork uses smolvm.dbpart of a loop✕
Connections
1 pair of types, where a type in smolvm.agent.fork uses a type in smolvm.db.
smolvm.agent.fork uses smolvm.config, so a change to smolvm.config can break smolvm.agent.fork, while a change to smolvm.agent.fork can't break smolvm.config.
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.
smolvm.data.resources uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.data.resources, while a change to smolvm.data.resources can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.data.resources uses a module listed above it, which is the healthy direction.
smolvm.data.resources uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.data.resources, while a change to smolvm.data.resources can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.data.resources uses a module listed above it, which is the healthy direction.
smolvm_cuda.proto uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_cuda.proto, while a change to smolvm_cuda.proto can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_cuda.proto uses a module listed above it, which is the healthy direction.
smolvm_network.egress uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm_network.egress, while a change to smolvm_network.egress can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm_network.egress uses a module listed above it, which is the healthy direction.
smolvm_protocol uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_protocol, while a change to smolvm_protocol can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_protocol uses a module listed above it, which is the healthy direction.
12→26 smolvm_protocol uses smolvm.api.typespart of a loop✕
Connections
1 pair of types, where a type in smolvm_protocol uses a type in smolvm.api.types.
smolvm_protocol uses smolvm.api.types, so a change to smolvm.api.types can break smolvm_protocol, while a change to smolvm_protocol can't break smolvm.api.types.
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.
smolvm_protocol.credentials uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_protocol.credentials, while a change to smolvm_protocol.credentials can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_protocol.credentials uses a module listed above it, which is the healthy direction.
smolvm_agent uses smolvm_agent.oci, so a change to smolvm_agent.oci can break smolvm_agent, while a change to smolvm_agent can't break smolvm_agent.oci.
Position
Below the diagonal: smolvm_agent uses a module listed above it, which is the healthy direction.
smolvm_cuda.client uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_cuda.client, while a change to smolvm_cuda.client can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_cuda.client uses a module listed above it, which is the healthy direction.
smolvm_cuda.client uses smolvm_cuda.proto, so a change to smolvm_cuda.proto can break smolvm_cuda.client, while a change to smolvm_cuda.client can't break smolvm_cuda.proto.
Position
Below the diagonal: smolvm_cuda.client uses a module listed above it, which is the healthy direction.
smolvm_network uses smolvm_network.queues, so a change to smolvm_network.queues can break smolvm_network, while a change to smolvm_network can't break smolvm_network.queues.
Position
Below the diagonal: smolvm_network uses a module listed above it, which is the healthy direction.
smolvm_network uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm_network, while a change to smolvm_network can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm_network uses a module listed above it, which is the healthy direction.
smolvm_network uses smolvm_network.egress, so a change to smolvm_network.egress can break smolvm_network, while a change to smolvm_network can't break smolvm_network.egress.
Position
Below the diagonal: smolvm_network uses a module listed above it, which is the healthy direction.
smolvm_pack.format uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm_pack.format, while a change to smolvm_pack.format can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm_pack.format uses a module listed above it, which is the healthy direction.
smolvm_pack.format uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm_pack.format, while a change to smolvm_pack.format can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm_pack.format uses a module listed above it, which is the healthy direction.
smolvm.agent.launcher uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.agent.launcher, while a change to smolvm.agent.launcher can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.agent.launcher uses a module listed above it, which is the healthy direction.
smolvm.agent.launcher uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.agent.launcher, while a change to smolvm.agent.launcher can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.agent.launcher uses a module listed above it, which is the healthy direction.
smolvm.agent.launcher uses smolvm_network, so a change to smolvm_network can break smolvm.agent.launcher, while a change to smolvm.agent.launcher can't break smolvm_network.
Position
Below the diagonal: smolvm.agent.launcher uses a module listed above it, which is the healthy direction.
19→28 smolvm.agent.launcher uses smolvm.configpart of a loop✕
Connections
1 pair of types, where a type in smolvm.agent.launcher uses a type in smolvm.config.
smolvm.agent.launcher uses smolvm.config, so a change to smolvm.config can break smolvm.agent.launcher, while a change to smolvm.agent.launcher can't break smolvm.config.
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.
smolvm_registry.client uses smolvm_cuda.proto, so a change to smolvm_cuda.proto can break smolvm_registry.client, while a change to smolvm_registry.client can't break smolvm_cuda.proto.
Position
Below the diagonal: smolvm_registry.client uses a module listed above it, which is the healthy direction.
smolvm_registry.client uses smolvm_cuda.client, so a change to smolvm_cuda.client can break smolvm_registry.client, while a change to smolvm_registry.client can't break smolvm_cuda.client.
Position
Below the diagonal: smolvm_registry.client uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in smolvm_s3fs.fs uses a type in smolvm_s3fs.s3.
The types involved
smolvm_s3fs.fs.S3Fs → smolvm_s3fs.s3.Listing
Direction
smolvm_s3fs.fs uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_s3fs.fs, while a change to smolvm_s3fs.fs can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_s3fs.fs uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in smolvm_s3fs.fs uses a type in smolvm_cuda.proto.
The types involved
smolvm_s3fs.fs.S3Fs → smolvm_cuda.proto.Request
Direction
smolvm_s3fs.fs uses smolvm_cuda.proto, so a change to smolvm_cuda.proto can break smolvm_s3fs.fs, while a change to smolvm_s3fs.fs can't break smolvm_cuda.proto.
Position
Below the diagonal: smolvm_s3fs.fs uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in smolvm_s3fs.fs uses a type in smolvm_cuda.client.
The types involved
smolvm_s3fs.fs.S3Fs → smolvm_cuda.client.Client
Direction
smolvm_s3fs.fs uses smolvm_cuda.client, so a change to smolvm_cuda.client can break smolvm_s3fs.fs, while a change to smolvm_s3fs.fs can't break smolvm_cuda.client.
Position
Below the diagonal: smolvm_s3fs.fs uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm.db, so a change to smolvm.db can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.db.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm_network, so a change to smolvm_network can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm_network.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
smolvm.agent.manager uses smolvm.agent.launcher, so a change to smolvm.agent.launcher can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.agent.launcher.
Position
Below the diagonal: smolvm.agent.manager uses a module listed above it, which is the healthy direction.
22→27 smolvm.agent.manager uses smolvm.data.storagepart of a loop✕
Connections
4 pairs of types, where a type in smolvm.agent.manager uses a type in smolvm.data.storage.
smolvm.agent.manager uses smolvm.data.storage, so a change to smolvm.data.storage can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.data.storage.
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.
22→28 smolvm.agent.manager uses smolvm.configpart of a loop✕
Connections
1 pair of types, where a type in smolvm.agent.manager uses a type in smolvm.config.
smolvm.agent.manager uses smolvm.config, so a change to smolvm.config can break smolvm.agent.manager, while a change to smolvm.agent.manager can't break smolvm.config.
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.
smolvm.registry uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.registry, while a change to smolvm.registry can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.registry uses a module listed above it, which is the healthy direction.
smolvm.registry uses smolvm_protocol, so a change to smolvm_protocol can break smolvm.registry, while a change to smolvm.registry can't break smolvm_protocol.
Position
Below the diagonal: smolvm.registry uses a module listed above it, which is the healthy direction.
smolvm.registry uses smolvm_registry.client, so a change to smolvm_registry.client can break smolvm.registry, while a change to smolvm.registry can't break smolvm_registry.client.
Position
Below the diagonal: smolvm.registry uses a module listed above it, which is the healthy direction.
smolvm_checkpoint.store uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_checkpoint.store, while a change to smolvm_checkpoint.store can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_checkpoint.store uses a module listed above it, which is the healthy direction.
smolvm_checkpoint.store uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm_checkpoint.store, while a change to smolvm_checkpoint.store can't break smolvm_pack.format.
Position
Below the diagonal: smolvm_checkpoint.store uses a module listed above it, which is the healthy direction.
smolvm_checkpoint.store uses smolvm_s3fs.fs, so a change to smolvm_s3fs.fs can break smolvm_checkpoint.store, while a change to smolvm_checkpoint.store can't break smolvm_s3fs.fs.
Position
Below the diagonal: smolvm_checkpoint.store uses a module listed above it, which is the healthy direction.
smolvm_pack.extract uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm_pack.extract, while a change to smolvm_pack.extract can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm_pack.extract uses a module listed above it, which is the healthy direction.
smolvm_pack.extract uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm_pack.extract, while a change to smolvm_pack.extract can't break smolvm_pack.format.
Position
Below the diagonal: smolvm_pack.extract uses a module listed above it, which is the healthy direction.
smolvm_pack.extract uses smolvm_s3fs.fs, so a change to smolvm_s3fs.fs can break smolvm_pack.extract, while a change to smolvm_pack.extract can't break smolvm_s3fs.fs.
Position
Below the diagonal: smolvm_pack.extract uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm_protocol, so a change to smolvm_protocol can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm_protocol.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm_network, so a change to smolvm_network can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm_network.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
smolvm.api.types uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.api.types uses a module listed above it, which is the healthy direction.
26→27 smolvm.api.types uses smolvm.data.storagepart of a loop✕
Connections
1 pair of types, where a type in smolvm.api.types uses a type in smolvm.data.storage.
smolvm.api.types uses smolvm.data.storage, so a change to smolvm.data.storage can break smolvm.api.types, while a change to smolvm.api.types can't break smolvm.data.storage.
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.
smolvm.data.storage uses smolvm.api.types, so a change to smolvm.api.types can break smolvm.data.storage, while a change to smolvm.data.storage can't break smolvm.api.types.
Position
Below the diagonal: smolvm.data.storage uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.config, while a change to smolvm.config can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.config, while a change to smolvm.config can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.config, while a change to smolvm.config can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm_network.egress, so a change to smolvm_network.egress can break smolvm.config, while a change to smolvm.config can't break smolvm_network.egress.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm.config, while a change to smolvm.config can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.config uses smolvm.data.storage, so a change to smolvm.data.storage can break smolvm.config, while a change to smolvm.config can't break smolvm.data.storage.
Position
Below the diagonal: smolvm.config uses a module listed above it, which is the healthy direction.
smolvm.agent.boot_config uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.agent.boot_config, while a change to smolvm.agent.boot_config can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.agent.boot_config uses a module listed above it, which is the healthy direction.
smolvm.agent.boot_config uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.agent.boot_config, while a change to smolvm.agent.boot_config can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.agent.boot_config uses a module listed above it, which is the healthy direction.
smolvm.agent.boot_config uses smolvm_network, so a change to smolvm_network can break smolvm.agent.boot_config, while a change to smolvm.agent.boot_config can't break smolvm_network.
Position
Below the diagonal: smolvm.agent.boot_config uses a module listed above it, which is the healthy direction.
smolvm.agent.boot_config uses smolvm.data.storage, so a change to smolvm.data.storage can break smolvm.agent.boot_config, while a change to smolvm.agent.boot_config can't break smolvm.data.storage.
Position
Below the diagonal: smolvm.agent.boot_config uses a module listed above it, which is the healthy direction.
smolvm.agent.boot_config uses smolvm.config, so a change to smolvm.config can break smolvm.agent.boot_config, while a change to smolvm.agent.boot_config can't break smolvm.config.
Position
Below the diagonal: smolvm.agent.boot_config uses a module listed above it, which is the healthy direction.
smolvm.agent.client uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.agent.client, while a change to smolvm.agent.client can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.agent.client uses a module listed above it, which is the healthy direction.
smolvm.agent.client uses smolvm_protocol, so a change to smolvm_protocol can break smolvm.agent.client, while a change to smolvm.agent.client can't break smolvm_protocol.
Position
Below the diagonal: smolvm.agent.client uses a module listed above it, which is the healthy direction.
smolvm.agent.client uses smolvm.registry, so a change to smolvm.registry can break smolvm.agent.client, while a change to smolvm.agent.client can't break smolvm.registry.
Position
Below the diagonal: smolvm.agent.client uses a module listed above it, which is the healthy direction.
smolvm.agent.client uses smolvm.config, so a change to smolvm.config can break smolvm.agent.client, while a change to smolvm.agent.client can't break smolvm.config.
Position
Below the diagonal: smolvm.agent.client uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm.api.types, so a change to smolvm.api.types can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm.api.types.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.api.state uses smolvm.config, so a change to smolvm.config can break smolvm.api.state, while a change to smolvm.api.state can't break smolvm.config.
Position
Below the diagonal: smolvm.api.state uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.agent.fork, so a change to smolvm.agent.fork can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.agent.fork.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm_network.egress, so a change to smolvm_network.egress can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm_network.egress.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.db, so a change to smolvm.db can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.db.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm_network, so a change to smolvm_network can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm_network.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.agent.launcher, so a change to smolvm.agent.launcher can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.agent.launcher.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.data.storage, so a change to smolvm.data.storage can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.data.storage.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.embedded.control uses smolvm.config, so a change to smolvm.config can break smolvm.embedded.control, while a change to smolvm.embedded.control can't break smolvm.config.
Position
Below the diagonal: smolvm.embedded.control uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm.db, so a change to smolvm.db can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm.db.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm_pack.format.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm_s3fs.fs, so a change to smolvm_s3fs.fs can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm_s3fs.fs.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm.registry, so a change to smolvm.registry can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm.registry.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm_checkpoint.store, so a change to smolvm_checkpoint.store can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm_checkpoint.store.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm_pack.extract, so a change to smolvm_pack.extract can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm_pack.extract.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.portable_checkpoint uses smolvm.config, so a change to smolvm.config can break smolvm.portable_checkpoint, while a change to smolvm.portable_checkpoint can't break smolvm.config.
Position
Below the diagonal: smolvm.portable_checkpoint uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm_agent.shutdown_freeze, so a change to smolvm_agent.shutdown_freeze can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm_agent.shutdown_freeze.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.agent.fork, so a change to smolvm.agent.fork can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.agent.fork.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm_cuda.proto, so a change to smolvm_cuda.proto can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm_cuda.proto.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm_pack.format.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.registry, so a change to smolvm.registry can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.registry.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm_pack.extract, so a change to smolvm_pack.extract can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm_pack.extract.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.api.types, so a change to smolvm.api.types can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.api.types.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.config, so a change to smolvm.config can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.config.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.api.state, so a change to smolvm.api.state can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.api.state.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.api.handlers.machines uses smolvm.portable_checkpoint, so a change to smolvm.portable_checkpoint can break smolvm.api.handlers.machines, while a change to smolvm.api.handlers.machines can't break smolvm.portable_checkpoint.
Position
Below the diagonal: smolvm.api.handlers.machines uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm_pack.format.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm_registry.client, so a change to smolvm_registry.client can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm_registry.client.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm.registry, so a change to smolvm.registry can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm.registry.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm_checkpoint.store, so a change to smolvm_checkpoint.store can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm_checkpoint.store.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm.agent.client, so a change to smolvm.agent.client can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm.agent.client.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack uses smolvm.portable_checkpoint, so a change to smolvm.portable_checkpoint can break smolvm.cli.pack, while a change to smolvm.cli.pack can't break smolvm.portable_checkpoint.
Position
Below the diagonal: smolvm.cli.pack uses a module listed above it, which is the healthy direction.
smolvm.cli.pack_run uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.cli.pack_run, while a change to smolvm.cli.pack_run can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.cli.pack_run uses a module listed above it, which is the healthy direction.
smolvm.cli.pack_run uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.cli.pack_run, while a change to smolvm.cli.pack_run can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.cli.pack_run uses a module listed above it, which is the healthy direction.
smolvm.cli.pack_run uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm.cli.pack_run, while a change to smolvm.cli.pack_run can't break smolvm_pack.format.
Position
Below the diagonal: smolvm.cli.pack_run uses a module listed above it, which is the healthy direction.
smolvm.cli.pack_run uses smolvm.agent.boot_config, so a change to smolvm.agent.boot_config can break smolvm.cli.pack_run, while a change to smolvm.cli.pack_run can't break smolvm.agent.boot_config.
Position
Below the diagonal: smolvm.cli.pack_run uses a module listed above it, which is the healthy direction.
smolvm.cli.pack_run uses smolvm.agent.client, so a change to smolvm.agent.client can break smolvm.cli.pack_run, while a change to smolvm.cli.pack_run can't break smolvm.agent.client.
Position
Below the diagonal: smolvm.cli.pack_run uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.agent.fork, so a change to smolvm.agent.fork can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.agent.fork.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_protocol, so a change to smolvm_protocol can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_protocol.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.db, so a change to smolvm.db can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.db.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm_network, so a change to smolvm_network can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm_network.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.config, so a change to smolvm.config can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.config.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.cli.vm_common uses smolvm.agent.client, so a change to smolvm.agent.client can break smolvm.cli.vm_common, while a change to smolvm.cli.vm_common can't break smolvm.agent.client.
Position
Below the diagonal: smolvm.cli.vm_common uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm_protocol.intercept, so a change to smolvm_protocol.intercept can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm_protocol.intercept.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm.agent.fork, so a change to smolvm.agent.fork can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm.agent.fork.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm_network.egress, so a change to smolvm_network.egress can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm_network.egress.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm_protocol.credentials, so a change to smolvm_protocol.credentials can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm_protocol.credentials.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm.db, so a change to smolvm.db can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm.db.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm.embedded.control, so a change to smolvm.embedded.control can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm.embedded.control.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.embedded.runtime uses smolvm.portable_checkpoint, so a change to smolvm.portable_checkpoint can break smolvm.embedded.runtime, while a change to smolvm.embedded.runtime can't break smolvm.portable_checkpoint.
Position
Below the diagonal: smolvm.embedded.runtime uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm.data.disk, so a change to smolvm.data.disk can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm.data.disk.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm_pack.format, so a change to smolvm_pack.format can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm_pack.format.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm.agent.launcher, so a change to smolvm.agent.launcher can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm.agent.launcher.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm.config, so a change to smolvm.config can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm.config.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.pack_export uses smolvm.agent.client, so a change to smolvm.agent.client can break smolvm.pack_export, while a change to smolvm.pack_export can't break smolvm.agent.client.
Position
Below the diagonal: smolvm.pack_export uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm_protocol.egress_rule, so a change to smolvm_protocol.egress_rule can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm_protocol.egress_rule.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm_s3fs.s3, so a change to smolvm_s3fs.s3 can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm_s3fs.s3.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.data.resources, so a change to smolvm.data.resources can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.data.resources.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.agent.manager, so a change to smolvm.agent.manager can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.agent.manager.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.config, so a change to smolvm.config can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.config.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.agent.client, so a change to smolvm.agent.client can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.agent.client.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.cli.pack, so a change to smolvm.cli.pack can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.cli.pack.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
smolvm.cli.machine uses smolvm.cli.vm_common, so a change to smolvm.cli.vm_common can break smolvm.cli.machine, while a change to smolvm.cli.machine can't break smolvm.cli.vm_common.
Position
Below the diagonal: smolvm.cli.machine uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 80% · Adequate · gated by D2 ·
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
103
High / Critical
A02:2025 — Security Misconfiguration
23
High / Critical
A03:2025 — Software Supply Chain Failures
18
Medium
Roadmap
First, ensure all media elements have appropriate text alternatives and captions to support screen readers. Second, enforce accessibility standards by integrating invariant checks into the test suite and gating merges in CI to prevent regressions. Third, correct page structure by defining language, titles, landmarks, and proper heading hierarchy while disabling meta-refresh. Fourth, maintain dependency hygiene by regularly updating packages to their latest compatible versions. Finally, improve outbound HTTP resilience by adding timeouts, retry logic, and circuit breakers to all network calls.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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.
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 — 109
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 — 1095
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 — 122
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
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
Watchdog 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. 72 of 72 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 72 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, 1277 of 1326 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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 — Watchdog 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: test source is present (.rs, .py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`, or `coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs, .py) and this repository declares a Cargo test suite (repository root, 221 test files), but it was not re-run: its build outgrew the 7 GB scratch ceiling (7.34 GB measured) and was stopped; its suite was not run. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (63 contributor(s) across 2119 commit(s) sampled, automation and bot accounts excluded). One of them holds 87% of the history; the other 62 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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.
D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming 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. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
D22 Internal API Consistency — not measured this run — Watchdog 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D27 Navigability — not measured this run — Watchdog 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.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog 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 ToolchainServer (.). the service did not build — `cargo build --locked --bin 'smolvm'` exited 1: info: syncing channel updates for stable-x86_64-unknown-linux-gnu
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/usr/local/rustup/tmp/t2t5…; runtime evidence skipped (launch chosen because 'axum' dependency in Cargo.toml, binary 'smolvm', started with its 'serve' subcommand).
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python, Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python, Rust, c is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, 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.
X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C, Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
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.
142 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was smolvm_cuda::host::dispatch at 292. A further 9 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 Op::from_u8 at 105 — they are counted neither in the figure above nor in this dimension's score. 3 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: src/agent/input.rs (smolvm::agent::input::keysym_to_evdev at 84), crates/smolvm-protocol/src/lib.rs (AgentRequest::log_summary at 48), src/agent/vnc_client.html (vnc_client.html.startVideo at 16). 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 120 down to 120 or less in Cyclomatic Complexity — start with smolvm_cuda::host::dispatch (cyclomatic 292), smolvm::agent::launcher::launch_agent_vm (cyclomatic 190), RunCmd::run (cyclomatic 125). — 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 4.9 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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.
+ 56 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 240 down to 240 or less in Cognitive Complexity — start with smolvm_cuda::host::dispatch (cognitive 467), smolvm::agent::launcher::launch_agent_vm (cognitive 423). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 2.0 to about 2.6/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.7 / 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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 71 FunctionTooLong finding(s) in God Classes — start with main.rs (11), machines.rs (8), cuda_daemon.rs (6). — One of this dimension's main actionable groups (71 warning-level).
Resolve the 60 FileTooLong finding(s) in God Classes — start with lib.rs (3), client.rs (3), main.rs (2). — One of this dimension's main actionable groups (60 warning-level).
Resolve the 32 MethodTooLong finding(s) in God Classes — start with machine.rs (7), gpu.rs (6), manager.rs (2). — One of this dimension's main actionable groups (32 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
343 duplicated block group(s) detected. A further 11 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 354 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.
+ 90 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 38 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with lib.rs (7), extract.rs (5), machines.rs (4). — One of this dimension's main actionable groups (38 warning-level).
Resolve the 30 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with lib.rs (5), machines.rs (4), packer.rs (3). — One of this dimension's main actionable groups (30 warning-level).
Resolve the 27 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with cuda_daemon.rs (4), nsfile.rs (2), host.rs (2). — One of this dimension's main actionable groups (27 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.2 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
18 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 16 of the 18 (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: smolvm-protocol · ×4
What to do
Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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 4 Low cohesion finding(s) in Cohesion (LCOM4) — start with gpu.rs, client.rs, krun.rs. — One of this dimension's main actionable groups (4 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
2795 test methods: 2778 unit, 17 integration, 0 BDD, 0 e2e. The Rust suite contributes 2790 `#[test]` function(s) across 221 file(s) declaring at least one; its unit/integration split is Cargo's own — 9 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 5 test function(s) across 2 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
30 outdated, 0 yanked direct Cargo dependencies. 79 of 80 direct crates were graded against crates.io (0 not published there, 1 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
Outdated: anyhow · ×30
What to do
Improve Dependency Hygiene — currently 8.5/10. — 30 outdated, 0 yanked direct Cargo dependencies. 79 of 80 direct crates were graded against crates.io (0 not published there, 1 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.
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 499 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.
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.
Resolve the 52 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (3), main.rs (2), machine.rs. — One of this dimension's main actionable groups (52 warning-level).
Detailed fixes: d15_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 task-comment markers across 261504 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 88 document(s) read across 1 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
1 of 18 build units (Cargo) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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).
103 finding(s): 0 critical, 101 high, 1 medium, 1 low. 89 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 39 file(s) — `bench/bench.sh` (line 197), `crates/smolvm-cuda-shim/src/lib.rs` (line 863, lines 880–881), `crates/smolvm-network/src/tcp_relay.rs` (line 1708), `docs/branch-and-checkpoint/scripts/cleanup.sh` (lines 80–83, lines 95–96, lines 117–135), `docs/branch-and-checkpoint/scripts/preflight.sh` (line 64), … (+34 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 5 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
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
No action in Static Analysis (SAST) — all 89 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 (89 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 Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 5 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
Resolve the 3 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Resolve the 1 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 20 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (20). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-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 249 of the 267 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 6 Boundary-crossing change coupling finding(s) in Change Coupling — start with boot_config.rs (3), forkpoint.rs (3). — One of this dimension's main actionable groups (6 issue-level).
Resolve the 6 Change coupling finding(s) in Change Coupling — start with main.rs (3), boot_config.rs, client.rs. — One of this dimension's main actionable groups (6 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.
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
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 Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
0/1 workload(s) run every container under a seccomp profile; 0/1 declare an AppArmor/SELinux profile.
No seccomp profileREDACTED:11
What to do
Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored 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. SCORED, not informational.
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 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — src/agent/vnc_client.html:22
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC3 · Page structure4.9 / 10Weak✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×2) — packaging/repos/pacman-arch-index.html:2, src/agent/vnc_client.html:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
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.
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.
`RegistryClient.get_token` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — crates/smolvm-registry/src/client.rs:1405
What to do
Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
What to do
Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
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 repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 12 of 18 project(s) that lack one — worth up to 1.3 pts.
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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
docs/dev-env/README.md links to `../live-resize.md`, but `docs/live-resize.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/dev-env/README.md:50
What to do
Reconcile the README with reality: docs/dev-env/README.md links to `../live-resize.md`, but `docs/live-resize.md` does not exist.
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 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 10/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/smolvm-cuda-codegen`, `crates/smolvm-cuda-guest`.
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.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment automation exists and the service already exposes health probe endpoints (healthz/livez/readyz or a container healthcheck), but no manifest in this repository wires them into readiness/liveness probes, a rolling-update strategy, lifecycle hooks or a migration job — a bad release is harder to detect and reverse. If that wiring lives in a separate ops/Helm repository, document the pointer here so release safety is evidenced.
What to do
Wire the existing health endpoints into readiness/liveness probes and a rolling-update (or blue/green) strategy in the deployment manifests — or document where that wiring lives — so a bad release is caught and rolled back automatically.
Do you agree with this assessment?
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
`urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:24
`reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/api/handlers/exec.rs:1387
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
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 the language 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_server` 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. — src/cli/serve.rs:420
`serve_tcp_tls` 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. — src/cli/serve.rs:756
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`.
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(` (src/cli/serve.rs:541)), 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.
MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — src/agent/websocket.rs:33
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(` (src/cli/serve.rs:541).
What to do
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
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.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
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?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`info!` at line 1986 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cuda_daemon.rs:1986
`info!` at line 556 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cuda_host.rs:556
`warn!` at line 680 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/internal_boot.rs:680
`info!` at line 213 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm_exit.rs:213
`warn!` at line 215 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm_exit.rs:215
`debug!` at line 150 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:150
`debug!` at line 167 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:167
`debug!` at line 239 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:239
`debug!` at line 240 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:240
`debug!` at line 241 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:241
`debug!` at line 242 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:242
`debug!` at line 245 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:245
`warn!` at line 269 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:269
`warn!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:321
`warn!` at line 341 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:341
`warn!` at line 360 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:360
`warn!` at line 377 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:377
`debug!` at line 499 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:499
`debug!` at line 512 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:512
`debug!` at line 534 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:534
`debug!` at line 536 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:536
`debug!` at line 548 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/vm/backend/libkrun.rs:548
`debug!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/platform/macos.rs:61
`debug!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/platform/macos.rs:219
`warn!` at line 1097 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/pack.rs:1097
`warn!` at line 1113 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/pack.rs:1113
`warn!` at line 1739 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/pack.rs:1739
`warn!` at line 1755 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/pack.rs:1755
`warn!` at line 1797 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/pack.rs:1797
`warn!` at line 1105 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/cli/serve.rs:1105
`warn!` at line 1840 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:1840
`warn!` at line 1882 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:1882
`info!` at line 1888 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:1888
`warn!` at line 1929 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:1929
`warn!` at line 1993 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:1993
`error!` at line 2077 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/launcher.rs:2077
`warn!` at line 1520 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/manager.rs:1520
`debug!` at line 3747 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/agent/manager.rs:3747
`debug!` at line 133 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/smolvm-network/src/netns_tap.rs:133
`debug!` at line 144 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/smolvm-network/src/netns_tap.rs:144
Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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 — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 16 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 19 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 47 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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: 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.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the service did not build — `cargo build --locked --bin 'smolvm'` exited 1: info: syncing channel updates for stable-x86_64-unknown-linux-gnu
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/usr/local/rustup/tmp/t2t5…; runtime evidence skipped (launch chosen because 'axum' dependency in Cargo.toml, binary 'smolvm', started with its 'serve' subcommand) 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.
D10 Test Quality — ~4434 lines of test source are present (.rs, .py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — Naming consistency is measured on C# only; Python, Rust, html not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
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.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 51 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
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 — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
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 applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
X16 Unfloored truncation loop — 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
X18 Disposal-pattern 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
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Boundary-crossing change coupling: boot_config.rs ↔ machine.rs src/agent/boot_config.rs:1— `src/agent/boot_config.rs` (context agent) and `src/cli/machine.rs` (context cli) sit in DIFFERENT parts of the tree yet change together 90% of the time (9 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 9 shared commits counted here, the most recent 3 are `5e9d3584` External egress interceptor (#1405); `b310083f` feat: add --expose-socket and --mount-socket for forwarding arbitrary…; `b000644e` feat: expose the guest Docker daemon socket to the host over vsock — run `git show` on any of them.
Boundary-crossing change coupling: boot_config.rs ↔ vm_common.rs src/agent/boot_config.rs:1— `src/agent/boot_config.rs` (context agent) and `src/cli/vm_common.rs` (context cli) sit in DIFFERENT parts of the tree yet change together 80% of the time (8 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 8 shared commits counted here, the most recent 3 are `5e9d3584` External egress interceptor (#1405); `b310083f` feat: add --expose-socket and --mount-socket for forwarding arbitrary…; `b000644e` feat: expose the guest Docker daemon socket to the host over vsock — run `git show` on any of them.
Boundary-crossing change coupling: boot_config.rs ↔ smolfile.rs src/agent/boot_config.rs:1— `src/agent/boot_config.rs` (context agent) and `src/cli/smolfile.rs` (context cli) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 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 6 shared commits counted here, the most recent 3 are `b310083f` feat: add --expose-socket and --mount-socket for forwarding arbitrary…; `b000644e` feat: expose the guest Docker daemon socket to the host over vsock; `b1296355` feat(cuda): remote guest CUDA Driver-API calls to the host GPU over v… — run `git show` on any of them.
Boundary-crossing change coupling: forkpoint.rs ↔ vm_common.rs crates/smolvm-protocol/src/forkpoint.rs:1— `crates/smolvm-protocol/src/forkpoint.rs` (context crates) and `src/cli/vm_common.rs` (context cli) 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 `62d9b9e9` Keep a released clone alive when the branch helper is its main proces…; `a7eb7885` Make branching the primary machine lifecycle (#1118); `c993b1b0` Support nested machine checkpoints (#1062) — run `git show` on any of them.
Boundary-crossing change coupling: forkpoint.rs ↔ manager.rs crates/smolvm-protocol/src/forkpoint.rs:1— `crates/smolvm-protocol/src/forkpoint.rs` (context crates) and `src/agent/manager.rs` (context agent) 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 `62d9b9e9` Keep a released clone alive when the branch helper is its main proces…; `78e5250f` Park idle branchpoints until capture (#1147); `a68f0429` Harden post-training CUDA pools (#886) — run `git show` on any of them.
Boundary-crossing change coupling: forkpoint.rs ↔ launcher.rs crates/smolvm-protocol/src/forkpoint.rs:1— `crates/smolvm-protocol/src/forkpoint.rs` (context crates) and `src/agent/launcher.rs` (context agent) 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 `0fa81825` Share active branch memory and guard host capacity (#1204); `62d9b9e9` Keep a released clone alive when the branch helper is its main proces…; `78e5250f` Park idle branchpoints until capture (#1147) — run `git show` on any of them.
AX9 · CQS / query purity· Query writes persistent state on the read path · ×1
Query writes persistent state on the read path: RegistryClient.get_token crates/smolvm-registry/src/client.rs:1405— `RegistryClient.get_token` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
smolvm::agent::launcher::launch_agent_vm (cognitive 423) src/agent/launcher.rs:673— smolvm::agent::launcher::launch_agent_vm has cognitive complexity 423 (threshold 15). Drivers by points: if/else 158 (321 pts), match/switch 25 (69 pts), loops 10 (25 pts), boolean chains 8 (nesting depth added 222). 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.
smolvm::cuda_daemon::spawn_clone_worker (cognitive 201) src/cuda_daemon.rs:5348— smolvm::cuda_daemon::spawn_clone_worker has cognitive complexity 201 (threshold 15). Drivers by points: if/else 63 (108 pts), loops 17 (50 pts), match/switch 13 (35 pts), boolean chains 8 (nesting depth added 100). 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.
smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic (cognitive 174) src/agent/launcher_dynamic.rs:119— smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic has cognitive complexity 174 (threshold 15). Drivers by points: if/else 66 (114 pts), match/switch 16 (50 pts), loops 6 (7 pts), boolean chains 3 (nesting depth added 83). 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.
smolvm::portable_checkpoint::capture_with_completion (cognitive 165) src/portable_checkpoint.rs:1951— smolvm::portable_checkpoint::capture_with_completion has cognitive complexity 165 (threshold 15). Drivers by points: if/else 85 (113 pts), boolean chains 27, match/switch 13 (24 pts), loops 1 (nesting depth added 39). 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.
smolvm::cuda_daemon::reconstruct_golden_memory (cognitive 143) src/cuda_daemon.rs:2843— smolvm::cuda_daemon::reconstruct_golden_memory has cognitive complexity 143 (threshold 15). Drivers by points: if/else 36 (91 pts), loops 9 (25 pts), match/switch 6 (22 pts), boolean chains 5 (nesting depth added 87). 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.
smolvm::api::handlers::machines::create_machine_to_end (cognitive 129) src/api/handlers/machines.rs:2666— smolvm::api::handlers::machines::create_machine_to_end has cognitive complexity 129 (threshold 15). Drivers by points: if/else 68 (95 pts), match/switch 11 (16 pts), boolean chains 13, loops 4 (5 pts) (nesting depth added 33). 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.
smolvm::cuda_daemon::write_module_handoff (cognitive 118) src/cuda_daemon.rs:5061— smolvm::cuda_daemon::write_module_handoff has cognitive complexity 118 (threshold 15). Drivers by points: if/else 46 (96 pts), loops 13 (21 pts), boolean chains 1 (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.
smolvm::agent::fork::prepare_forks_reusing (cognitive 110) src/agent/fork.rs:2534— smolvm::agent::fork::prepare_forks_reusing has cognitive complexity 110 (threshold 15). Drivers by points: if/else 42 (75 pts), match/switch 8 (17 pts), boolean chains 10, loops 5 (8 pts) (nesting depth added 45). 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.
smolvm::internal_boot::run (cognitive 107) src/internal_boot.rs:78— smolvm::internal_boot::run has cognitive complexity 107 (threshold 15). Drivers by points: if/else 52 (82 pts), match/switch 9 (14 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 38). Of this number, 101 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm::cli::vm_common::start_vm_named_with_db (cognitive 96) src/cli/vm_common.rs:1696— smolvm::cli::vm_common::start_vm_named_with_db has cognitive complexity 96 (threshold 15). Drivers by points: if/else 51 (78 pts), boolean chains 8, match/switch 3 (7 pts), loops 1 (3 pts) (nesting depth added 33). 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.
smolvm::cli::vm_common::list_vms (cognitive 74) src/cli/vm_common.rs:3663— smolvm::cli::vm_common::list_vms has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 6 (20 pts), match/switch 2 (10 pts), boolean chains 1 (nesting depth added 46). 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.
smolvm::portable_checkpoint::install_with (cognitive 73) src/portable_checkpoint.rs:5925— smolvm::portable_checkpoint::install_with has cognitive complexity 73 (threshold 15). Drivers by points: if/else 20 (56 pts), loops 7 (11 pts), boolean chains 5, match/switch 1 (nesting depth added 40). 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.
smolvm::api::handlers::machines::start_machine (cognitive 68) src/api/handlers/machines.rs:3956— smolvm::api::handlers::machines::start_machine has cognitive complexity 68 (threshold 15). Drivers by points: if/else 36 (54 pts), boolean chains 9, match/switch 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm::cuda_daemon::reconstruct_golden_modules (cognitive 68) src/cuda_daemon.rs:3311— smolvm::cuda_daemon::reconstruct_golden_modules has cognitive complexity 68 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 13 (29 pts), match/switch 2 (4 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm::agent::vnc::run_client (cognitive 65) src/agent/vnc.rs:468— smolvm::agent::vnc::run_client has cognitive complexity 65 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 12, match/switch 3 (9 pts), loops 2 (3 pts) (nesting depth added 29). 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.
smolvm::portable_checkpoint::stage_disk_chains_with_links (cognitive 62) src/portable_checkpoint.rs:4839— smolvm::portable_checkpoint::stage_disk_chains_with_links has cognitive complexity 62 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 7 (22 pts), boolean chains 6, loops 2 (3 pts) (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.
smolvm::cuda_daemon::route_clone_connection (cognitive 60) src/cuda_daemon.rs:3968— smolvm::cuda_daemon::route_clone_connection has cognitive complexity 60 (threshold 15). Drivers by points: if/else 22 (47 pts), match/switch 6 (9 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
smolvm::agent::vnc::read_client_messages (cognitive 51) src/agent/vnc.rs:740— smolvm::agent::vnc::read_client_messages has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (37 pts), loops 3 (8 pts), match/switch 2 (6 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm::api::handlers::machines::restore_portable_checkpoint (cognitive 48) src/api/handlers/machines.rs:2103— smolvm::api::handlers::machines::restore_portable_checkpoint has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (36 pts), loops 2 (6 pts), boolean chains 3, match/switch 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.
smolvm::api::handlers::exec::log_event_stream (cognitive 43) src/api/handlers/exec.rs:1021— smolvm::api::handlers::exec::log_event_stream has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (2 pts) (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.
smolvm::cuda_host::start_with_clone_mode (cognitive 42) src/cuda_host.rs:53— smolvm::cuda_host::start_with_clone_mode has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 23). 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.
smolvm::cli::vm_common::fork_vm_batch (cognitive 41) src/cli/vm_common.rs:1127— smolvm::cli::vm_common::fork_vm_batch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (33 pts), loops 3 (4 pts), boolean chains 3, 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.
smolvm::api::handlers::machines::shutdown_machine_process (cognitive 36) src/api/handlers/machines.rs:2481— smolvm::api::handlers::machines::shutdown_machine_process has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm::cuda_daemon::tensor_bundle_receiver (cognitive 35) src/cuda_daemon.rs:614— smolvm::cuda_daemon::tensor_bundle_receiver has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (7 pts), loops 2 (5 pts), boolean chains 4 (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.
smolvm::agent::fork::prepare_running_disk_generation (cognitive 34) src/agent/fork.rs:1021— smolvm::agent::fork::prepare_running_disk_generation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 5 (6 pts), match/switch 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunctionTooLong: smolvm_cuda::host::dispatch crates/smolvm-cuda/src/host.rs:4714— FunctionTooLong — smolvm_cuda::host::dispatch runs 1246 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 1146 over it, 12.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::agent::launcher::launch_agent_vm src/agent/launcher.rs:673— FunctionTooLong — smolvm::agent::launcher::launch_agent_vm runs 1201 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 1101 over it, 12.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::api::handlers::machines::create_machine_to_end src/api/handlers/machines.rs:2666— FunctionTooLong — smolvm::api::handlers::machines::create_machine_to_end runs 665 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 565 over it, 6.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: smolvm::portable_checkpoint::capture_with_completion src/portable_checkpoint.rs:1951— FunctionTooLong — smolvm::portable_checkpoint::capture_with_completion runs 649 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 549 over it, 6.49× 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: smolvm_cuda::proto::encode_request crates/smolvm-cuda/src/proto.rs:976— FunctionTooLong — smolvm_cuda::proto::encode_request runs 576 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 476 over it, 5.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic src/agent/launcher_dynamic.rs:119— FunctionTooLong — smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic runs 511 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 411 over it, 5.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.
FunctionTooLong: smolvm::cuda_daemon::spawn_clone_worker src/cuda_daemon.rs:5348— FunctionTooLong — smolvm::cuda_daemon::spawn_clone_worker runs 478 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 378 over it, 4.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::internal_boot::run src/internal_boot.rs:78— FunctionTooLong — smolvm::internal_boot::run runs 362 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 262 over it, 3.62× 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: smolvm::agent::fork::prepare_forks_reusing src/agent/fork.rs:2534— FunctionTooLong — smolvm::agent::fork::prepare_forks_reusing runs 345 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 245 over it, 3.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm_cuda::proto::decode_request crates/smolvm-cuda/src/proto.rs:1674— FunctionTooLong — smolvm_cuda::proto::decode_request runs 334 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 234 over it, 3.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::api::handlers::machines::start_machine src/api/handlers/machines.rs:3956— FunctionTooLong — smolvm::api::handlers::machines::start_machine runs 331 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 231 over it, 3.31× 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: smolvm::cli::smolfile::build_create_params src/cli/smolfile.rs:98— FunctionTooLong — smolvm::cli::smolfile::build_create_params runs 313 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 213 over it, 3.13× 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: smolvm_agent::storage::pull_image_with_progress_and_auth crates/smolvm-agent/src/storage.rs:3221— FunctionTooLong — smolvm_agent::storage::pull_image_with_progress_and_auth runs 292 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 192 over it, 2.92× 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: smolvm::cuda_daemon::reconstruct_golden_memory src/cuda_daemon.rs:2843— FunctionTooLong — smolvm::cuda_daemon::reconstruct_golden_memory runs 289 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 189 over it, 2.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: smolvm_agent::handle_request crates/smolvm-agent/src/main.rs:2472— FunctionTooLong — smolvm_agent::handle_request runs 283 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 183 over it, 2.83× 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: smolvm_agent::handle_run_detached crates/smolvm-agent/src/main.rs:4294— FunctionTooLong — smolvm_agent::handle_run_detached runs 280 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 180 over it, 2.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm::cli::vm_common::start_vm_named_with_db src/cli/vm_common.rs:1696— FunctionTooLong — smolvm::cli::vm_common::start_vm_named_with_db runs 278 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 178 over it, 2.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm_pack::extract::safe_unpack_skipping crates/smolvm-pack/src/extract.rs:986— FunctionTooLong — smolvm_pack::extract::safe_unpack_skipping runs 246 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 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm_cuda::host::serve_rings crates/smolvm-cuda/src/host.rs:3394— FunctionTooLong — smolvm_cuda::host::serve_rings runs 231 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 131 over it, 2.31× 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: smolvm_network::stack::run_network_stack crates/smolvm-network/src/stack.rs:232— FunctionTooLong — smolvm_network::stack::run_network_stack runs 231 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 131 over it, 2.31× 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: smolvm::api::handlers::machines::restore_portable_checkpoint src/api/handlers/machines.rs:2103— FunctionTooLong — smolvm::api::handlers::machines::restore_portable_checkpoint runs 203 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 103 over it, 2.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.
FunctionTooLong: smolvm::cli::pack_run::daemon_start src/cli/pack_run.rs:2266— FunctionTooLong — smolvm::cli::pack_run::daemon_start runs 195 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 95 over it, 1.95× 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: smolvm::cli::pack_run::run_from_cache src/cli/pack_run.rs:1856— FunctionTooLong — smolvm::cli::pack_run::run_from_cache runs 193 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 93 over it, 1.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: smolvm_agent::setup_persistent_rootfs crates/smolvm-agent/src/main.rs:1197— FunctionTooLong — smolvm_agent::setup_persistent_rootfs runs 192 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 92 over it, 1.92× 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: smolvm::portable_checkpoint::install_with src/portable_checkpoint.rs:5925— FunctionTooLong — smolvm::portable_checkpoint::install_with 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.
FileTooLong: src/main.rs crates/smolvm-agent/src/main.rs— FileTooLong — 4956 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 128 free functions. The bar is 500 significant lines; this is 4456 over it, 9.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: handlers/machines.rs src/api/handlers/machines.rs— FileTooLong — 4573 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 109 free functions. The bar is 500 significant lines; this is 4073 over it, 9.15× 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/host.rs crates/smolvm-cuda/src/host.rs— FileTooLong — 4500 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 130 free functions. The bar is 500 significant lines; this is 4000 over it, 9.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.
FileTooLong: src/portable_checkpoint.rs src/portable_checkpoint.rs— FileTooLong — 4224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 155 free functions. The bar is 500 significant lines; this is 3724 over it, 8.45× 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/lib.rs crates/smolvm-cudart-shim/src/lib.rs— FileTooLong — 4222 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 242 free functions. The bar is 500 significant lines; this is 3722 over it, 8.44× 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: cli/machine.rs src/cli/machine.rs— FileTooLong — 4143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 35 free functions. The bar is 500 significant lines; this is 3643 over it, 8.29× 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/cuda_daemon.rs src/cuda_daemon.rs— FileTooLong — 4076 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 142 free functions. The bar is 500 significant lines; this is 3576 over it, 8.15× 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/storage.rs crates/smolvm-agent/src/storage.rs— FileTooLong — 3934 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 163 free functions. The bar is 500 significant lines; this is 3434 over it, 7.87× 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: host/gpu.rs crates/smolvm-cuda/src/host/gpu.rs— FileTooLong — 3200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: GpuBackend (5 blocks, 97-4324). The bar is 500 significant lines; this is 2700 over it, 6.40× 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/extract.rs crates/smolvm-pack/src/extract.rs— FileTooLong — 2891 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 129 free functions. The bar is 500 significant lines; this is 2391 over it, 5.78× 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/lib.rs crates/smolvm-cuda-shim/src/lib.rs— FileTooLong — 2806 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 217 free functions. The bar is 500 significant lines; this is 2306 over it, 5.61× 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: agent/fork.rs src/agent/fork.rs— FileTooLong — 2787 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 117 free functions. The bar is 500 significant lines; this is 2287 over it, 5.57× 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: cli/vm_common.rs src/cli/vm_common.rs— FileTooLong — 2424 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 72 free functions. The bar is 500 significant lines; this is 1924 over it, 4.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/process.rs src/process.rs— FileTooLong — 2249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 103 free functions. The bar is 500 significant lines; this is 1749 over it, 4.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: agent/manager.rs src/agent/manager.rs— FileTooLong — 2177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 70% of them inside a single declaration: AgentManager (3 blocks, 1069-4112), declaring 58 free functions. The bar is 500 significant lines; this is 1677 over it, 4.35× 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: agent/client.rs src/agent/client.rs— FileTooLong — 2170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 69% of them inside a single declaration: AgentClient (2 blocks, 1115-3881). The bar is 500 significant lines; this is 1670 over it, 4.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/store.rs crates/smolvm-checkpoint/src/store.rs— FileTooLong — 2100 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 73 free functions. The bar is 500 significant lines; this is 1600 over it, 4.20× 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: agent/launcher.rs src/agent/launcher.rs— FileTooLong — 1791 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 1291 over it, 3.58× 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/proto.rs crates/smolvm-cuda/src/proto.rs— FileTooLong — 1689 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 1189 over it, 3.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: cli/pack_run.rs src/cli/pack_run.rs— FileTooLong — 1656 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 38 free functions. The bar is 500 significant lines; this is 1156 over it, 3.31× 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/db.rs src/db.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), about 95% of them inside a single declaration: SmolvmDb (3 blocks, 196-2384). The bar is 500 significant lines; this is 1119 over it, 3.24× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: api/rollout.rs src/api/rollout.rs— FileTooLong — 1488 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 988 over it, 2.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: cli/pack.rs src/cli/pack.rs— FileTooLong — 1416 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 916 over it, 2.83× 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/client.rs crates/smolvm-cuda/src/client.rs— FileTooLong — 1328 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: Client (2 blocks, 209-2152). The bar is 500 significant lines; this is 828 over it, 2.66× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: api/state.rs src/api/state.rs— FileTooLong — 1207 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 707 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
smolvm::agent::launcher::launch_agent_vm (cyclomatic 190) src/agent/launcher.rs:673— smolvm::agent::launcher::launch_agent_vm has cyclomatic complexity 190 (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.
smolvm::portable_checkpoint::capture_with_completion (cyclomatic 113) src/portable_checkpoint.rs:1951— smolvm::portable_checkpoint::capture_with_completion has cyclomatic complexity 113 (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.
smolvm::cuda_daemon::spawn_clone_worker (cyclomatic 93) src/cuda_daemon.rs:5348— smolvm::cuda_daemon::spawn_clone_worker has cyclomatic complexity 93 (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.
smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic (cyclomatic 88) src/agent/launcher_dynamic.rs:119— smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic has cyclomatic complexity 88 (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.
smolvm::api::handlers::machines::create_machine_to_end (cyclomatic 85) src/api/handlers/machines.rs:2666— smolvm::api::handlers::machines::create_machine_to_end has cyclomatic complexity 85 (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.
smolvm::internal_boot::run (cyclomatic 65) src/internal_boot.rs:78— smolvm::internal_boot::run has cyclomatic complexity 65 (threshold 15). Of this number, 62 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm::agent::fork::prepare_forks_reusing (cyclomatic 62) src/agent/fork.rs:2534— smolvm::agent::fork::prepare_forks_reusing has cyclomatic complexity 62 (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.
smolvm::cuda_daemon::write_module_handoff (cyclomatic 61) src/cuda_daemon.rs:5061— smolvm::cuda_daemon::write_module_handoff has cyclomatic complexity 61 (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.
smolvm::cli::vm_common::start_vm_named_with_db (cyclomatic 60) src/cli/vm_common.rs:1696— smolvm::cli::vm_common::start_vm_named_with_db has cyclomatic complexity 60 (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.
smolvm::cuda_daemon::reconstruct_golden_memory (cyclomatic 54) src/cuda_daemon.rs:2843— smolvm::cuda_daemon::reconstruct_golden_memory has cyclomatic complexity 54 (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.
smolvm::api::handlers::machines::start_machine (cyclomatic 48) src/api/handlers/machines.rs:3956— smolvm::api::handlers::machines::start_machine has cyclomatic complexity 48 (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.
smolvm::agent::vnc::run_client (cyclomatic 36) src/agent/vnc.rs:468— smolvm::agent::vnc::run_client has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm::portable_checkpoint::install_with (cyclomatic 33) src/portable_checkpoint.rs:5925— smolvm::portable_checkpoint::install_with 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.
smolvm::cuda_daemon::reconstruct_golden_modules (cyclomatic 32) src/cuda_daemon.rs:3311— smolvm::cuda_daemon::reconstruct_golden_modules 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.
smolvm::cuda_daemon::route_clone_connection (cyclomatic 31) src/cuda_daemon.rs:3968— smolvm::cuda_daemon::route_clone_connection has cyclomatic complexity 31 (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.
smolvm::portable_checkpoint::stage_disk_chains_with_links (cyclomatic 29) src/portable_checkpoint.rs:4839— smolvm::portable_checkpoint::stage_disk_chains_with_links 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.
smolvm::api::handlers::machines::restore_portable_checkpoint (cyclomatic 28) src/api/handlers/machines.rs:2103— smolvm::api::handlers::machines::restore_portable_checkpoint 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.
smolvm::cli::vm_common::fork_vm_batch (cyclomatic 27) src/cli/vm_common.rs:1127— smolvm::cli::vm_common::fork_vm_batch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm::portable_checkpoint::validate_compatibility (cyclomatic 27) src/portable_checkpoint.rs:5216— smolvm::portable_checkpoint::validate_compatibility has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm::api::rollout::validate_generate_request (cyclomatic 26) src/api/rollout.rs:1873— smolvm::api::rollout::validate_generate_request has cyclomatic complexity 26 (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.
smolvm::cli::vm_common::list_vms (cyclomatic 26) src/cli/vm_common.rs:3663— smolvm::cli::vm_common::list_vms has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm::cuda_host::proxy_to_daemon (cyclomatic 26) src/cuda_host.rs:322— smolvm::cuda_host::proxy_to_daemon has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 2 function items inside it that branch (guest_ram_advert, guest_ram_procmem_advert). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
smolvm::agent::vnc::read_client_messages (cyclomatic 24) src/agent/vnc.rs:740— smolvm::agent::vnc::read_client_messages 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.
smolvm::api::handlers::machines::resize_machine (cyclomatic 24) src/api/handlers/machines.rs:6616— smolvm::api::handlers::machines::resize_machine has cyclomatic complexity 24 (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.
smolvm::cli::smolfile::build_create_params (cyclomatic 24) src/cli/smolfile.rs:98— smolvm::cli::smolfile::build_create_params has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
Hotspot: src/cli/machine.rs src/cli/machine.rs:1384— src/cli/machine.rs changed 138 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 125 in RunCmd::run at line 1384. 8 of those changes were fix/bug commits, and the other 130 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/machine.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: src/agent/launcher.rs src/agent/launcher.rs:673— src/agent/launcher.rs changed 65 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 190 in smolvm::agent::launcher::launch_agent_vm at line 673. 1 of those changes was a fix/bug commit, and the other 64 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/agent/launcher.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: src/api/handlers/machines.rs src/api/handlers/machines.rs:2666— src/api/handlers/machines.rs changed 131 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 85 in smolvm::api::handlers::machines::create_machine_to_end at line 2666. 7 of those changes were fix/bug commits, and the other 124 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/api/handlers/machines.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: src/portable_checkpoint.rs src/portable_checkpoint.rs:1951— src/portable_checkpoint.rs changed 82 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in smolvm::portable_checkpoint::capture_with_completion at line 1951. 2 of those changes were fix/bug commits, and the other 80 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/portable_checkpoint.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: src/agent/manager.rs src/agent/manager.rs:2509— src/agent/manager.rs changed 69 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in AgentManager::start_via_subprocess at line 2509. 3 of those changes were fix/bug commits, and the other 66 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/agent/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.
Hotspot: src/cli/vm_common.rs src/cli/vm_common.rs:1696— src/cli/vm_common.rs changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in smolvm::cli::vm_common::start_vm_named_with_db at line 1696. 4 of those changes were fix/bug commits, and the other 88 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/vm_common.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: src/agent/fork.rs src/agent/fork.rs:2534— src/agent/fork.rs changed 83 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in smolvm::agent::fork::prepare_forks_reusing at line 2534. 5 of those changes were fix/bug commits, and the other 78 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/agent/fork.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: crates/smolvm-agent/src/main.rs crates/smolvm-agent/src/main.rs:2472— crates/smolvm-agent/src/main.rs changed 82 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in smolvm_agent::handle_request at line 2472. 3 of those changes were fix/bug commits, and the other 79 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-agent/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: src/agent/launcher_dynamic.rs src/agent/launcher_dynamic.rs:119— src/agent/launcher_dynamic.rs changed 48 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in smolvm::agent::launcher_dynamic::launch_agent_vm_dynamic at line 119. 2 of those changes were fix/bug commits, and the other 46 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/agent/launcher_dynamic.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: crates/smolvm-cuda/src/host.rs crates/smolvm-cuda/src/host.rs:4714— crates/smolvm-cuda/src/host.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 292 in smolvm_cuda::host::dispatch at line 4714. 1 of those changes was a fix/bug commit, 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-cuda/src/host.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: crates/smolvm-pack/src/extract.rs crates/smolvm-pack/src/extract.rs:986— crates/smolvm-pack/src/extract.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in smolvm_pack::extract::safe_unpack_skipping at line 986. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-pack/src/extract.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: src/internal_boot.rs src/internal_boot.rs:78— src/internal_boot.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in smolvm::internal_boot::run at line 78. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/internal_boot.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: src/config.rs src/config.rs:1487— src/config.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in VmRecord::updated_egress at line 1487. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- 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: crates/smolvm-agent/src/storage.rs crates/smolvm-agent/src/storage.rs:3221— crates/smolvm-agent/src/storage.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in smolvm_agent::storage::pull_image_with_progress_and_auth at line 3221. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-agent/src/storage.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: crates/smolvm-protocol/src/lib.rs crates/smolvm-protocol/src/lib.rs:1180— crates/smolvm-protocol/src/lib.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in AgentRequest::log_summary at line 1180. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-protocol/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.
Hotspot: src/cuda_daemon.rs src/cuda_daemon.rs:5348— src/cuda_daemon.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in smolvm::cuda_daemon::spawn_clone_worker at line 5348. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cuda_daemon.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: src/agent/client.rs src/agent/client.rs:2452— src/agent/client.rs changed 49 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in AgentClient::interactive_session at line 2452. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/agent/client.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: src/cli/pack.rs src/cli/pack.rs:683— src/cli/pack.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in PackCreateCmd::run at line 683. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/pack.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: src/cli/pack_run.rs src/cli/pack_run.rs:472— src/cli/pack_run.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in PackRunCmd::run at line 472. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/pack_run.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: src/cli/serve.rs src/cli/serve.rs:420— src/cli/serve.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ServeStartCmd::run_server at line 420. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/serve.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: src/cli/smolfile.rs src/cli/smolfile.rs:98— src/cli/smolfile.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in smolvm::cli::smolfile::build_create_params 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/cli/smolfile.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: crates/smolvm-network/src/tcp_relay.rs crates/smolvm-network/src/tcp_relay.rs:1252— crates/smolvm-network/src/tcp_relay.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in smolvm_network::tcp_relay::relay_stream at line 1252. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-network/src/tcp_relay.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: crates/smolvm-network/src/stack.rs crates/smolvm-network/src/stack.rs:232— crates/smolvm-network/src/stack.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in smolvm_network::stack::run_network_stack at line 232. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-network/src/stack.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: src/pack_export.rs src/pack_export.rs:758— src/pack_export.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in smolvm::pack_export::reap_stale_export_scratch_in at line 758. 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- src/pack_export.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: crates/smolvm-cuda/src/proto.rs crates/smolvm-cuda/src/proto.rs:976— crates/smolvm-cuda/src/proto.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 115 in smolvm_cuda::proto::encode_request 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-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 04:17:50 -07:00' --until='2026-10-27 04:17:50 -07:00' --full-history --no-merges -- crates/smolvm-cuda/src/proto.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.
Duplicated block (6 lines × 2) crates/smolvm-agent/src/storage.rs:3390— crates/smolvm-agent/src/storage.rs:3390-3395 | crates/smolvm-agent/src/storage.rs:3471-3476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-agent/src/storage.rs:3618— crates/smolvm-agent/src/storage.rs:3618-3623 | crates/smolvm-agent/src/storage.rs:3748-3753 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:119— crates/smolvm-cuda-shim/src/lib.rs:119-124 | crates/smolvm-cudart-shim/src/lib.rs:89-94 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:131— crates/smolvm-cuda-shim/src/lib.rs:131-136 | crates/smolvm-cudart-shim/src/lib.rs:100-105 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:156— crates/smolvm-cuda-shim/src/lib.rs:156-161 | crates/smolvm-cudart-shim/src/lib.rs:122-127 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:2383— crates/smolvm-cuda-shim/src/lib.rs:2383-2388 | crates/smolvm-cuda-shim/src/lib.rs:2523-2528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:4133— crates/smolvm-cuda-shim/src/lib.rs:4133-4138 | crates/smolvm-cuda-shim/src/lib.rs:4157-4162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:2929— crates/smolvm-cuda/src/host/gpu.rs:2929-2934 | crates/smolvm-cuda/src/host/gpu.rs:2952-2961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:3638— crates/smolvm-cudart-shim/src/lib.rs:3638-3643 | crates/smolvm-cudart-shim/src/lib.rs:3705-3710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:5972— crates/smolvm-cudart-shim/src/lib.rs:5972-5977 | crates/smolvm-cudart-shim/src/lib.rs:6051-6056 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-network/src/dns_relay.rs:366— crates/smolvm-network/src/dns_relay.rs:366-372 | src/dns_filter.rs:99-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/smolvm-pack/src/assets.rs:260— crates/smolvm-pack/src/assets.rs:260-265 | src/checkpoint_delta.rs:331-336 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) crates/smolvm-pack/src/extract.rs:3786— crates/smolvm-pack/src/extract.rs:3786-3791 | crates/smolvm-pack/src/extract.rs:3802-3807 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-pack/src/extract.rs:5255— crates/smolvm-pack/src/extract.rs:5255-5260 | crates/smolvm-pack/src/extract.rs:5271-5276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) crates/smolvm-pack/src/extract.rs:5535— crates/smolvm-pack/src/extract.rs:5535-5540 | crates/smolvm-pack/src/extract.rs:5604-5611 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/agent/launcher.rs:2495— src/agent/launcher.rs:2495-2500 | src/agent/launcher_dynamic.rs:876-881 — before extracting anything, compare `src/agent/launcher.rs` and `src/agent/launcher_dynamic.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 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 (6 lines × 2) src/agent/launcher_dynamic.rs:99— src/agent/launcher_dynamic.rs:99-104 | src/data/disk.rs:491-496 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/agent/terminal.rs:202— src/agent/terminal.rs:202-207 | src/agent/terminal.rs:217-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/api/handlers/machines.rs:4026— src/api/handlers/machines.rs:4026-4031 | src/api/handlers/machines.rs:5837-5842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/api/handlers/machines.rs:4382— src/api/handlers/machines.rs:4382-4387 | src/api/state.rs:1873-1878 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/api/handlers/machines.rs:5813— src/api/handlers/machines.rs:5813-5823 | src/api/handlers/machines.rs:5998-6003 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/cli/serve.rs:740— src/cli/serve.rs:740-745 | src/cli/serve.rs:879-884 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/cli/vm_common.rs:844— src/cli/vm_common.rs:844-849 | src/cli/vm_common.rs:2203-2208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/cuda_daemon.rs:4652— src/cuda_daemon.rs:4652-4657 | src/cuda_daemon.rs:4721-4726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) src/portable_checkpoint.rs:5158— src/portable_checkpoint.rs:5158-5163 | src/portable_checkpoint.rs:5441-5446 — 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.
smolvm_agent::run_interactive_loop (cognitive 110) crates/smolvm-agent/src/main.rs:6033— smolvm_agent::run_interactive_loop has cognitive complexity 110 (threshold 15). Drivers by points: if/else 33 (75 pts), match/switch 6 (22 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 64). 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.
smolvm_agent::run_interactive_loop_pty (cognitive 77) crates/smolvm-agent/src/main.rs:6339— smolvm_agent::run_interactive_loop_pty has cognitive complexity 77 (threshold 15). Drivers by points: if/else 20 (47 pts), match/switch 6 (19 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 44). 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.
smolvm_agent::storage::pull_image_with_progress_and_auth (cognitive 63) crates/smolvm-agent/src/storage.rs:3221— smolvm_agent::storage::pull_image_with_progress_and_auth has cognitive complexity 63 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 7 (14 pts), match/switch 4 (10 pts), boolean chains 3 (nesting depth added 29). 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.
smolvm_agent::handle_connection (cognitive 62) crates/smolvm-agent/src/main.rs:2138— smolvm_agent::handle_connection has cognitive complexity 62 (threshold 15). Drivers by points: if/else 26 (54 pts), match/switch 3 (7 pts), loops 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::setup_persistent_rootfs (cognitive 37) crates/smolvm-agent/src/main.rs:1197— smolvm_agent::setup_persistent_rootfs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::process::wait_with_timeout_cleanup_and_liveness (cognitive 37) crates/smolvm-agent/src/process.rs:359— smolvm_agent::process::wait_with_timeout_cleanup_and_liveness has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (26 pts), match/switch 3 (6 pts), loops 5 (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.
smolvm_agent::handle_run_detached (cognitive 36) crates/smolvm-agent/src/main.rs:4294— smolvm_agent::handle_run_detached has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 11 (16 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.
smolvm_agent::handle_vm_exec (cognitive 34) crates/smolvm-agent/src/main.rs:8090— smolvm_agent::handle_vm_exec has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 3 (6 pts), loops 2, 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.
smolvm_agent::storage::garbage_collect (cognitive 34) crates/smolvm-agent/src/storage.rs:3930— smolvm_agent::storage::garbage_collect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (9 pts) (nesting depth added 23). 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.
smolvm_agent::storage::oci_archive_compatibility (cognitive 31) crates/smolvm-agent/src/storage.rs:1997— smolvm_agent::storage::oci_archive_compatibility has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::main (cognitive 30) crates/smolvm-agent/src/main.rs:300— smolvm_agent::main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 3, match/switch 2 (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.
smolvm_agent::storage::setup_volume_mounts (cognitive 30) crates/smolvm-agent/src/storage.rs:5264— smolvm_agent::storage::setup_volume_mounts has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::spawn_exec_in_container (cognitive 29) crates/smolvm-agent/src/main.rs:5169— smolvm_agent::spawn_exec_in_container has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 3 (8 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.
smolvm_agent::cuda::find_rpath_pinned_libs (cognitive 27) crates/smolvm-agent/src/cuda.rs:249— smolvm_agent::cuda::find_rpath_pinned_libs has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 5, match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::publish_socket::relay (cognitive 27) crates/smolvm-agent/src/publish_socket.rs:319— smolvm_agent::publish_socket::relay has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, 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.
smolvm_agent::relay::relay_half_close (cognitive 27) crates/smolvm-agent/src/relay.rs:17— smolvm_agent::relay::relay_half_close has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, 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.
smolvm_agent::spawn_crun_run (cognitive 25) crates/smolvm-agent/src/main.rs:5794— smolvm_agent::spawn_crun_run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::forkpoint::run_helper_at (cognitive 24) crates/smolvm-agent/src/forkpoint.rs:296— smolvm_agent::forkpoint::run_helper_at has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (5 pts), match/switch 1 (4 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.
smolvm_agent::pod::handle_pod_signal (cognitive 24) crates/smolvm-agent/src/pod.rs:564— smolvm_agent::pod::handle_pod_signal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 4 (6 pts), loops 1 (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.
smolvm_agent::handle_request (cognitive 23) crates/smolvm-agent/src/main.rs:2472— smolvm_agent::handle_request has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (16 pts), if/else 5 (7 pts) (nesting depth added 9). 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.
smolvm_agent::storage::mount_cache_disk (cognitive 23) crates/smolvm-agent/src/storage.rs:939— smolvm_agent::storage::mount_cache_disk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::setup_gpu_dev_nodes (cognitive 21) crates/smolvm-agent/src/main.rs:962— smolvm_agent::setup_gpu_dev_nodes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_agent::pod::write_pod_bundle (cognitive 21) crates/smolvm-agent/src/pod.rs:886— smolvm_agent::pod::write_pod_bundle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (6 pts), match/switch 1 (2 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.
smolvm_agent::storage::init_volume_mounts (cognitive 21) crates/smolvm-agent/src/storage.rs:565— smolvm_agent::storage::init_volume_mounts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (5 pts), loops 2, boolean chains 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.
smolvm_agent::handle_streaming_file_read (cognitive 19) crates/smolvm-agent/src/main.rs:3732— smolvm_agent::handle_streaming_file_read has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 5 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MethodTooLong: RunCmd.run src/cli/machine.rs:1384— MethodTooLong — run runs 774 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 674 over it, 7.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: CreateCmd.run_from_smolmachine src/cli/machine.rs:5067— MethodTooLong — run_from_smolmachine runs 467 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 367 over it, 4.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: AgentManager.start_via_subprocess src/agent/manager.rs:2509— MethodTooLong — start_via_subprocess runs 410 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 310 over it, 4.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.
MethodTooLong: GpuBackend.cuda_driver_library_call crates/smolvm-cuda/src/host/gpu.rs:745— MethodTooLong — cuda_driver_library_call runs 296 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 196 over it, 2.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PackRunCmd.run src/cli/pack_run.rs:472— MethodTooLong — run runs 291 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 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: S3Fs.dispatch crates/smolvm-s3fs/src/fs.rs:710— MethodTooLong — dispatch runs 277 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 177 over it, 2.77× 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: PackCreateCmd.run src/cli/pack.rs:683— MethodTooLong — run runs 244 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 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: UpdateCmd.run src/cli/machine.rs:7127— MethodTooLong — run runs 239 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 139 over it, 2.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.
MethodTooLong: CudnnBn.dispatch crates/smolvm-cuda/src/host/gpu.rs:3566— MethodTooLong — dispatch runs 214 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 114 over it, 2.14× 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: SmolvmDb.claim_fork_pool_slot src/db.rs:1545— MethodTooLong — claim_fork_pool_slot runs 195 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 95 over it, 1.95× 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: MonitorCmd.run src/cli/machine.rs:8052— MethodTooLong — run runs 194 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 94 over it, 1.94× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: LibkrunVm.exec_vm src/vm/backend/libkrun.rs:101— MethodTooLong — exec_vm runs 192 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 92 over it, 1.92× 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: State.forward crates/smolvm-credentials/src/intercept.rs:381— MethodTooLong — forward runs 186 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 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ServeStartCmd.run_server src/cli/serve.rs:420— MethodTooLong — run_server runs 180 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 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PoolAdmissionState.observe src/api/admission.rs:251— MethodTooLong — observe 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: GpuBackend.load crates/smolvm-cuda/src/host/gpu.rs:554— MethodTooLong — load runs 172 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 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CublasLt.dispatch crates/smolvm-cuda/src/host/gpu.rs:3089— MethodTooLong — dispatch runs 157 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 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: GpuBackend.graph_exec_patch crates/smolvm-cuda/src/host/gpu.rs:2133— MethodTooLong — graph_exec_patch runs 155 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 55 over it, 1.55× 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: NvmlSampler.new src/api/admission.rs:1034— MethodTooLong — new runs 149 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 49 over it, 1.49× 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: CreateCmd.run src/cli/machine.rs:4849— MethodTooLong — run runs 148 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 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExecCmd.run src/cli/machine.rs:4146— MethodTooLong — run runs 138 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 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RolloutExecutor.publish_device_policy src/api/rollout.rs:1102— MethodTooLong — publish_device_policy 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: ForkPoolController.fill_pool src/api/pool_controller.rs:541— MethodTooLong — fill_pool runs 123 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 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AgentManager.wait_for_ready src/agent/manager.rs:3792— MethodTooLong — wait_for_ready runs 122 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 22 over it, 1.22× 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: GpuBackend.gen_lib_call crates/smolvm-cuda/src/host/gpu.rs:4169— MethodTooLong — gen_lib_call 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.
Duplicated block (8 lines × 2) crates/smolvm-agent/src/main.rs:6316— crates/smolvm-agent/src/main.rs:6316-6323 | crates/smolvm-agent/src/main.rs:6574-6581 — 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) crates/smolvm-cuda-shim/src/lib.rs:94— crates/smolvm-cuda-shim/src/lib.rs:94-101 | crates/smolvm-cudart-shim/src/lib.rs:1289-1296 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:638— crates/smolvm-cuda-shim/src/lib.rs:638-645 | crates/smolvm-cuda-shim/src/lib.rs:648-655 — 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) crates/smolvm-cuda-shim/src/lib.rs:1803— crates/smolvm-cuda-shim/src/lib.rs:1803-1810 | crates/smolvm-cuda-shim/src/lib.rs:4140-4147 — 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) crates/smolvm-cuda-shim/src/lib.rs:2105— crates/smolvm-cuda-shim/src/lib.rs:2105-2112 | crates/smolvm-cuda-shim/src/lib.rs:2121-2128 — 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) crates/smolvm-cuda/src/client.rs:607— crates/smolvm-cuda/src/client.rs:607-614 | crates/smolvm-cuda/src/client.rs:882-889 — 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) crates/smolvm-cuda/src/host/gpu.rs:2153— crates/smolvm-cuda/src/host/gpu.rs:2153-2160 | crates/smolvm-cuda/src/host/gpu.rs:2401-2408 — 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) crates/smolvm-cudart-shim/src/lib.rs:2170— crates/smolvm-cudart-shim/src/lib.rs:2170-2177 | crates/smolvm-cudart-shim/src/lib.rs:2248-2255 — 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) crates/smolvm-pack/src/packer.rs:869— crates/smolvm-pack/src/packer.rs:869-876 | crates/smolvm-pack/src/packer.rs:915-922 — 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) crates/smolvm-pack/src/packer.rs:993— crates/smolvm-pack/src/packer.rs:993-1000 | crates/smolvm-pack/src/packer.rs:1025-1032 — 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) src/agent/launcher.rs:2666— src/agent/launcher.rs:2666-2673 | src/agent/launcher_dynamic.rs:1284-1291 — before extracting anything, compare `src/agent/launcher.rs` and `src/agent/launcher_dynamic.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 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 (8 lines × 2) src/api/handlers/machines.rs:2998— src/api/handlers/machines.rs:2998-3005 | src/cli/machine.rs:5372-5379 — 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) src/api/handlers/machines.rs:4143— src/api/handlers/machines.rs:4143-4150 | src/api/handlers/machines.rs:4160-4167 — 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) src/api/handlers/machines.rs:6628— src/api/handlers/machines.rs:6628-6635 | src/api/handlers/machines.rs:7299-7306 — 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) src/cli/pack_run.rs:1900— src/cli/pack_run.rs:1900-1907 | src/cli/pack_run.rs:2330-2337 — 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) src/cuda_daemon.rs:3449— src/cuda_daemon.rs:3449-3456 | src/cuda_daemon.rs:3506-3513 — 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) src/cuda_host.rs:410— src/cuda_host.rs:410-417 | src/cuda_host.rs:441-448 — 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) src/portable_checkpoint.rs:4255— src/portable_checkpoint.rs:4255-4262 | src/portable_checkpoint.rs:4849-4856 — 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) src/portable_checkpoint.rs:5149— src/portable_checkpoint.rs:5149-5156 | src/portable_checkpoint.rs:5178-5185 — 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) crates/smolvm-cuda/src/host/gpu.rs:2842— crates/smolvm-cuda/src/host/gpu.rs:2842-2849 | crates/smolvm-cudart-shim/src/lib.rs:5284-5291 — 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) src/api/cache_base_budget.rs:41— src/api/cache_base_budget.rs:41-48 | src/checkpoint_retention.rs:454-461 — 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) crates/smolvm-pack/src/packer.rs:846— crates/smolvm-pack/src/packer.rs:846-853 | crates/smolvm-pack/src/packer.rs:890-897 — 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) src/disk_utils.rs:563— src/disk_utils.rs:563-570 | src/disk_utils.rs:582-589 — 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) crates/smolvm-agent/src/storage.rs:196— crates/smolvm-agent/src/storage.rs:196-203 | crates/smolvm-agent/src/storage.rs:255-262 — 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) crates/smolvm-agent/src/storage.rs:4299— crates/smolvm-agent/src/storage.rs:4299-4306 | crates/smolvm-agent/src/storage.rs:4371-4378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-agent/src/live_resources.rs:282— crates/smolvm-agent/src/live_resources.rs:282-286 | crates/smolvm-agent/src/live_resources.rs:354-358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-agent/src/nsfile.rs:260— crates/smolvm-agent/src/nsfile.rs:260-264 | crates/smolvm-agent/src/nsfile.rs:506-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-cuda/src/host.rs:3445— crates/smolvm-cuda/src/host.rs:3445-3449 | crates/smolvm-cuda/src/host.rs:3462-3466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-cuda/src/proto.rs:957— crates/smolvm-cuda/src/proto.rs:957-961 | crates/smolvm-network/src/fabric.rs:140-144 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/smolvm-pack/src/assets.rs:323— crates/smolvm-pack/src/assets.rs:323-327 | crates/smolvm-pack/src/assets.rs:833-838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/agent/fork.rs:1511— src/agent/fork.rs:1511-1515 | src/agent/fork.rs:2131-2135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/agent/krun.rs:548— src/agent/krun.rs:548-553 | src/agent/krun.rs:588-592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/api/pool_controller.rs:275— src/api/pool_controller.rs:275-279 | src/api/pool_controller.rs:281-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.
Duplicated block (5 lines × 2) src/cli/machine.rs:1750— src/cli/machine.rs:1750-1754 | src/cli/machine.rs:2224-2228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cli/machine.rs:4249— src/cli/machine.rs:4249-4253 | src/cli/machine.rs:4263-4267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cuda_daemon.rs:5290— src/cuda_daemon.rs:5290-5294 | src/cuda_daemon.rs:5317-5321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cuda_daemon.rs:5789— src/cuda_daemon.rs:5789-5793 | src/cuda_daemon.rs:5816-5820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/portable_checkpoint.rs:5472— src/portable_checkpoint.rs:5472-5476 | src/portable_checkpoint.rs:5525-5529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-cuda/src/host.rs:6554— crates/smolvm-cuda/src/host.rs:6554-6558 | crates/smolvm-cuda/src/host/gpu.rs:1669-1673 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/cli/serve_tls.rs:80— src/cli/serve_tls.rs:80-84 | src/embedded/bundle.rs:57-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/cuda_daemon.rs:3017— src/cuda_daemon.rs:3017-3024 | src/cuda_daemon.rs:3163-3167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cuda_daemon.rs:2991— src/cuda_daemon.rs:2991-2997 | src/cuda_daemon.rs:3141-3145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cli/pack_run.rs:705— src/cli/pack_run.rs:705-709 | src/cli/pack_run.rs:2384-2389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/embedded/runtime.rs:1227— src/embedded/runtime.rs:1227-1231 | src/embedded/runtime.rs:1240-1244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/api/rollout.rs:1089— src/api/rollout.rs:1089-1093 | src/api/rollout.rs:1261-1265 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) src/cli/pack.rs:993— src/cli/pack.rs:993-997 | src/pack_export.rs:1490-1494 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) src/cli/pack.rs:677— src/cli/pack.rs:677-681 | src/portable_checkpoint.rs:1563-1567 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) crates/smolvm-agent/src/nsfile.rs:695— crates/smolvm-agent/src/nsfile.rs:695-699 | crates/smolvm-agent/src/nsfile.rs:714-718 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-agent/src/storage.rs:822— crates/smolvm-agent/src/storage.rs:822-826 | crates/smolvm-agent/src/storage.rs:910-914 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:3238— crates/smolvm-cuda/src/host/gpu.rs:3238-3242 | crates/smolvm-cuda/src/host/gpu.rs:3243-3247 — 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) crates/smolvm-agent/src/main.rs:5739— crates/smolvm-agent/src/main.rs:5739-5747 | crates/smolvm-agent/src/main.rs:5910-5918 — 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) crates/smolvm-agent/src/main.rs:6272— crates/smolvm-agent/src/main.rs:6272-6280 | crates/smolvm-agent/src/main.rs:6515-6523 — 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) crates/smolvm-agent/src/oci.rs:407— crates/smolvm-agent/src/oci.rs:407-415 | crates/smolvm-agent/src/oci.rs:435-443 — 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) crates/smolvm-cuda/src/host.rs:2921— crates/smolvm-cuda/src/host.rs:2921-2929 | crates/smolvm-cuda/src/host.rs:2951-2959 — 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) crates/smolvm-cuda/src/proto.rs:1260— crates/smolvm-cuda/src/proto.rs:1260-1268 | crates/smolvm-cuda/src/proto.rs:1283-1291 — 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) crates/smolvm-cudart-shim/src/lib.rs:4811— crates/smolvm-cudart-shim/src/lib.rs:4811-4819 | crates/smolvm-cudart-shim/src/lib.rs:4826-4834 — 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) crates/smolvm-registry/src/client.rs:301— crates/smolvm-registry/src/client.rs:301-309 | crates/smolvm-registry/src/client.rs:837-847 — 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) crates/smolvm-registry/src/client.rs:299— crates/smolvm-registry/src/client.rs:299-307 | crates/smolvm-registry/src/client.rs:1090-1098 — 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) src/api/handlers/files.rs:131— src/api/handlers/files.rs:131-139 | src/api/handlers/files.rs:281-289 — 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) src/api/handlers/machines.rs:155— src/api/handlers/machines.rs:155-163 | src/api/state.rs:2171-2179 — 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) src/api/handlers/pools.rs:1194— src/api/handlers/pools.rs:1194-1202 | src/api/pool_controller.rs:519-527 — 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) src/cli/machine.rs:1642— src/cli/machine.rs:1642-1650 | src/cli/machine.rs:1804-1812 — 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) src/cli/pack.rs:792— src/cli/pack.rs:792-800 | src/cli/pack.rs:811-819 — 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) src/cli/pack.rs:998— src/cli/pack.rs:998-1006 | src/pack_export.rs:1495-1503 — 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) src/cli/pack.rs:1893— src/cli/pack.rs:1893-1901 | src/cli/pack.rs:2143-2151 — 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) src/cli/pack.rs:2236— src/cli/pack.rs:2236-2244 | src/cli/pack_run.rs:2113-2121 — 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) src/cli/pack_run.rs:596— src/cli/pack_run.rs:596-604 | src/cli/pack_run.rs:1866-1874 — 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) src/cli/vm_common.rs:835— src/cli/vm_common.rs:835-843 | src/cli/vm_common.rs:2209-2217 — 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) src/cuda_daemon.rs:2318— src/cuda_daemon.rs:2318-2326 | src/cuda_daemon.rs:2527-2535 — 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) src/cuda_daemon.rs:2741— src/cuda_daemon.rs:2741-2749 | src/cuda_daemon.rs:5530-5538 — 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) src/cuda_daemon.rs:5739— src/cuda_daemon.rs:5739-5747 | src/cuda_daemon.rs:5764-5772 — 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) src/staged_mount.rs:93— src/staged_mount.rs:93-101 | src/staged_mount.rs:132-140 — 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) src/agent/video.rs:599— src/agent/video.rs:599-607 | src/process.rs:1330-1340 — 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) crates/smolvm-agent/src/oci.rs:1399— crates/smolvm-agent/src/oci.rs:1399-1407 | crates/smolvm-agent/src/oci.rs:1411-1419 — 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) src/agent/fork.rs:900— src/agent/fork.rs:900-908 | src/agent/fork.rs:2118-2126 — 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) crates/smolvm-agent/src/forkpoint.rs:255— crates/smolvm-agent/src/forkpoint.rs:255-264 | src/agent/fork.rs:3901-3910 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) crates/smolvm-agent/src/forkpoint.rs:480— crates/smolvm-agent/src/forkpoint.rs:480-489 | crates/smolvm-agent/src/forkpoint.rs:536-545 — 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) crates/smolvm-agent/src/main.rs:3891— crates/smolvm-agent/src/main.rs:3891-3900 | crates/smolvm-agent/src/main.rs:7697-7706 — 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) crates/smolvm-cuda-guest/src/main.rs:196— crates/smolvm-cuda-guest/src/main.rs:196-205 | crates/smolvm-cuda-guest/src/main.rs:264-273 — 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) crates/smolvm-cuda/src/host.rs:4052— crates/smolvm-cuda/src/host.rs:4052-4061 | crates/smolvm-cuda/src/host.rs:4578-4587 — 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) crates/smolvm-cudart-shim/src/lib.rs:2158— crates/smolvm-cudart-shim/src/lib.rs:2158-2167 | crates/smolvm-cudart-shim/src/lib.rs:2236-2245 — 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) crates/smolvm-cudart-shim/src/lib.rs:4843— crates/smolvm-cudart-shim/src/lib.rs:4843-4852 | crates/smolvm-cudart-shim/src/lib.rs:4856-4865 — 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) crates/smolvm-cudart-shim/src/lib.rs:6148— crates/smolvm-cudart-shim/src/lib.rs:6148-6157 | crates/smolvm-cudart-shim/src/lib.rs:6179-6188 — 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) crates/smolvm-pack/src/assets.rs:555— crates/smolvm-pack/src/assets.rs:555-564 | crates/smolvm-pack/src/assets.rs:1698-1707 — 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) crates/smolvm-pack/src/assets.rs:1751— crates/smolvm-pack/src/assets.rs:1751-1760 | crates/smolvm-pack/src/assets.rs:1767-1776 — 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) crates/smolvm-pack/src/format.rs:150— crates/smolvm-pack/src/format.rs:150-159 | crates/smolvm-pack/src/format.rs:289-298 — 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) src/agent/fork.rs:61— src/agent/fork.rs:61-70 | src/agent/fork.rs:77-86 — 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) src/agent/fork.rs:1232— src/agent/fork.rs:1232-1241 | src/agent/fork/compact.rs:172-183 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/api/handlers/exec.rs:210— src/api/handlers/exec.rs:210-219 | src/api/handlers/exec.rs:541-550 — 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) src/api/handlers/pools.rs:352— src/api/handlers/pools.rs:352-361 | src/api/handlers/pools.rs:379-388 — 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) src/cli/machine.rs:1917— src/cli/machine.rs:1917-1926 | src/cli/machine.rs:4998-5007 — 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) src/cli/machine.rs:5005— src/cli/machine.rs:5005-5014 | src/cli/machine.rs:5496-5505 — 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) src/cli/pack_run.rs:1369— src/cli/pack_run.rs:1369-1378 | src/cli/pack_run.rs:1403-1412 — 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) crates/smolvm-cuda/src/client.rs:268— crates/smolvm-cuda/src/client.rs:268-277 | crates/smolvm-cuda/src/host.rs:3939-3952 — 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) src/api/handlers/mod.rs:160— src/api/handlers/mod.rs:160-173 | src/api/handlers/mod.rs:195-204 — 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) crates/smolvm-agent/src/main.rs:6089— crates/smolvm-agent/src/main.rs:6089-6100 | crates/smolvm-agent/src/main.rs:6389-6398 — 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) crates/smolvm-agent/src/main.rs:2666— crates/smolvm-agent/src/main.rs:2666-2675 | crates/smolvm-agent/src/main.rs:2688-2697 — 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) src/pack_export.rs:1212— src/pack_export.rs:1212-1221 | src/pack_export.rs:1357-1366 — 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) src/cli/machine.rs:5260— src/cli/machine.rs:5260-5269 | src/cli/pack_run.rs:1246-1255 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) crates/smolvm-agent/src/cuda.rs:233— crates/smolvm-agent/src/cuda.rs:233-243 | crates/smolvm-agent/src/vulkan.rs:223-233 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) crates/smolvm-agent/src/storage.rs:1689— crates/smolvm-agent/src/storage.rs:1689-1699 | crates/smolvm-agent/src/storage.rs:1769-1779 — 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) crates/smolvm-cuda/src/host/gpu.rs:1825— crates/smolvm-cuda/src/host/gpu.rs:1825-1835 | crates/smolvm-cuda/src/host/gpu.rs:1886-1896 — 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) crates/smolvm-cuda/src/host/gpu.rs:3624— crates/smolvm-cuda/src/host/gpu.rs:3624-3634 | crates/smolvm-cuda/src/host/gpu.rs:3681-3691 — 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) crates/smolvm-cuda/src/host/gpu.rs:3765— crates/smolvm-cuda/src/host/gpu.rs:3765-3775 | crates/smolvm-cuda/src/host/gpu.rs:3785-3795 — 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) crates/smolvm-cudart-shim/src/lib.rs:4640— crates/smolvm-cudart-shim/src/lib.rs:4640-4650 | crates/smolvm-cudart-shim/src/lib.rs:4658-4668 — 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) crates/smolvm-cudart-shim/src/lib.rs:5523— crates/smolvm-cudart-shim/src/lib.rs:5523-5533 | crates/smolvm-cudart-shim/src/lib.rs:5595-5605 — 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) crates/smolvm-cudart-shim/src/lib.rs:5961— crates/smolvm-cudart-shim/src/lib.rs:5961-5971 | crates/smolvm-cudart-shim/src/lib.rs:6040-6050 — 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) crates/smolvm-pack/src/packer.rs:319— crates/smolvm-pack/src/packer.rs:319-329 | crates/smolvm-pack/src/packer.rs:644-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.
Duplicated block (11 lines × 2) crates/smolvm-pack/src/packer.rs:596— crates/smolvm-pack/src/packer.rs:596-606 | crates/smolvm-pack/src/packer.rs:687-697 — 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) src/cli/machine.rs:1545— src/cli/machine.rs:1545-1555 | src/cli/machine.rs:4978-4988 — 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) src/cli/vm_common.rs:991— src/cli/vm_common.rs:991-1001 | src/cli/vm_common.rs:1144-1154 — 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) src/cuda_daemon.rs:3731— src/cuda_daemon.rs:3731-3741 | src/cuda_daemon.rs:4882-4892 — 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) src/portable_checkpoint.rs:1573— src/portable_checkpoint.rs:1573-1583 | src/portable_checkpoint.rs:1660-1670 — 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) src/cuda_daemon.rs:1015— src/cuda_daemon.rs:1015-1025 | src/cuda_daemon.rs:1032-1042 — 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) src/cuda_daemon.rs:2205— src/cuda_daemon.rs:2205-2215 | src/cuda_daemon.rs:2226-2236 — 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) src/embedded/runtime.rs:523— src/embedded/runtime.rs:523-533 | src/embedded/runtime.rs:570-580 — 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) src/api/handlers/machines.rs:1155— src/api/handlers/machines.rs:1155-1165 | src/api/handlers/machines.rs:1170-1180 — 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) src/api/handlers/machines.rs:5852— src/api/handlers/machines.rs:5852-5862 | src/api/handlers/machines.rs:6722-6732 — 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) src/api/handlers/machines.rs:3641— src/api/handlers/machines.rs:3641-3651 | src/cli/machine.rs:5699-5709 — 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 (11 lines × 2) crates/smolvm-agent/src/main.rs:4576— crates/smolvm-agent/src/main.rs:4576-4586 | crates/smolvm-agent/src/main.rs:4619-4629 — 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.
ClassTooLong: GpuBackend crates/smolvm-cuda/src/host/gpu.rs:97— ClassTooLong — 2148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 5 blocks, lines 97-4324. The bar is 400 significant lines; this is 1748 over it, 5.37× 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: SmolvmDb src/db.rs:196— ClassTooLong — 1532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 78 methods, 3 blocks, lines 196-2384. The bar is 400 significant lines; this is 1132 over it, 3.83× 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: AgentManager src/agent/manager.rs:1069— ClassTooLong — 1532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 76 methods, 3 blocks, lines 1069-4112. The bar is 400 significant lines; this is 1132 over it, 3.83× 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: AgentClient src/agent/client.rs:1115— ClassTooLong — 1493 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 99 methods, 2 blocks, lines 1115-3881. The bar is 400 significant lines; this is 1093 over it, 3.73× 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: Client crates/smolvm-cuda/src/client.rs:209— ClassTooLong — 1208 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 132 methods, 2 blocks, lines 209-2152. The bar is 400 significant lines; this is 808 over it, 3.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EmbeddedRuntime src/embedded/runtime.rs:84— ClassTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 78 methods, 2 blocks, lines 84-1677. The bar is 400 significant lines; this is 613 over it, 2.53× 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: RunCmd src/cli/machine.rs:535— ClassTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 2 blocks, lines 535-2573. The bar is 400 significant lines; this is 554 over it, 2.39× 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: RegistryClient crates/smolvm-registry/src/client.rs:208— ClassTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 2 blocks, lines 208-1630. The bar is 400 significant lines; this is 389 over it, 1.97× 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: CreateCmd src/cli/machine.rs:4435— ClassTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 2 methods, 2 blocks, lines 4435-5714. The bar is 400 significant lines; this is 350 over it, 1.88× 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: RolloutExecutor src/api/rollout.rs:692— ClassTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 2 blocks, lines 692-1665. The bar is 400 significant lines; this is 306 over it, 1.77× 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: VmRecord src/config.rs:425— ClassTooLong — 702 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, 2 blocks, lines 425-1680. The bar is 400 significant lines; this is 302 over it, 1.76× 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: ApiState src/api/state.rs:68— ClassTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 53 methods, 2 blocks, lines 68-1534. The bar is 400 significant lines; this is 287 over it, 1.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PackCreateCmd src/cli/pack.rs:422— ClassTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 422-1602. The bar is 400 significant lines; this is 247 over it, 1.62× 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: S3Fs crates/smolvm-s3fs/src/fs.rs:158— ClassTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 3 blocks, lines 158-1139. The bar is 400 significant lines; this is 234 over it, 1.59× 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: UpdateCmd src/cli/machine.rs:6708— ClassTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 2 blocks, lines 6708-7491. The bar is 400 significant lines; this is 119 over it, 1.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: ForkPoolController src/api/pool_controller.rs:70— ClassTooLong — 517 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, 2 blocks, lines 70-788. The bar is 400 significant lines; this is 117 over it, 1.29× 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: ServeStartCmd src/cli/serve.rs:58— ClassTooLong — 437 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 5 methods, 2 blocks, lines 58-885. The bar is 400 significant lines; this is 37 over it, 1.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Writer crates/smolvm-checkpoint/src/store.rs:173— ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 3 blocks, lines 173-785. The bar is 400 significant lines; this is 32 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.
ClassTooLong: AssetCollector crates/smolvm-pack/src/assets.rs:600— ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 2 blocks, lines 600-1311. The bar is 400 significant lines; this is 16 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (13 lines × 2) crates/smolvm-checkpoint/src/store.rs:945— crates/smolvm-checkpoint/src/store.rs:945-957 | crates/smolvm-checkpoint/src/store.rs:2773-2785 — 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) crates/smolvm-pack/src/extract.rs:1687— crates/smolvm-pack/src/extract.rs:1687-1699 | src/api/handlers/machines.rs:7010-7022 — before extracting anything, compare `crates/smolvm-pack/src/extract.rs` and `src/api/handlers/machines.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) crates/smolvm-protocol/src/intercept.rs:169— crates/smolvm-protocol/src/intercept.rs:169-181 | crates/smolvm-protocol/src/mediated_egress.rs:85-97 — 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 (13 lines × 2) src/agent/launcher.rs:2793— src/agent/launcher.rs:2793-2805 | src/agent/launcher_dynamic.rs:1297-1309 — before extracting anything, compare `src/agent/launcher.rs` and `src/agent/launcher_dynamic.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 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 (13 lines × 2) src/api/pool_controller.rs:202— src/api/pool_controller.rs:202-214 | src/api/pool_controller.rs:420-432 — 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) src/api/pool_controller.rs:218— src/api/pool_controller.rs:218-230 | src/api/pool_controller.rs:436-448 — 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) src/api/rollout.rs:974— src/api/rollout.rs:974-986 | src/api/rollout.rs:1117-1129 — 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) src/cli/pack_run.rs:618— src/cli/pack_run.rs:618-630 | src/cli/pack_run.rs:2303-2315 — 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) src/cli/pack_run.rs:2079— src/cli/pack_run.rs:2079-2091 | src/cli/pack_run.rs:2570-2582 — 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) src/cuda_daemon.rs:1781— src/cuda_daemon.rs:1781-1793 | src/cuda_daemon.rs:1837-1849 — 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) src/cuda_daemon.rs:3549— src/cuda_daemon.rs:3549-3561 | src/cuda_daemon.rs:4440-4456 — 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) src/cuda_daemon.rs:4344— src/cuda_daemon.rs:4344-4356 | src/cuda_daemon.rs:4383-4395 — 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) src/cuda_daemon.rs:5802— src/cuda_daemon.rs:5802-5814 | src/cuda_daemon.rs:5825-5837 — 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) crates/smolvm-agent/src/main.rs:6201— crates/smolvm-agent/src/main.rs:6201-6213 | crates/smolvm-agent/src/main.rs:6477-6489 — 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) crates/smolvm-agent/src/main.rs:6211— crates/smolvm-agent/src/main.rs:6211-6223 | crates/smolvm-agent/src/main.rs:6252-6264 — 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) crates/smolvm-credentials/src/ca.rs:121— crates/smolvm-credentials/src/ca.rs:121-133 | crates/smolvm-credentials/src/ca.rs:173-185 — 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) src/agent/fork.rs:1541— src/agent/fork.rs:1541-1553 | src/agent/fork.rs:2158-2170 — 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) bench/workload_dpo.py:69— bench/workload_dpo.py:69-81 | demo/dpo_train.py:68-80 — before extracting anything, compare `bench/workload_dpo.py` and `demo/dpo_train.py` as WHOLE FILES: 99% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `bench/workload_dpo.py:69` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (7 lines × 2) crates/smolvm-agent/src/main.rs:6162— crates/smolvm-agent/src/main.rs:6162-6169 | crates/smolvm-agent/src/main.rs:6448-6454 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-agent/src/ssh_agent.rs:175— crates/smolvm-agent/src/ssh_agent.rs:175-181 | crates/smolvm-agent/src/ssh_agent.rs:184-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-agent/src/storage.rs:1615— crates/smolvm-agent/src/storage.rs:1615-1621 | src/data/image_source.rs:431-437 — 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 (7 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:1171— crates/smolvm-cuda-shim/src/lib.rs:1171-1177 | crates/smolvm-cuda-shim/src/lib.rs:1375-1384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:1123— crates/smolvm-cudart-shim/src/lib.rs:1123-1129 | crates/smolvm-cudart-shim/src/lib.rs:1139-1145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/agent/client.rs:2103— src/agent/client.rs:2103-2109 | src/agent/client.rs:2130-2136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/api/handlers/exec.rs:122— src/api/handlers/exec.rs:122-128 | src/api/handlers/exec.rs:185-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/api/handlers/machines.rs:5025— src/api/handlers/machines.rs:5025-5031 | src/api/handlers/machines.rs:5161-5167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/api/handlers/machines.rs:6342— src/api/handlers/machines.rs:6342-6348 | src/api/handlers/machines.rs:6720-6726 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/cli/vm_common.rs:1214— src/cli/vm_common.rs:1214-1220 | src/embedded/control.rs:636-642 — 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 (7 lines × 2) src/cuda_daemon.rs:6109— src/cuda_daemon.rs:6109-6115 | src/storage.rs:310-316 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) src/cuda_host.rs:337— src/cuda_host.rs:337-343 | src/cuda_host.rs:428-434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/embedded/runtime.rs:754— src/embedded/runtime.rs:754-760 | src/embedded/runtime.rs:791-797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/portable_checkpoint.rs:5588— src/portable_checkpoint.rs:5588-5594 | src/portable_checkpoint.rs:5690-5696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-agent/src/main.rs:8168— crates/smolvm-agent/src/main.rs:8168-8177 | crates/smolvm-agent/src/main.rs:8181-8187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-pack/src/extract.rs:1796— crates/smolvm-pack/src/extract.rs:1796-1805 | src/api/handlers/machines.rs:215-221 — before extracting anything, compare `crates/smolvm-pack/src/extract.rs` and `src/api/handlers/machines.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) src/cuda_daemon.rs:2198— src/cuda_daemon.rs:2198-2204 | src/cuda_daemon.rs:2219-2225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) crates/smolvm-pack/src/assets.rs:190— crates/smolvm-pack/src/assets.rs:190-196 | crates/smolvm-pack/src/assets.rs:1621-1627 — 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.
smolvm_network::stack::run_network_stack (cognitive 77) crates/smolvm-network/src/stack.rs:232— smolvm_network::stack::run_network_stack has cognitive complexity 77 (threshold 15). Drivers by points: if/else 23 (59 pts), match/switch 3 (8 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 43). 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.
smolvm_network::icmp_relay::run_icmp_relay (cognitive 59) crates/smolvm-network/src/icmp_relay.rs:146— smolvm_network::icmp_relay::run_icmp_relay has cognitive complexity 59 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 7 (14 pts), match/switch 3 (12 pts), boolean chains 1 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_network::tcp_relay::relay_stream (cognitive 56) crates/smolvm-network/src/tcp_relay.rs:1252— smolvm_network::tcp_relay::relay_stream has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (36 pts), match/switch 3 (10 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 29). 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.
smolvm_network::dns_relay::run_dns_relay (cognitive 53) crates/smolvm-network/src/dns_relay.rs:161— smolvm_network::dns_relay::run_dns_relay has cognitive complexity 53 (threshold 15). Drivers by points: match/switch 5 (20 pts), if/else 7 (19 pts), loops 7 (13 pts), boolean chains 1 (nesting depth added 33). 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.
smolvm_network::udp_relay::run_udp_relay (cognitive 49) crates/smolvm-network/src/udp_relay.rs:127— smolvm_network::udp_relay::run_udp_relay has cognitive complexity 49 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 7 (14 pts), match/switch 3 (12 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_network::stack::classify_guest_frame (cognitive 39) crates/smolvm-network/src/stack.rs:1330— smolvm_network::stack::classify_guest_frame has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 7 (11 pts), boolean chains 3 (nesting depth added 18). 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.
smolvm_network::stack::process_dns_tcp (cognitive 36) crates/smolvm-network/src/stack.rs:1180— smolvm_network::stack::process_dns_tcp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 3 (12 pts), loops 2 (3 pts), boolean chains 2 (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.
smolvm_network::udp_publish::run_publisher (cognitive 33) crates/smolvm-network/src/udp_publish.rs:176— smolvm_network::udp_publish::run_publisher has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 3 (12 pts), if/else 4 (11 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_network::stack::drain_icmp_echo (cognitive 30) crates/smolvm-network/src/stack.rs:728— smolvm_network::stack::drain_icmp_echo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 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.
smolvm_network::dns::read_name (cognitive 24) crates/smolvm-network/src/dns.rs:214— smolvm_network::dns::read_name has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_network::stack::deliver_dns_responses (cognitive 24) crates/smolvm-network/src/stack.rs:1073— smolvm_network::stack::deliver_dns_responses has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_network::tcp_relay::tcp_relay_loop (cognitive 22) crates/smolvm-network/src/tcp_relay.rs:955— smolvm_network::tcp_relay::tcp_relay_loop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 4 (7 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.
smolvm_network::tcp_relay::flush_proxy_data (cognitive 22) crates/smolvm-network/src/tcp_relay.rs:1446— smolvm_network::tcp_relay::flush_proxy_data has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (12 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.
smolvm_network::netns_tap::pump_tap_to_stream (cognitive 18) crates/smolvm-network/src/netns_tap.rs:124— smolvm_network::netns_tap::pump_tap_to_stream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 2 (4 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.
smolvm_network::tcp_listeners::run_tcp_port_listener (cognitive 18) crates/smolvm-network/src/tcp_listeners.rs:330— smolvm_network::tcp_listeners::run_tcp_port_listener has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 2 (5 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.
Duplicated block (12 lines × 2) crates/smolvm-agent/src/main.rs:6192— crates/smolvm-agent/src/main.rs:6192-6203 | crates/smolvm-agent/src/main.rs:6233-6244 — 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 (12 lines × 2) crates/smolvm-agent/src/network/linux.rs:601— crates/smolvm-agent/src/network/linux.rs:601-612 | crates/smolvm-agent/src/network/linux.rs:646-657 — 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 (12 lines × 2) crates/smolvm-agent/src/rosetta.rs:126— crates/smolvm-agent/src/rosetta.rs:126-137 | crates/smolvm-agent/src/rosetta.rs:155-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) crates/smolvm-agent/src/storage.rs:3626— crates/smolvm-agent/src/storage.rs:3626-3637 | crates/smolvm-agent/src/storage.rs:3781-3792 — 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 (12 lines × 2) crates/smolvm-agent/src/storage.rs:5825— crates/smolvm-agent/src/storage.rs:5825-5836 | crates/smolvm-agent/src/storage.rs:6055-6066 — 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 (12 lines × 2) crates/smolvm-checkpoint/src/store.rs:1493— crates/smolvm-checkpoint/src/store.rs:1493-1504 | src/api/cache_base_fetch.rs:270-281 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:1818— crates/smolvm-cuda/src/host/gpu.rs:1818-1829 | crates/smolvm-cuda/src/host/gpu.rs:1851-1862 — 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 (12 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:1879— crates/smolvm-cuda/src/host/gpu.rs:1879-1890 | crates/smolvm-cuda/src/host/gpu.rs:1908-1919 — 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 (12 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:2313— crates/smolvm-cudart-shim/src/lib.rs:2313-2324 | crates/smolvm-cudart-shim/src/lib.rs:2950-2961 — 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 (12 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:3888— crates/smolvm-cudart-shim/src/lib.rs:3888-3899 | crates/smolvm-cudart-shim/src/lib.rs:3939-3950 — 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 (12 lines × 2) crates/smolvm-pack/src/extract.rs:3630— crates/smolvm-pack/src/extract.rs:3630-3641 | crates/smolvm-pack/src/extract.rs:3701-3712 — 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 (12 lines × 2) crates/smolvm-pack/src/packer.rs:308— crates/smolvm-pack/src/packer.rs:308-319 | crates/smolvm-pack/src/packer.rs:671-682 — 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 (12 lines × 2) src/api/cache_base_budget.rs:136— src/api/cache_base_budget.rs:136-147 | src/api/handlers/machines.rs:228-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) src/cuda_daemon.rs:2620— src/cuda_daemon.rs:2620-2631 | src/cuda_daemon.rs:2651-2662 — 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 (12 lines × 2) crates/smolvm-cuda/src/host.rs:3628— crates/smolvm-cuda/src/host.rs:3628-3639 | crates/smolvm-cuda/src/host.rs:3670-3681 — 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.
TooManyFields: GpuBackend crates/smolvm-cuda/src/host/gpu.rs:97— TooManyFields — 132 stored fields beside 11 methods. The bar is 30 stored fields; this is 102 over it, 4.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: VmRecord src/config.rs:425— TooManyFields — 87 stored fields beside 27 methods. The bar is 30 stored fields; this is 57 over it, 2.90× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: CudaDeviceProp crates/smolvm-cudart-shim/src/lib.rs:2481— TooManyFields — 75 stored fields. The bar is 30 stored fields; this is 45 over it, 2.50× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: RunCmd src/cli/machine.rs:535— TooManyFields — 65 stored fields beside 1 method. The bar is 30 stored fields; this is 35 over it, 2.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: CreateCmd src/cli/machine.rs:4435— TooManyFields — 59 stored fields beside 2 methods. The bar is 30 stored fields; this is 29 over it, 1.97× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: CreateVmParams src/cli/vm_common.rs:460— TooManyFields — 57 stored fields beside 3 methods. The bar is 30 stored fields; this is 27 over it, 1.90× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Session crates/smolvm-cuda/src/host.rs:693— TooManyFields — 46 stored fields beside 1 method. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: MachineInfo src/api/types.rs:921— TooManyFields — 42 stored fields. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: KrunFunctions src/agent/krun.rs:42— TooManyFields — 39 stored fields beside 5 methods. The bar is 30 stored fields; this is 9 over it, 1.30× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: DefaultVmOverrides src/cli/vm_common.rs:2276— TooManyFields — 38 stored fields beside 1 method. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: Smolfile crates/smolvm-smolfile/src/lib.rs:258— TooManyFields — 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: CreateMachineRequest src/api/types.rs:752— TooManyFields — 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: UpdateCmd src/cli/machine.rs:6708— TooManyFields — 34 stored fields beside 8 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
smolvm_agent::handle_request (cyclomatic 58) crates/smolvm-agent/src/main.rs:2472— smolvm_agent::handle_request has cyclomatic complexity 58 (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.
smolvm_agent::run_interactive_loop (cyclomatic 53) crates/smolvm-agent/src/main.rs:6033— smolvm_agent::run_interactive_loop has cyclomatic complexity 53 (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.
smolvm_agent::run_interactive_loop_pty (cyclomatic 41) crates/smolvm-agent/src/main.rs:6339— smolvm_agent::run_interactive_loop_pty has cyclomatic complexity 41 (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.
smolvm_agent::storage::pull_image_with_progress_and_auth (cyclomatic 32) crates/smolvm-agent/src/storage.rs:3221— smolvm_agent::storage::pull_image_with_progress_and_auth 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.
smolvm_agent::main (cyclomatic 31) crates/smolvm-agent/src/main.rs:300— smolvm_agent::main has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
smolvm_agent::handle_connection (cyclomatic 30) crates/smolvm-agent/src/main.rs:2138— smolvm_agent::handle_connection 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.
smolvm_agent::handle_run_detached (cyclomatic 26) crates/smolvm-agent/src/main.rs:4294— smolvm_agent::handle_run_detached has cyclomatic complexity 26 (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.
smolvm_agent::storage::oci_archive_compatibility (cyclomatic 24) crates/smolvm-agent/src/storage.rs:1997— smolvm_agent::storage::oci_archive_compatibility 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. This is NOT this file's highest cyclomatic complexity: StorageError::fmt (cyclomatic 25) 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.
smolvm_agent::setup_persistent_rootfs (cyclomatic 23) crates/smolvm-agent/src/main.rs:1197— smolvm_agent::setup_persistent_rootfs 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.
smolvm_agent::handle_vm_exec (cyclomatic 22) crates/smolvm-agent/src/main.rs:8090— smolvm_agent::handle_vm_exec 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.
smolvm_agent::process::wait_with_timeout_cleanup_and_liveness (cyclomatic 20) crates/smolvm-agent/src/process.rs:359— smolvm_agent::process::wait_with_timeout_cleanup_and_liveness 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.
smolvm_agent::nsfile::run_helper (cyclomatic 16) crates/smolvm-agent/src/nsfile.rs:67— smolvm_agent::nsfile::run_helper has cyclomatic complexity 16 (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.
smolvm_cuda::host::dispatch (cognitive 467) crates/smolvm-cuda/src/host.rs:4714— smolvm_cuda::host::dispatch has cognitive complexity 467 (threshold 15). Drivers by points: if/else 145 (345 pts), loops 16 (53 pts), match/switch 15 (42 pts), boolean chains 27 (nesting depth added 264). Of this number, 463 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
smolvm_cuda::host::serve_rings (cognitive 87) crates/smolvm-cuda/src/host.rs:3394— smolvm_cuda::host::serve_rings has cognitive complexity 87 (threshold 15). Drivers by points: if/else 27 (71 pts), match/switch 7 (20 pts), loops 7 (15 pts), boolean chains 5 (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. This shape REPEATS in the file: one other method here (smolvm_cuda::host::serve_rings::respond) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
smolvm_cuda::host::serve_inner (cognitive 37) crates/smolvm-cuda/src/host.rs:3122— smolvm_cuda::host::serve_inner has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 3 (10 pts), boolean chains 2, 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.
smolvm_cuda::host::execute_auto_graph_segment (cognitive 36) crates/smolvm-cuda/src/host.rs:4223— smolvm_cuda::host::execute_auto_graph_segment has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 4 (8 pts), boolean chains 3 (nesting depth added 9). 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.
smolvm_cuda::host::replay_capture_graph (cognitive 36) crates/smolvm-cuda/src/host.rs:4564— smolvm_cuda::host::replay_capture_graph has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 6 (8 pts), loops 4 (5 pts) (nesting depth added 17). Of this number, 34 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
smolvm_cuda::host::reclaim_session (cognitive 31) crates/smolvm-cuda/src/host.rs:818— smolvm_cuda::host::reclaim_session has cognitive complexity 31 (threshold 15). Drivers by points: loops 15 (16 pts), if/else 7 (15 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
smolvm_cuda::host::serve_rings::respond (cognitive 24) crates/smolvm-cuda/src/host.rs:3499— smolvm_cuda::host::serve_rings::respond has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 pts), boolean chains 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. This shape REPEATS in the file: one other method here (smolvm_cuda::host::serve_rings) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
smolvm_cuda::proto::encode_request (cognitive 24) crates/smolvm-cuda/src/proto.rs:976— smolvm_cuda::proto::encode_request has cognitive complexity 24 (threshold 15). Drivers by points: loops 11 (23 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.
smolvm_cuda::proto::decode_request (cognitive 21) crates/smolvm-cuda/src/proto.rs:1674— smolvm_cuda::proto::decode_request has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 3 (6 pts), boolean chains 1, 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.
smolvm_cuda::host::xlat_mod (cognitive 18) crates/smolvm-cuda/src/host.rs:2199— smolvm_cuda::host::xlat_mod has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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.
smolvm_cuda::host::translate_dptrs (cognitive 18) crates/smolvm-cuda/src/host.rs:2790— smolvm_cuda::host::translate_dptrs has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (8 pts), match/switch 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
Duplicated block (16 lines × 2) crates/smolvm-agent/src/main.rs:3915— crates/smolvm-agent/src/main.rs:3915-3930 | crates/smolvm-agent/src/main.rs:7724-7739 — 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 (16 lines × 2) crates/smolvm-agent/src/process.rs:389— crates/smolvm-agent/src/process.rs:389-404 | crates/smolvm-agent/src/process.rs:415-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) crates/smolvm-agent/src/ssh_agent.rs:278— crates/smolvm-agent/src/ssh_agent.rs:278-293 | crates/smolvm-agent/src/vsock.rs:210-225 — 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 (16 lines × 2) crates/smolvm-agent/src/storage.rs:2916— crates/smolvm-agent/src/storage.rs:2916-2931 | crates/smolvm-agent/src/storage.rs:3187-3202 — 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 (16 lines × 2) crates/smolvm-network/src/icmp_relay.rs:277— crates/smolvm-network/src/icmp_relay.rs:277-292 | crates/smolvm-network/src/udp_relay.rs:243-258 — before extracting anything, compare `crates/smolvm-network/src/icmp_relay.rs` and `crates/smolvm-network/src/udp_relay.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 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 (16 lines × 2) crates/smolvm-network/src/tcp_relay.rs:558— crates/smolvm-network/src/tcp_relay.rs:558-573 | crates/smolvm-network/src/tcp_relay.rs:660-675 — 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 (16 lines × 2) src/agent/launcher.rs:1653— src/agent/launcher.rs:1653-1668 | src/agent/launcher.rs:1684-1699 — 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 (16 lines × 2) src/agent/manager.rs:3811— src/agent/manager.rs:3811-3826 | src/agent/manager.rs:3893-3908 — 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 (16 lines × 2) src/cli/pack.rs:1057— src/cli/pack.rs:1057-1072 | src/cli/pack.rs:1206-1221 — 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 (16 lines × 2) crates/smolvm-agent/src/main.rs:6172— crates/smolvm-agent/src/main.rs:6172-6192 | crates/smolvm-agent/src/main.rs:6457-6472 — 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 (16 lines × 2) src/agent/launcher_dynamic.rs:597— src/agent/launcher_dynamic.rs:597-612 | src/agent/launcher_dynamic.rs:620-635 — 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.
smolvm_network::stack::run_network_stack (cyclomatic 35) crates/smolvm-network/src/stack.rs:232— smolvm_network::stack::run_network_stack has cyclomatic complexity 35 (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.
smolvm_network::tcp_relay::relay_stream (cyclomatic 33) crates/smolvm-network/src/tcp_relay.rs:1252— smolvm_network::tcp_relay::relay_stream 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.
smolvm_network::dns_relay::run_dns_relay (cyclomatic 23) crates/smolvm-network/src/dns_relay.rs:161— smolvm_network::dns_relay::run_dns_relay has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
smolvm_network::icmp_relay::run_icmp_relay (cyclomatic 23) crates/smolvm-network/src/icmp_relay.rs:146— smolvm_network::icmp_relay::run_icmp_relay 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.
smolvm_network::stack::classify_guest_frame (cyclomatic 21) crates/smolvm-network/src/stack.rs:1330— smolvm_network::stack::classify_guest_frame 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.
smolvm_network::udp_relay::run_udp_relay (cyclomatic 21) crates/smolvm-network/src/udp_relay.rs:127— smolvm_network::udp_relay::run_udp_relay 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.
smolvm_network::udp_publish::run_publisher (cyclomatic 18) crates/smolvm-network/src/udp_publish.rs:176— smolvm_network::udp_publish::run_publisher has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
smolvm_network::stack::drain_icmp_echo (cyclomatic 16) crates/smolvm-network/src/stack.rs:728— smolvm_network::stack::drain_icmp_echo 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.
smolvm_network::stack::process_dns_tcp (cyclomatic 16) crates/smolvm-network/src/stack.rs:1180— smolvm_network::stack::process_dns_tcp 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.
smolvm_network::tcp_relay::tcp_relay_loop (cyclomatic 16) crates/smolvm-network/src/tcp_relay.rs:955— smolvm_network::tcp_relay::tcp_relay_loop 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.
smolvm_pack::extract::safe_unpack_skipping (cognitive 169) crates/smolvm-pack/src/extract.rs:986— smolvm_pack::extract::safe_unpack_skipping has cognitive complexity 169 (threshold 15). Drivers by points: if/else 61 (150 pts), boolean chains 15, loops 2, match/switch 1 (2 pts) (nesting depth added 90). 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.
smolvm_pack::extract::post_process_extraction (cognitive 52) crates/smolvm-pack/src/extract.rs:4529— smolvm_pack::extract::post_process_extraction has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 3 (6 pts), boolean chains 3 (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.
smolvm_pack::extract::extract_sidecar_capped (cognitive 35) crates/smolvm-pack/src/extract.rs:2188— smolvm_pack::extract::extract_sidecar_capped has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 8, 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.
smolvm_pack::extract::repair_host_layer_owners (cognitive 23) crates/smolvm-pack/src/extract.rs:3431— smolvm_pack::extract::repair_host_layer_owners has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_pack::extract::ensure_shared_artifact_sha256_with_proofs (cognitive 20) crates/smolvm-pack/src/extract.rs:3261— smolvm_pack::extract::ensure_shared_artifact_sha256_with_proofs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_pack::extract::gc_stale_leases (cognitive 20) crates/smolvm-pack/src/extract.rs:5089— smolvm_pack::extract::gc_stale_leases has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
smolvm_pack::assets::macos_sparse_extents (cognitive 19) crates/smolvm-pack/src/assets.rs:30— smolvm_pack::assets::macos_sparse_extents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 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.
smolvm_pack::extract::copy_data_extents (cognitive 19) crates/smolvm-pack/src/extract.rs:5558— smolvm_pack::extract::copy_data_extents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_pack::extract::extract_libs_from_binary (cognitive 17) crates/smolvm-pack/src/extract.rs:5370— smolvm_pack::extract::extract_libs_from_binary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), match/switch 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.
smolvm_pack::extract::repair_host_layer_symlink_owners (cognitive 16) crates/smolvm-pack/src/extract.rs:3476— smolvm_pack::extract::repair_host_layer_symlink_owners has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 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.
smolvm_cuda::host::dispatch (cyclomatic 292) crates/smolvm-cuda/src/host.rs:4714— smolvm_cuda::host::dispatch has cyclomatic complexity 292 (threshold 15). Of this number, 289 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm_cuda::proto::encode_request (cyclomatic 115) crates/smolvm-cuda/src/proto.rs:976— smolvm_cuda::proto::encode_request has cyclomatic complexity 115 (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.
smolvm_cuda::proto::decode_request (cyclomatic 114) crates/smolvm-cuda/src/proto.rs:1674— smolvm_cuda::proto::decode_request has cyclomatic complexity 114 (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.
smolvm_cuda::host::serve_rings (cyclomatic 48) crates/smolvm-cuda/src/host.rs:3394— smolvm_cuda::host::serve_rings has cyclomatic complexity 48 (threshold 15). Of this number, 37 points are the body's own statements and 11 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm_cuda::host::translate_dptrs (cyclomatic 26) crates/smolvm-cuda/src/host.rs:2790— smolvm_cuda::host::translate_dptrs has cyclomatic complexity 26 (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.
smolvm_cuda::host::replay_capture_graph (cyclomatic 26) crates/smolvm-cuda/src/host.rs:4564— smolvm_cuda::host::replay_capture_graph has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm_cuda::host::reclaim_session (cyclomatic 23) crates/smolvm-cuda/src/host.rs:818— smolvm_cuda::host::reclaim_session has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline. This is NOT this file's highest cyclomatic complexity: smolvm_cuda::host::optrace_summary (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.
smolvm_cuda::host::execute_auto_graph_segment (cyclomatic 23) crates/smolvm-cuda/src/host.rs:4223— smolvm_cuda::host::execute_auto_graph_segment has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: smolvm_cuda::host::optrace_summary (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.
smolvm_cuda::host::serve_inner (cyclomatic 16) crates/smolvm-cuda/src/host.rs:3122— smolvm_cuda::host::serve_inner has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: smolvm_cuda::host::optrace_summary (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.
AgentManager::start_via_subprocess (cognitive 121) src/agent/manager.rs:2509— AgentManager::start_via_subprocess has cognitive complexity 121 (threshold 15). Drivers by points: if/else 65 (98 pts), boolean chains 12, match/switch 3 (6 pts), loops 4 (5 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentManager::wait_for_ready (cognitive 61) src/agent/manager.rs:3792— AgentManager::wait_for_ready has cognitive complexity 61 (threshold 15). Drivers by points: if/else 19 (45 pts), match/switch 3 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 35). 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.
AgentManager::ensure_running_with_full_config (cognitive 28) src/agent/manager.rs:2019— AgentManager::ensure_running_with_full_config has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 2 (4 pts), boolean chains 3 (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.
AgentManager::kill_and_wait (cognitive 27) src/agent/manager.rs:3546— AgentManager::kill_and_wait has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 2 (3 pts), loops 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.
AgentManager::try_connect_existing_with_pid_and_start_time (cognitive 26) src/agent/manager.rs:1695— AgentManager::try_connect_existing_with_pid_and_start_time has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentManager::stop_vm_process (cognitive 24) src/agent/manager.rs:3364— AgentManager::stop_vm_process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentManager::stop_inner (cognitive 19) src/agent/manager.rs:3677— AgentManager::stop_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), 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.
AgentManager::ensure_running_via_subprocess (cognitive 17) src/agent/manager.rs:3260— AgentManager::ensure_running_via_subprocess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 pts), boolean chains 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.
smolvm_cudart_shim::module_image_len (cognitive 38) crates/smolvm-cudart-shim/src/lib.rs:4564— smolvm_cudart_shim::module_image_len has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 4 (7 pts), boolean chains 5 (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.
smolvm_cudart_shim::__cudaUnregisterFatBinary (cognitive 35) crates/smolvm-cudart-shim/src/lib.rs:4798— smolvm_cudart_shim::__cudaUnregisterFatBinary has cognitive complexity 35 (threshold 15). Drivers by points: loops 7 (19 pts), if/else 7 (16 pts) (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
smolvm_cudart_shim::do_memcpy_inner (cognitive 34) crates/smolvm-cudart-shim/src/lib.rs:2033— smolvm_cudart_shim::do_memcpy_inner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (5 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 17). 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.
smolvm_cudart_shim::cuda_host_malloc (cognitive 24) crates/smolvm-cudart-shim/src/lib.rs:1823— smolvm_cudart_shim::cuda_host_malloc has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 4 (7 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.
smolvm_cudart_shim::with_client_state (cognitive 20) crates/smolvm-cudart-shim/src/lib.rs:963— smolvm_cudart_shim::with_client_state has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (3 pts), boolean chains 2 (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.
smolvm_cudart_shim::bn_size_call (cognitive 18) crates/smolvm-cudart-shim/src/lib.rs:6104— smolvm_cudart_shim::bn_size_call has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (nesting depth added 10). 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.
smolvm_cudart_shim::cudaFuncGetAttributes (cognitive 16) crates/smolvm-cudart-shim/src/lib.rs:3613— smolvm_cudart_shim::cudaFuncGetAttributes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (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.
smolvm_cudart_shim::cublasLtMatmulAlgoGetHeuristic (cognitive 16) crates/smolvm-cudart-shim/src/lib.rs:5664— smolvm_cudart_shim::cublasLtMatmulAlgoGetHeuristic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyMethods: Client crates/smolvm-cuda/src/client.rs:209— TooManyMethods — 132 methods. The bar is 30 methods; this is 102 over it, 4.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: AgentClient src/agent/client.rs:1115— TooManyMethods — 99 methods. The bar is 30 methods; this is 69 over it, 3.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SmolvmDb src/db.rs:196— TooManyMethods — 78 methods, declared across 2 files: src/db.rs (69), db/resize.rs (9). The bar is 30 methods; this is 48 over it, 2.60× 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: EmbeddedRuntime src/embedded/runtime.rs:84— TooManyMethods — 78 methods. The bar is 30 methods; this is 48 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.
TooManyMethods: AgentManager src/agent/manager.rs:1069— TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× 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: ApiState src/api/state.rs:68— TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: CrunCommand crates/smolvm-agent/src/crun.rs:54— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: RegistryClient crates/smolvm-registry/src/client.rs:208— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (15 lines × 2) crates/smolvm-agent/src/ssh_agent.rs:261— crates/smolvm-agent/src/ssh_agent.rs:261-275 | crates/smolvm-agent/src/vsock.rs:193-207 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) crates/smolvm-agent/src/storage.rs:828— crates/smolvm-agent/src/storage.rs:828-842 | crates/smolvm-agent/src/storage.rs:866-880 — 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 lines × 2) crates/smolvm-agent/src/storage.rs:6127— crates/smolvm-agent/src/storage.rs:6127-6141 | crates/smolvm-agent/src/storage.rs:6205-6219 — 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 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:5693— crates/smolvm-cudart-shim/src/lib.rs:5693-5707 | crates/smolvm-cudart-shim/src/lib.rs:5728-5742 — 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 lines × 2) src/cli/vm_common.rs:1003— src/cli/vm_common.rs:1003-1017 | src/cli/vm_common.rs:1156-1170 — 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 lines × 2) src/cli/vm_common.rs:2023— src/cli/vm_common.rs:2023-2037 | src/cli/vm_common.rs:2510-2524 — 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 lines × 2) crates/smolvm-agent/src/live_resources.rs:248— crates/smolvm-agent/src/live_resources.rs:248-263 | crates/smolvm-agent/src/live_resources.rs:324-338 — 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 lines × 2) src/cuda_daemon.rs:4174— src/cuda_daemon.rs:4174-4188 | src/cuda_daemon.rs:4215-4229 — 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.
smolvm_checkpoint::store::prune_in_batches (cognitive 43) crates/smolvm-checkpoint/src/store.rs:1743— smolvm_checkpoint::store::prune_in_batches has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 3 (7 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_checkpoint::store::materialize_cached (cognitive 33) crates/smolvm-checkpoint/src/store.rs:1998— smolvm_checkpoint::store::materialize_cached has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 7, loops 3 (4 pts), match/switch 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.
smolvm_checkpoint::store::materialize_over (cognitive 22) crates/smolvm-checkpoint/src/store.rs:3057— smolvm_checkpoint::store::materialize_over has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_checkpoint::store::for_each_with_budget (cognitive 20) crates/smolvm-checkpoint/src/store.rs:1435— smolvm_checkpoint::store::for_each_with_budget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), boolean chains 1, match/switch 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.
smolvm_checkpoint::store::materialize_generation (cognitive 20) crates/smolvm-checkpoint/src/store.rs:2197— smolvm_checkpoint::store::materialize_generation has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 7). 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.
smolvm_checkpoint::store::lineage_of (cognitive 18) crates/smolvm-checkpoint/src/store.rs:820— smolvm_checkpoint::store::lineage_of has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), match/switch 1 (2 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.
smolvm_checkpoint::store::store_chunk (cognitive 17) crates/smolvm-checkpoint/src/store.rs:1540— smolvm_checkpoint::store::store_chunk has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 6). 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.
smolvm_cuda_shim::cuLaunchKernel (cognitive 33) crates/smolvm-cuda-shim/src/lib.rs:3321— smolvm_cuda_shim::cuLaunchKernel has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_cuda_shim::ensure_connected (cognitive 31) crates/smolvm-cuda-shim/src/lib.rs:255— smolvm_cuda_shim::ensure_connected has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 3 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 18). 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.
smolvm_cuda_shim::resolve_proc (cognitive 27) crates/smolvm-cuda-shim/src/lib.rs:3957— smolvm_cuda_shim::resolve_proc has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 5, 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.
smolvm_cuda_shim::cuTensorMapEncodeTiled (cognitive 25) crates/smolvm-cuda-shim/src/lib.rs:4222— smolvm_cuda_shim::cuTensorMapEncodeTiled has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 5, boolean chains 3, match/switch 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.
smolvm_cuda_shim::cuLibraryLoadData (cognitive 22) crates/smolvm-cuda-shim/src/lib.rs:2243— smolvm_cuda_shim::cuLibraryLoadData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 5 (7 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.
smolvm_cuda_shim::module_image_len (cognitive 20) crates/smolvm-cuda-shim/src/lib.rs:1403— smolvm_cuda_shim::module_image_len has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change coupling: boot_config.rs ↔ launcher.rs src/agent/boot_config.rs:1— `src/agent/boot_config.rs` and `src/agent/launcher.rs` change together 100% of the time (10 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 10 shared commits counted here, the most recent 3 are `5e9d3584` External egress interceptor (#1405); `b310083f` feat: add --expose-socket and --mount-socket for forwarding arbitrary…; `b000644e` feat: expose the guest Docker daemon socket to the host over vsock — run `git show` on any of them.
Change coupling: main.rs ↔ files.rs crates/smolvm-agent/src/main.rs:1— `crates/smolvm-agent/src/main.rs` and `src/api/handlers/files.rs` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `53508e15` Keep a user's supplementary groups on every exec path, let uploads se…; `9c3140f8` Make file operations target the filesystem exec uses and give each im…; `e9a26706` Prepare file access without running commands from guest images (#1700) — run `git show` on any of them.
Change coupling: main.rs ↔ client.rs crates/smolvm-cuda-codegen/src/main.rs:1— `crates/smolvm-cuda-codegen/src/main.rs` and `crates/smolvm-cuda/src/client.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `780393f2` Support CUDA 13 runtime ABI calls; `67c2c30f` Fix fork-clone serving, sm90 in-VM support, and per-replica module sh…; `98a229d2` CUDA fork: sync-call retry, allocation burst, multi-GPU pinning, sand… — run `git show` on any of them.
Change coupling: main.rs ↔ host.rs crates/smolvm-cuda-codegen/src/main.rs:1— `crates/smolvm-cuda-codegen/src/main.rs` and `crates/smolvm-cuda/src/host.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `780393f2` Support CUDA 13 runtime ABI calls; `67c2c30f` Fix fork-clone serving, sm90 in-VM support, and per-replica module sh…; `98a229d2` CUDA fork: sync-call retry, allocation burst, multi-GPU pinning, sand… — run `git show` on any of them.
Change coupling: client.rs ↔ gpu.rs crates/smolvm-cuda/src/client.rs:1— `crates/smolvm-cuda/src/client.rs` and `crates/smolvm-cuda/src/host/gpu.rs` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `23838a2d` Support segmented CUDA graph capture (#987); `780393f2` Support CUDA 13 runtime ABI calls; `67c2c30f` Fix fork-clone serving, sm90 in-VM support, and per-replica module sh… — run `git show` on any of them.
Change coupling: forkpoint.rs ↔ machines.rs crates/smolvm-protocol/src/forkpoint.rs:1— `crates/smolvm-protocol/src/forkpoint.rs` and `src/api/handlers/machines.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 — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `0fa81825` Share active branch memory and guard host capacity (#1204); `62d9b9e9` Keep a released clone alive when the branch helper is its main proces…; `a7eb7885` Make branching the primary machine lifecycle (#1118) — run `git show` on any of them.
Duplicated block (8 lines × 3) crates/smolvm-agent/src/storage.rs:3353— crates/smolvm-agent/src/storage.rs:3353-3360 | crates/smolvm-agent/src/storage.rs:3459-3466 | crates/smolvm-agent/src/storage.rs:3730-3737 — 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 (8 lines × 3) crates/smolvm-checkpoint/src/store.rs:951— crates/smolvm-checkpoint/src/store.rs:951-958 | crates/smolvm-checkpoint/src/store.rs:2779-2786 | crates/smolvm-checkpoint/src/store.rs:2900-2907 — 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 (8 lines × 3) crates/smolvm-cuda/src/host/gpu.rs:3124— crates/smolvm-cuda/src/host/gpu.rs:3124-3131 | crates/smolvm-cuda/src/host/gpu.rs:3153-3160 | crates/smolvm-cuda/src/host/gpu.rs:3177-3184 — 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 (8 lines × 3) crates/smolvm-cuda/src/host/gpu.rs:3133— crates/smolvm-cuda/src/host/gpu.rs:3133-3141 | crates/smolvm-cuda/src/host/gpu.rs:3162-3169 | crates/smolvm-cuda/src/host/gpu.rs:3186-3193 — 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 (8 lines × 3) crates/smolvm-pack/src/packer.rs:339— crates/smolvm-pack/src/packer.rs:339-346 | crates/smolvm-pack/src/packer.rs:599-606 | crates/smolvm-pack/src/packer.rs:690-697 — 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 (8 lines × 3) src/agent/fork.rs:2756— src/agent/fork.rs:2756-2763 | src/portable_checkpoint.rs:1576-1583 | src/portable_checkpoint.rs:1663-1670 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
GpuBackend::cuda_driver_library_call (cognitive 156) crates/smolvm-cuda/src/host/gpu.rs:745— GpuBackend::cuda_driver_library_call has cognitive complexity 156 (threshold 15). Drivers by points: if/else 36 (98 pts), match/switch 22 (49 pts), boolean chains 9 (nesting depth added 89). 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.
GpuBackend::graph_exec_patch (cognitive 83) crates/smolvm-cuda/src/host/gpu.rs:2133— GpuBackend::graph_exec_patch has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (63 pts), loops 4 (11 pts), boolean chains 7, match/switch 1 (2 pts) (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.
GpuBackend::gen_lib_call (cognitive 34) crates/smolvm-cuda/src/host/gpu.rs:4169— GpuBackend::gen_lib_call has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 6 (16 pts), if/else 8 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 18). 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.
GpuBackend::graph_introspect (cognitive 20) crates/smolvm-cuda/src/host/gpu.rs:2382— GpuBackend::graph_introspect has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 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.
GpuBackend::gpa_procmem (cognitive 17) crates/smolvm-cuda/src/host/gpu.rs:3986— GpuBackend::gpa_procmem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×5
Duplicated block (14 lines × 2) crates/smolvm-agent/src/nsfile.rs:731— crates/smolvm-agent/src/nsfile.rs:731-744 | crates/smolvm-agent/src/nsfile.rs:1063-1076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) crates/smolvm-agent/src/relay.rs:64— crates/smolvm-agent/src/relay.rs:64-77 | crates/smolvm-agent/src/relay.rs:80-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) crates/smolvm-agent/src/storage.rs:1700— crates/smolvm-agent/src/storage.rs:1700-1713 | crates/smolvm-agent/src/storage.rs:1798-1811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) crates/smolvm-cuda/src/host.rs:3978— crates/smolvm-cuda/src/host.rs:3978-3991 | crates/smolvm-cuda/src/host.rs:3998-4011 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/artifact_cache.rs:731— src/artifact_cache.rs:731-744 | src/artifact_cache.rs:781-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 3) crates/smolvm-agent/src/network/linux.rs:605— crates/smolvm-agent/src/network/linux.rs:605-610 | crates/smolvm-agent/src/network/linux.rs:650-655 | crates/smolvm-agent/src/network/linux.rs:718-723 — 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 (6 lines × 3) crates/smolvm-cuda/src/host/gpu.rs:3603— crates/smolvm-cuda/src/host/gpu.rs:3603-3608 | crates/smolvm-cuda/src/host/gpu.rs:3639-3644 | crates/smolvm-cuda/src/host/gpu.rs:3704-3709 — 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 (6 lines × 3) crates/smolvm-network/src/dns_relay.rs:114— crates/smolvm-network/src/dns_relay.rs:114-119 | crates/smolvm-network/src/icmp_relay.rs:113-118 | crates/smolvm-network/src/udp_relay.rs:95-100 — before extracting anything, compare `crates/smolvm-network/src/icmp_relay.rs` and `crates/smolvm-network/src/udp_relay.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 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 (6 lines × 3) src/api/handlers/machines.rs:6341— src/api/handlers/machines.rs:6341-6346 | src/api/handlers/machines.rs:6425-6430 | src/api/handlers/machines.rs:6719-6724 — 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 (6 lines × 3) crates/smolvm-pack/src/extract.rs:1877— crates/smolvm-pack/src/extract.rs:1877-1882 | src/cli/machine.rs:975-980 | src/data/image_source.rs:183-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
smolvm_cuda_shim::cuLaunchKernel (cyclomatic 18) crates/smolvm-cuda-shim/src/lib.rs:3321— smolvm_cuda_shim::cuLaunchKernel 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.
smolvm_cuda_shim::resolve_proc (cyclomatic 18) crates/smolvm-cuda-shim/src/lib.rs:3957— smolvm_cuda_shim::resolve_proc 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.
smolvm_cuda_shim::cuLibraryLoadData (cyclomatic 17) crates/smolvm-cuda-shim/src/lib.rs:2243— smolvm_cuda_shim::cuLibraryLoadData 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.
smolvm_cuda_shim::cuTensorMapEncodeTiled (cyclomatic 17) crates/smolvm-cuda-shim/src/lib.rs:4222— smolvm_cuda_shim::cuTensorMapEncodeTiled 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.
AgentClient::interactive_session (cognitive 42) src/agent/client.rs:2452— AgentClient::interactive_session has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 3 (7 pts), boolean chains 6, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentClient::read_exact_retry (cognitive 38) src/agent/client.rs:3748— AgentClient::read_exact_retry has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (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.
AgentClient::interactive_session_io (cognitive 32) src/agent/client.rs:2917— AgentClient::interactive_session_io has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 3 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AgentClient::receive_stream_to_path (cognitive 17) src/agent/client.rs:3426— AgentClient::receive_stream_to_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) crates/smolvm-agent/src/main.rs:8045— crates/smolvm-agent/src/main.rs:8045-8088 | crates/smolvm-agent/src/main.rs:8097-8311 | crates/smolvm-agent/src/main.rs:8405-8452 | crates/smolvm-agent/src/main.rs:8461-8478 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/api/handlers/exec.rs:68— src/api/handlers/exec.rs:68-219 | src/api/handlers/exec.rs:625-726 | src/api/handlers/machines.rs:3964-4508 | src/api/state.rs:1845-1910 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/api/handlers/machines.rs:6563— src/api/handlers/machines.rs:6563-6583 | src/api/handlers/machines.rs:6620-6791 | src/api/handlers/machines.rs:6817-6940 | src/api/handlers/machines.rs:7295-7399 — 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.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/platform/linux.rs:91— src/platform/linux.rs:91-115 | src/platform/macos.rs:33-63 | src/platform/macos.rs:243-266 | src/platform/windows.rs:30-52 — 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.
Duplicated block (7 lines × 3) crates/smolvm-checkpoint/src/store.rs:1008— crates/smolvm-checkpoint/src/store.rs:1008-1014 | crates/smolvm-checkpoint/src/store.rs:2790-2796 | crates/smolvm-checkpoint/src/store.rs:2963-2969 — 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 (7 lines × 3) crates/smolvm-cuda/src/host/gpu.rs:3597— crates/smolvm-cuda/src/host/gpu.rs:3597-3603 | crates/smolvm-cuda/src/host/gpu.rs:3633-3639 | crates/smolvm-cuda/src/host/gpu.rs:3692-3698 — 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 (7 lines × 3) crates/smolvm-cudart-shim/src/lib.rs:5537— crates/smolvm-cudart-shim/src/lib.rs:5537-5543 | crates/smolvm-cudart-shim/src/lib.rs:5609-5615 | crates/smolvm-cudart-shim/src/lib.rs:5644-5650 — 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 (7 lines × 3) src/api/handlers/machines.rs:5906— src/api/handlers/machines.rs:5906-5912 | src/api/handlers/machines.rs:6018-6024 | src/api/handlers/machines.rs:6363-6369 — 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.
Off the main sequence: smolvm-protocol — smolvm-protocol: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
Off the main sequence: smolvm-cuda — smolvm-cuda: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: smolvm-s3fs — smolvm-s3fs: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: smolvm-pack — smolvm-pack: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Low cohesion: GpuBackend (LCOM4 81) crates/smolvm-cuda/src/host/gpu.rs:97— GpuBackend's methods fall into 81 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 81 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: RunConfig (LCOM4 11) src/agent/client.rs:765— RunConfig's methods fall into 11 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 11 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: KrunFunctions (LCOM4 5) src/agent/krun.rs:42— KrunFunctions's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ApiState (LCOM4 5) src/api/state.rs:68— ApiState's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
AgentManager::start_via_subprocess (cyclomatic 82) src/agent/manager.rs:2509— AgentManager::start_via_subprocess has cyclomatic complexity 82 (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.
AgentManager::wait_for_ready (cyclomatic 24) src/agent/manager.rs:3792— AgentManager::wait_for_ready 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.
AgentManager::ensure_running_with_full_config (cyclomatic 18) src/agent/manager.rs:2019— AgentManager::ensure_running_with_full_config 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.
GpuBackend::cuda_driver_library_call (cyclomatic 78) crates/smolvm-cuda/src/host/gpu.rs:745— GpuBackend::cuda_driver_library_call has cyclomatic complexity 78 (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.
GpuBackend::graph_exec_patch (cyclomatic 34) crates/smolvm-cuda/src/host/gpu.rs:2133— GpuBackend::graph_exec_patch 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.
GpuBackend::gen_lib_call (cyclomatic 21) crates/smolvm-cuda/src/host/gpu.rs:4169— GpuBackend::gen_lib_call 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.
smolvm_pack::extract::safe_unpack_skipping (cyclomatic 72) crates/smolvm-pack/src/extract.rs:986— smolvm_pack::extract::safe_unpack_skipping has cyclomatic complexity 72 (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.
smolvm_pack::extract::extract_sidecar_capped (cyclomatic 27) crates/smolvm-pack/src/extract.rs:2188— smolvm_pack::extract::extract_sidecar_capped has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm_pack::extract::post_process_extraction (cyclomatic 26) crates/smolvm-pack/src/extract.rs:4529— smolvm_pack::extract::post_process_extraction has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AgentClient::interactive_session (cyclomatic 30) src/agent/client.rs:2452— AgentClient::interactive_session 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.
AgentClient::interactive_session_io (cyclomatic 24) src/agent/client.rs:2917— AgentClient::interactive_session_io 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.
AgentClient::read_exact_retry (cyclomatic 17) src/agent/client.rs:3748— AgentClient::read_exact_retry 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.
smolvm_checkpoint::store::prune_in_batches (cyclomatic 27) crates/smolvm-checkpoint/src/store.rs:1743— smolvm_checkpoint::store::prune_in_batches has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
smolvm_checkpoint::store::materialize_cached (cyclomatic 23) crates/smolvm-checkpoint/src/store.rs:1998— smolvm_checkpoint::store::materialize_cached 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.
smolvm_checkpoint::store::store_chunk (cyclomatic 16) crates/smolvm-checkpoint/src/store.rs:1540— smolvm_checkpoint::store::store_chunk has cyclomatic complexity 16 (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.
smolvm_cudart_shim::module_image_len (cyclomatic 22) crates/smolvm-cudart-shim/src/lib.rs:4564— smolvm_cudart_shim::module_image_len 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.
smolvm_cudart_shim::do_memcpy_inner (cyclomatic 20) crates/smolvm-cudart-shim/src/lib.rs:2033— smolvm_cudart_shim::do_memcpy_inner 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.
smolvm_cudart_shim::cuda_host_malloc (cyclomatic 16) crates/smolvm-cudart-shim/src/lib.rs:1823— smolvm_cudart_shim::cuda_host_malloc 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.
S3Fs::dispatch (cognitive 170) crates/smolvm-s3fs/src/fs.rs:710— S3Fs::dispatch has cognitive complexity 170 (threshold 15). Drivers by points: if/else 57 (125 pts), match/switch 17 (36 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 90). 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.
S3Fs::remember_listing (cognitive 19) crates/smolvm-s3fs/src/fs.rs:273— S3Fs::remember_listing has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
S3Fs::small_bytes (cognitive 17) crates/smolvm-s3fs/src/fs.rs:356— S3Fs::small_bytes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client::ring_pop_response (cognitive 62) crates/smolvm-cuda/src/client.rs:446— Client::ring_pop_response has cognitive complexity 62 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 6 (19 pts), match/switch 1 (2 pts) (nesting depth added 44). 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.
Client::list_dir_snapshot (cognitive 36) crates/smolvm-s3fs/src/s3.rs:340— Client::list_dir_snapshot has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Client::drain (cognitive 21) crates/smolvm-cuda/src/client.rs:599— Client::drain has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (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.
PackCreateCmd::run (cognitive 40) src/cli/pack.rs:683— PackCreateCmd::run has cognitive complexity 40 (threshold 15). Drivers by points: if/else 21 (31 pts), loops 2 (4 pts), match/switch 3 (4 pts), boolean chains 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.
PackCreateCmd::export_layer_to_file (cognitive 19) src/cli/pack.rs:1507— PackCreateCmd::export_layer_to_file has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackCreateCmd::pack_from_vm (cognitive 16) src/cli/pack.rs:1075— PackCreateCmd::pack_from_vm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 1 (2 pts), boolean chains 1 (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.
RolloutExecutor::publish_device_policy (cognitive 27) src/api/rollout.rs:1102— RolloutExecutor::publish_device_policy has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 1 (4 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RolloutExecutor::publish_policy (cognitive 17) src/api/rollout.rs:967— RolloutExecutor::publish_policy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 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.
RolloutExecutor::generate (cognitive 16) src/api/rollout.rs:1448— RolloutExecutor::generate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ForkPoolController::fill_pool (cognitive 26) src/api/pool_controller.rs:541— ForkPoolController::fill_pool has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 7 (11 pts), loops 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.
ForkPoolController::run (cognitive 17) src/api/pool_controller.rs:123— ForkPoolController::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 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.
ForkPoolController::reconcile_once (cognitive 17) src/api/pool_controller.rs:253— ForkPoolController::reconcile_once has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 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.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×3
Duplicated block (11–12 lines × 2) crates/smolvm-agent/src/live_resources.rs:265— crates/smolvm-agent/src/live_resources.rs:265-276 | crates/smolvm-agent/src/live_resources.rs:340-350 — 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–12 lines × 2) crates/smolvm-agent/src/publish_socket.rs:357— crates/smolvm-agent/src/publish_socket.rs:357-368 | crates/smolvm-agent/src/publish_socket.rs:371-381 — 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–12 lines × 2) src/cli/pack_run.rs:809— src/cli/pack_run.rs:809-820 | src/cli/pack_run.rs:2005-2015 — 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–9 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:410— crates/smolvm-cuda-shim/src/lib.rs:410-417 | crates/smolvm-cuda-shim/src/lib.rs:430-438 — 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–9 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:5336— crates/smolvm-cudart-shim/src/lib.rs:5336-5343 | crates/smolvm-cudart-shim/src/lib.rs:5362-5370 — 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–9 lines × 2) crates/smolvm-registry/src/token_store.rs:137— crates/smolvm-registry/src/token_store.rs:137-144 | src/portable_checkpoint.rs:3893-3901 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 3) src/cli/pack.rs:1842— src/cli/pack.rs:1842-1846 | src/cli/pack.rs:1892-1896 | src/cli/pack.rs:2142-2146 — 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 (5 lines × 3) src/cli/pack_run.rs:787— src/cli/pack_run.rs:787-792 | src/cli/pack_run.rs:1990-1994 | src/cli/pack_run.rs:2492-2497 — 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 (5 lines × 3) crates/smolvm-checkpoint/src/store.rs:1725— crates/smolvm-checkpoint/src/store.rs:1725-1730 | crates/smolvm-checkpoint/src/store.rs:1935-1940 | src/api/state.rs:345-349 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
AC3 · Page structure· Page without a main landmark · ×2
Page without a main landmark packaging/repos/pacman-arch-index.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
Page without a main landmark src/agent/vnc_client.html:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
S3Fs::dispatch (cyclomatic 99) crates/smolvm-s3fs/src/fs.rs:710— S3Fs::dispatch 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.
S3Fs::remember_listing (cyclomatic 16) crates/smolvm-s3fs/src/fs.rs:273— S3Fs::remember_listing 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.
CreateCmd::run_from_smolmachine (cyclomatic 54) src/cli/machine.rs:5067— CreateCmd::run_from_smolmachine has cyclomatic complexity 54 (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.
CreateCmd::run (cyclomatic 23) src/cli/machine.rs:4849— CreateCmd::run has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: MachineCmd::run (cyclomatic 31) 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.
ServeStartCmd::run_server (cyclomatic 25) src/cli/serve.rs:420— ServeStartCmd::run_server 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.
ServeStartCmd::run (cyclomatic 19) src/cli/serve.rs:225— ServeStartCmd::run has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Client::ring_pop_response (cyclomatic 20) crates/smolvm-cuda/src/client.rs:446— Client::ring_pop_response 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.
Client::list_dir_snapshot (cyclomatic 20) crates/smolvm-s3fs/src/s3.rs:340— Client::list_dir_snapshot 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.
EmbeddedRuntime::pause_machine_inner (cyclomatic 20) src/embedded/runtime.rs:221— EmbeddedRuntime::pause_machine_inner 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.
EmbeddedRuntime::resume_machine_inner (cyclomatic 18) src/embedded/runtime.rs:374— EmbeddedRuntime::resume_machine_inner 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.
CreateCmd::run_from_smolmachine (cognitive 73) src/cli/machine.rs:5067— CreateCmd::run_from_smolmachine has cognitive complexity 73 (threshold 15). Drivers by points: if/else 44 (54 pts), boolean chains 11, match/switch 7, loops 1 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
CreateCmd::run (cognitive 23) src/cli/machine.rs:4849— CreateCmd::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (18 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (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.
EmbeddedRuntime::pause_machine_inner (cognitive 36) src/embedded/runtime.rs:221— EmbeddedRuntime::pause_machine_inner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 4, match/switch 1 (nesting depth added 17). 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.
EmbeddedRuntime::resume_machine_inner (cognitive 30) src/embedded/runtime.rs:374— EmbeddedRuntime::resume_machine_inner has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (28 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.
smolvm_shim::engine::pump_loop (cognitive 33) crates/smolvm-shim/src/engine.rs:522— smolvm_shim::engine::pump_loop has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 3 (8 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_shim::engine::materialize_bind_mounts (cognitive 21) crates/smolvm-shim/src/engine.rs:1100— smolvm_shim::engine::materialize_bind_mounts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (5 pts), match/switch 1 (3 pts), boolean chains 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.
ApiState::load_persisted_machines (cognitive 32) src/api/state.rs:576— ApiState::load_persisted_machines has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 3 (7 pts), boolean chains 1, loops 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.
ApiState::real_utilization (cognitive 29) src/api/state.rs:1022— ApiState::real_utilization has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 1 (2 pts), loops 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.
CheckpointStream::append (cognitive 30) crates/smolvm-pack/src/checkpoint_stream.rs:206— CheckpointStream::append has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CheckpointStream::read (cognitive 17) crates/smolvm-pack/src/checkpoint_stream.rs:28— CheckpointStream::read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, 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.
MachoFile::shift_offsets_after (cognitive 30) crates/smolvm-pack/src/macho.rs:700— MachoFile::shift_offsets_after has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (22 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MachoFile::sign_adhoc (cognitive 21) crates/smolvm-pack/src/macho.rs:770— MachoFile::sign_adhoc has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5, boolean chains 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.
Writer::ingest_chunks (cognitive 26) crates/smolvm-checkpoint/src/store.rs:284— Writer::ingest_chunks has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 3 (9 pts), loops 2 (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.
Writer::retain_generations_from (cognitive 25) crates/smolvm-checkpoint/src/store.rs:717— Writer::retain_generations_from has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts), match/switch 1 (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.
ServeStartCmd::run (cognitive 26) src/cli/serve.rs:225— ServeStartCmd::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServeStartCmd::run_server (cognitive 26) src/cli/serve.rs:420— ServeStartCmd::run_server has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), match/switch 5, boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PackPruneCmd::prune_cache_dir (cognitive 20) src/cli/pack.rs:1724— PackPruneCmd::prune_cache_dir has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (5 pts), loops 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.
PackPruneCmd::run (cognitive 16) src/cli/pack.rs:1636— PackPruneCmd::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) crates/smolvm-registry/src/client.rs:390— crates/smolvm-registry/src/client.rs:390-422 | crates/smolvm-registry/src/client.rs:704-730 | crates/smolvm-registry/src/client.rs:798-817 | crates/smolvm-registry/src/client.rs:1116-1140 | crates/smolvm-registry/src/peer.rs:154-171 — These 5 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 5 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 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) src/api/device_handoff.rs:322— src/api/device_handoff.rs:322-349 | src/cuda_daemon.rs:495-526 | src/cuda_daemon.rs:528-575 | src/cuda_daemon.rs:4342-4374 | src/cuda_daemon.rs:4381-4425 — These 5 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 5 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 5 times.
Duplicated block (18 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:176— crates/smolvm-cuda-shim/src/lib.rs:176-193 | crates/smolvm-cudart-shim/src/lib.rs:141-158 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) src/agent/launcher.rs:2948— src/agent/launcher.rs:2948-2965 | src/agent/launcher_dynamic.rs:1065-1082 — before extracting anything, compare `src/agent/launcher.rs` and `src/agent/launcher_dynamic.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 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 (15–16 lines × 2) crates/smolvm-registry/src/client.rs:446— crates/smolvm-registry/src/client.rs:446-461 | crates/smolvm-registry/src/client.rs:585-599 — 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–16 lines × 2) src/cli/pack_run.rs:836— src/cli/pack_run.rs:836-851 | src/cli/pack_run.rs:2028-2042 — 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–14 lines × 3) crates/smolvm-registry/src/client.rs:334— crates/smolvm-registry/src/client.rs:334-347 | crates/smolvm-registry/src/client.rs:455-468 | crates/smolvm-registry/src/client.rs:593-605 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–14 lines × 3) src/cli/pack_run.rs:835— src/cli/pack_run.rs:835-848 | src/cli/pack_run.rs:2027-2039 | src/cli/pack_run.rs:2425-2437 — 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–14 lines × 2) crates/smolvm-agent/src/main.rs:8048— crates/smolvm-agent/src/main.rs:8048-8058 | crates/smolvm-agent/src/main.rs:8100-8113 — 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–14 lines × 2) crates/smolvm-agent/src/vsock.rs:44— crates/smolvm-agent/src/vsock.rs:44-57 | crates/smolvm-agent/src/vsock.rs:205-215 — 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 (12–13 lines × 2) crates/smolvm-agent/src/main.rs:4266— crates/smolvm-agent/src/main.rs:4266-4277 | crates/smolvm-agent/src/main.rs:5925-5937 — 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 (12–13 lines × 2) crates/smolvm-pack/src/assets.rs:740— crates/smolvm-pack/src/assets.rs:740-752 | crates/smolvm-pack/src/assets.rs:762-773 — 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–11 lines × 2) crates/smolvm-cudart-shim/src/lib.rs:2580— crates/smolvm-cudart-shim/src/lib.rs:2580-2588 | crates/smolvm-cudart-shim/src/lib.rs:2707-2717 — 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–11 lines × 2) src/api/handlers/machines.rs:2212— src/api/handlers/machines.rs:2212-2222 | src/api/handlers/machines.rs:2231-2239 — 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–11 lines × 2) crates/smolvm-pack/src/assets.rs:1820— crates/smolvm-pack/src/assets.rs:1820-1830 | crates/smolvm-pack/src/extract.rs:5400-5409 — 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–11 lines × 2) src/cli/pack.rs:1040— src/cli/pack.rs:1040-1050 | src/cli/pack.rs:1189-1198 — 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 × 3) src/cuda_daemon.rs:498— src/cuda_daemon.rs:498-506 | src/cuda_daemon.rs:4346-4354 | src/cuda_daemon.rs:4385-4393 — 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 (9 lines × 3) src/embedded/runtime.rs:545— src/embedded/runtime.rs:545-553 | src/embedded/runtime.rs:607-615 | src/embedded/runtime.rs:654-662 — 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.
Outbound HTTP without resilience REDACTED:24— `urllib.request.urlopen(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience src/api/handlers/exec.rs:1387— `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Sync-over-async blocking src/cli/serve.rs:420— `run_server` 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 src/cli/serve.rs:756— `serve_tcp_tls` 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.
AC1 · Text alternatives· <canvas> without a text alternative · ×1
<canvas> without a text alternative src/agent/vnc_client.html:22— A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge. What was searched, so you can tell an absence from a miss: the 2 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
RunCmd::run (cyclomatic 125) src/cli/machine.rs:1384— RunCmd::run has cyclomatic complexity 125 (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.
UpdateCmd::run (cyclomatic 70) src/cli/machine.rs:7127— UpdateCmd::run has cyclomatic complexity 70 (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.
PoolAdmissionState::observe (cyclomatic 34) src/api/admission.rs:251— PoolAdmissionState::observe 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.
LibkrunVm::exec_vm (cyclomatic 34) src/vm/backend/libkrun.rs:101— LibkrunVm::exec_vm 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.
State::forward (cyclomatic 30) crates/smolvm-credentials/src/intercept.rs:381— State::forward 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.
MonitorCmd::run (cyclomatic 29) src/cli/machine.rs:8052— MonitorCmd::run has cyclomatic complexity 29 (threshold 15). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MachineCmd::run (cyclomatic 31) 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.
VmRecord::updated_egress (cyclomatic 29) src/config.rs:1487— VmRecord::updated_egress 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.
PackRunCmd::run (cyclomatic 27) src/cli/pack_run.rs:472— PackRunCmd::run has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PackCreateCmd::run (cyclomatic 26) src/cli/pack.rs:683— PackCreateCmd::run has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CredentialPolicy::validate (cyclomatic 25) crates/smolvm-protocol/src/credentials.rs:171— CredentialPolicy::validate 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.
NvmlSampler::new (cyclomatic 22) src/api/admission.rs:1034— NvmlSampler::new 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.
smolvm_oci_layer::extract_oci_layer_with_size (cyclomatic 21) crates/smolvm-oci-layer/src/lib.rs:243— smolvm_oci_layer::extract_oci_layer_with_size 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.
smolvm_shim::engine::pump_loop (cyclomatic 21) crates/smolvm-shim/src/engine.rs:522— smolvm_shim::engine::pump_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.
Reference::parse (cyclomatic 21) src/registry.rs:455— Reference::parse 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.
ForkPoolController::fill_pool (cyclomatic 20) src/api/pool_controller.rs:541— ForkPoolController::fill_pool has cyclomatic complexity 20 (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.
SmolvmDb::claim_fork_pool_slot (cyclomatic 20) src/db.rs:1545— SmolvmDb::claim_fork_pool_slot 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.
ForkCmd::run (cyclomatic 19) src/cli/machine.rs:6044— ForkCmd::run has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: MachineCmd::run (cyclomatic 31) 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.
CudnnBackend::dispatch (cyclomatic 18) crates/smolvm-cuda/src/host/gpu.rs:2889— CudnnBackend::dispatch 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.
LaunchFeatures::with_packed_layers_with_mode (cyclomatic 17) src/agent/launcher.rs:437— LaunchFeatures::with_packed_layers_with_mode 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.
TcpRelayTable::relay_data (cyclomatic 16) crates/smolvm-network/src/tcp_relay.rs:701— TcpRelayTable::relay_data 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.
RolloutExecutor::publish_device_policy (cyclomatic 16) src/api/rollout.rs:1102— RolloutExecutor::publish_device_policy 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.
RegistriesCmd::run (cyclomatic 16) src/cli/config.rs:121— RegistriesCmd::run 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.
RunCmd::run (cognitive 213) src/cli/machine.rs:1384— RunCmd::run has cognitive complexity 213 (threshold 15). Drivers by points: if/else 90 (157 pts), boolean chains 46, match/switch 6 (9 pts), loops 1 (nesting depth added 70). 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.
UpdateCmd::run (cognitive 100) src/cli/machine.rs:7127— UpdateCmd::run has cognitive complexity 100 (threshold 15). Drivers by points: if/else 47 (68 pts), loops 14 (20 pts), boolean chains 9, match/switch 2 (3 pts) (nesting depth added 28). 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.
MonitorCmd::run (cognitive 66) src/cli/machine.rs:8052— MonitorCmd::run has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (47 pts), match/switch 4 (15 pts), boolean chains 3, loops 1 (nesting depth added 37). Of this number, 65 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LibkrunVm::exec_vm (cognitive 58) src/vm/backend/libkrun.rs:101— LibkrunVm::exec_vm has cognitive complexity 58 (threshold 15). Drivers by points: if/else 33 (50 pts), loops 3, match/switch 1 (3 pts), boolean chains 2 (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.
smolvm_oci_layer::extract_oci_layer_with_size (cognitive 52) crates/smolvm-oci-layer/src/lib.rs:243— smolvm_oci_layer::extract_oci_layer_with_size has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (44 pts), match/switch 2 (6 pts), loops 2 (nesting depth added 33). 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.
PoolAdmissionState::observe (cognitive 48) src/api/admission.rs:251— PoolAdmissionState::observe has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 11 (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.
State::forward (cognitive 46) crates/smolvm-credentials/src/intercept.rs:381— State::forward has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CredentialPolicy::validate (cognitive 43) crates/smolvm-protocol/src/credentials.rs:171— CredentialPolicy::validate has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 4 (6 pts), boolean chains 5 (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.
VmRecord::updated_egress (cognitive 40) src/config.rs:1487— VmRecord::updated_egress has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 8 (9 pts), boolean chains 6 (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.
NvmlSampler::new (cognitive 37) src/api/admission.rs:1034— NvmlSampler::new has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4, loops 2 (3 pts), match/switch 2 (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.
PackRunCmd::run (cognitive 37) src/cli/pack_run.rs:472— PackRunCmd::run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 4, match/switch 3 (4 pts), loops 1 (2 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.
CudnnBackend::dispatch (cognitive 32) crates/smolvm-cuda/src/host/gpu.rs:2889— CudnnBackend::dispatch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 2 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 17). 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.
LaunchFeatures::with_packed_layers_with_mode (cognitive 32) src/agent/launcher.rs:437— LaunchFeatures::with_packed_layers_with_mode has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Reference::parse (cognitive 32) src/registry.rs:455— Reference::parse has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 3, loops 2 (3 pts), match/switch 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.
TcpRelayTable::relay_data (cognitive 30) crates/smolvm-network/src/tcp_relay.rs:701— TcpRelayTable::relay_data has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), match/switch 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PruneCmd::run (cognitive 30) src/cli/machine.rs:7690— PruneCmd::run has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
vnc_client.html.updateLoop (cognitive 29) src/agent/vnc_client.html:189— vnc_client.html.updateLoop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (8 pts), loops 2 (3 pts), boolean chains 2 (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.
SmolvmDb::claim_fork_pool_slot (cognitive 27) src/db.rs:1545— SmolvmDb::claim_fork_pool_slot has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (20 pts), loops 3 (4 pts), boolean chains 2, match/switch 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.
RegistriesCmd::run (cognitive 26) src/cli/config.rs:121— RegistriesCmd::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (3 pts), boolean chains 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.
InteractiveFrame::read_next (cognitive 24) crates/smolvm-agent/src/main.rs:5977— InteractiveFrame::read_next has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AssetCollector::compress_with (cognitive 23) crates/smolvm-pack/src/assets.rs:1210— AssetCollector::compress_with has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (7 pts), boolean chains 3 (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.
ExecCmd::run (cognitive 23) src/cli/machine.rs:4146— ExecCmd::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 2 (3 pts), boolean chains 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.
CheckpointLogCmd::run (cognitive 22) src/cli/pack.rs:223— CheckpointLogCmd::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
smolvm_cuda_codegen::gen_guest (cognitive 21) crates/smolvm-cuda-codegen/src/main.rs:732— smolvm_cuda_codegen::gen_guest has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (6 pts), match/switch 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HostProxy::from_scutil (cognitive 21) src/cli/host_network.rs:170— HostProxy::from_scutil has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BlobCache::list_artifacts (cognitive 20) crates/smolvm-registry/src/cache.rs:288— BlobCache::list_artifacts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (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.
check-krun-init-static.embedded_inits (cognitive 20) scripts/check-krun-init-static.py:29— check-krun-init-static.embedded_inits has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, 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.
smolvm_registry::pull::download_with_resume (cognitive 19) crates/smolvm-registry/src/pull.rs:465— smolvm_registry::pull::download_with_resume has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 4, match/switch 1 (2 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.
WriteSession::finalize (cognitive 18) crates/smolvm-agent/src/main.rs:3399— WriteSession::finalize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 4). 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.
HostMount::validate_with_system_mounts (cognitive 18) src/data/storage.rs:272— HostMount::validate_with_system_mounts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 3, 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.
RegistryClient::get_token (cognitive 17) crates/smolvm-registry/src/client.rs:1405— RegistryClient::get_token has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Keep::from_records (cognitive 17) src/checkpoint_retention.rs:203— Keep::from_records has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ForkCmd::run (cognitive 17) src/cli/machine.rs:6044— ForkCmd::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 3, match/switch 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SmolSettings::load_from_disk (cognitive 17) src/settings.rs:126— SmolSettings::load_from_disk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 1 (nesting depth added 10). 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.
WsStream::next_payload (cognitive 16) src/agent/websocket.rs:72— WsStream::next_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 3 (6 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImagesCmd::run (cognitive 16) src/cli/machine.rs:7584— ImagesCmd::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TooManyFunctions: smolvm_nvml_shim crates/smolvm-nvml-shim/src/lib.rs:40— TooManyFunctions — 34 free functions. The bar is 30 free functions; 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
Near-duplicate member pair (83 shared lines) src/api/rollout.rs:970— src/api/rollout.rs:970-1099 | src/api/rollout.rs:1105-1271 — These two members are variants of one another: 83 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.
Near-duplicate member pair (80 shared lines) crates/smolvm-agent/src/main.rs:6037— crates/smolvm-agent/src/main.rs:6037-6332 | crates/smolvm-agent/src/main.rs:6344-6588 — These two members are variants of one another: 80 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.
Near-duplicate member pair (69 shared lines) src/cli/pack_run.rs:1861— src/cli/pack_run.rs:1861-2097 | src/cli/pack_run.rs:2271-2540 — These two members are variants of one another: 69 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.
Near-duplicate member pair (31 shared lines) crates/smolvm-agent/src/live_resources.rs:234— crates/smolvm-agent/src/live_resources.rs:234-291 | crates/smolvm-agent/src/live_resources.rs:310-363 — 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· Edited copy of a member (13 corresponding lines) · ×1
Edited copy of a member (13 corresponding lines) crates/smolvm-cudart-shim/src/lib.rs:5332— crates/smolvm-cudart-shim/src/lib.rs:5332-5348 | crates/smolvm-cudart-shim/src/lib.rs:5358-5402 — 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.
Duplicated block (71–82 lines × 2) src/agent/manager.rs:2047— src/agent/manager.rs:2047-2128 | src/agent/manager.rs:3268-3338 — 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 (62 lines × 2) src/config.rs:969— src/config.rs:969-1030 | src/config.rs:1070-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 (35–54 lines × 2) crates/smolvm-cuda-codegen/src/main.rs:167— crates/smolvm-cuda-codegen/src/main.rs:167-201 | crates/smolvm-cuda-codegen/src/main.rs:257-310 — 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 (35–45 lines × 2) crates/smolvm-agent/src/publish_socket.rs:324— crates/smolvm-agent/src/publish_socket.rs:324-358 | crates/smolvm-agent/src/relay.rs:22-66 — 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 (42 lines × 2) src/api/rollout.rs:1046— src/api/rollout.rs:1046-1087 | src/api/rollout.rs:1218-1259 — 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 (38 lines × 2) crates/smolvm-network/src/icmp_relay.rs:220— crates/smolvm-network/src/icmp_relay.rs:220-257 | crates/smolvm-network/src/udp_relay.rs:194-231 — before extracting anything, compare `crates/smolvm-network/src/icmp_relay.rs` and `crates/smolvm-network/src/udp_relay.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 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 (34–38 lines × 2) src/cli/machine.rs:2389— src/cli/machine.rs:2389-2426 | src/cli/machine.rs:2538-2571 — 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 (25–35 lines × 2) src/cuda_daemon.rs:1741— src/cuda_daemon.rs:1741-1765 | src/cuda_daemon.rs:1862-1896 — 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 (30–31 lines × 2) crates/smolvm-agent/src/main.rs:5253— crates/smolvm-agent/src/main.rs:5253-5282 | crates/smolvm-agent/src/main.rs:5820-5850 — 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 (29–30 lines × 2) crates/smolvm-registry/src/client.rs:339— crates/smolvm-registry/src/client.rs:339-367 | crates/smolvm-registry/src/client.rs:460-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.
Duplicated block (30 lines × 2) src/cli/pack_run.rs:1909— src/cli/pack_run.rs:1909-1938 | src/cli/pack_run.rs:2339-2368 — 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 (20–29 lines × 2) src/api/handlers/exec.rs:69— src/api/handlers/exec.rs:69-97 | src/api/handlers/exec.rs:246-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.
Duplicated block (26–28 lines × 2) crates/smolvm-agent/src/storage.rs:5851— crates/smolvm-agent/src/storage.rs:5851-5878 | crates/smolvm-agent/src/storage.rs:6068-6093 — 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 (26–27 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:196— crates/smolvm-cuda-shim/src/lib.rs:196-222 | crates/smolvm-cudart-shim/src/lib.rs:161-186 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (27 lines × 2) src/config.rs:941— src/config.rs:941-967 | src/config.rs:1042-1068 — 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 (23–26 lines × 2) crates/smolvm-pack/src/extract.rs:5668— crates/smolvm-pack/src/extract.rs:5668-5693 | crates/smolvm-pack/src/extract.rs:5719-5741 — 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–25 lines × 2) src/agent/manager.rs:3156— src/agent/manager.rs:3156-3180 | src/cli/pack_run.rs:163-179 — 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 (24 lines × 2) crates/smolvm-pack/src/extract.rs:28— crates/smolvm-pack/src/extract.rs:28-51 | src/disk_utils.rs:462-485 — 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 (21–24 lines × 2) crates/smolvm-registry/src/client.rs:856— crates/smolvm-registry/src/client.rs:856-879 | crates/smolvm-registry/src/client.rs:950-970 — 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 (23 lines × 2) src/api/rollout.rs:995— src/api/rollout.rs:995-1017 | src/api/rollout.rs:1138-1160 — 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 (16–22 lines × 3) crates/smolvm-cudart-shim/src/lib.rs:5888— crates/smolvm-cudart-shim/src/lib.rs:5888-5903 | crates/smolvm-cudart-shim/src/lib.rs:5943-5958 | crates/smolvm-cudart-shim/src/lib.rs:6019-6040 — 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 (21–22 lines × 2) crates/smolvm-registry/src/client.rs:1285— crates/smolvm-registry/src/client.rs:1285-1306 | crates/smolvm-registry/src/client.rs:1369-1389 — 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 (21 lines × 2) crates/smolvm-cuda/src/host.rs:1346— crates/smolvm-cuda/src/host.rs:1346-1366 | crates/smolvm-cuda/src/host.rs:1384-1404 — 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 (18–21 lines × 2) src/disk_utils.rs:250— src/disk_utils.rs:250-267 | src/disk_utils.rs:277-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) crates/smolvm-agent/src/main.rs:3978— crates/smolvm-agent/src/main.rs:3978-3997 | crates/smolvm-agent/src/main.rs:4332-4353 — 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 (16–19 lines × 2) src/cli/machine.rs:1526— src/cli/machine.rs:1526-1541 | src/cli/machine.rs:4940-4958 — 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–18 lines × 2) crates/smolvm-agent/src/main.rs:6102— crates/smolvm-agent/src/main.rs:6102-6119 | crates/smolvm-agent/src/main.rs:6400-6416 — 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) crates/smolvm-pack/src/extract.rs:1840— crates/smolvm-pack/src/extract.rs:1840-1857 | src/api/handlers/machines.rs:235-249 — before extracting anything, compare `crates/smolvm-pack/src/extract.rs` and `src/api/handlers/machines.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (13–17 lines × 3) src/cli/pack_run.rs:860— src/cli/pack_run.rs:860-876 | src/cli/pack_run.rs:2047-2059 | src/cli/pack_run.rs:2500-2512 — 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 (16–17 lines × 3) src/cuda_daemon.rs:1746— src/cuda_daemon.rs:1746-1761 | src/cuda_daemon.rs:1810-1826 | src/cuda_daemon.rs:1867-1883 — 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 (15–17 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:1116— crates/smolvm-cuda-shim/src/lib.rs:1116-1130 | crates/smolvm-cuda-shim/src/lib.rs:1336-1352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14–17 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:3639— crates/smolvm-cuda/src/host/gpu.rs:3639-3655 | crates/smolvm-cuda/src/host/gpu.rs:3704-3717 — 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 (16–17 lines × 2) crates/smolvm-pack/src/extract.rs:70— crates/smolvm-pack/src/extract.rs:70-86 | src/agent/fork.rs:141-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10–17 lines × 2) src/image_store.rs:43— src/image_store.rs:43-52 | src/image_store.rs:162-178 — 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 (3–16 lines × 4) src/platform/linux.rs:93— src/platform/linux.rs:93-108 | src/platform/macos.rs:54-56 | src/platform/macos.rs:244-259 | src/platform/windows.rs:31-45 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10–16 lines × 2) crates/smolvm-cuda-shim/src/lib.rs:1404— crates/smolvm-cuda-shim/src/lib.rs:1404-1419 | crates/smolvm-cudart-shim/src/lib.rs:4570-4579 — before extracting anything, compare `crates/smolvm-cuda-shim/src/lib.rs` and `crates/smolvm-cudart-shim/src/lib.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–16 lines × 2) crates/smolvm-pack/src/extract.rs:2210— crates/smolvm-pack/src/extract.rs:2210-2225 | crates/smolvm-pack/src/extract.rs:5420-5430 — 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 (3–16 lines × 3) crates/smolvm-pack/src/extract.rs:4289— crates/smolvm-pack/src/extract.rs:4289-4304 | crates/smolvm-pack/src/extract.rs:4333-4346 | crates/smolvm-pack/src/extract.rs:5446-5448 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13–16 lines × 2) crates/smolvm-registry/src/pull.rs:512— crates/smolvm-registry/src/pull.rs:512-527 | crates/smolvm-registry/src/pull.rs:724-736 — 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 (12–15 lines × 2) src/portable_checkpoint.rs:5509— src/portable_checkpoint.rs:5509-5523 | src/portable_checkpoint.rs:5557-5568 — 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 (12–14 lines × 2) src/dns_filter.rs:200— src/dns_filter.rs:200-213 | src/dns_filter.rs:217-228 — 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 (12–13 lines × 3) crates/smolvm-cuda/src/host.rs:4321— crates/smolvm-cuda/src/host.rs:4321-4332 | crates/smolvm-cuda/src/host.rs:4361-4372 | crates/smolvm-cuda/src/host.rs:4380-4392 — 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–13 lines × 2) crates/smolvm-cuda/src/host/gpu.rs:3753— crates/smolvm-cuda/src/host/gpu.rs:3753-3763 | crates/smolvm-cuda/src/host/gpu.rs:3770-3782 — 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–12 lines × 4) crates/smolvm-agent/src/main.rs:8052— crates/smolvm-agent/src/main.rs:8052-8060 | crates/smolvm-agent/src/main.rs:8104-8115 | crates/smolvm-agent/src/main.rs:8409-8417 | crates/smolvm-agent/src/main.rs:8462-8470 — 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 (11–12 lines × 3) crates/smolvm-agent/src/crun.rs:374— crates/smolvm-agent/src/crun.rs:374-385 | crates/smolvm-agent/src/crun.rs:444-454 | crates/smolvm-agent/src/crun.rs:496-506 — 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 (12 lines × 3) crates/smolvm-agent/src/publish_socket.rs:256— crates/smolvm-agent/src/publish_socket.rs:256-267 | crates/smolvm-agent/src/storage.rs:828-839 | crates/smolvm-agent/src/storage.rs:866-877 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (2–12 lines × 3) crates/smolvm-agent/src/attach.rs:259— crates/smolvm-agent/src/attach.rs:259-269 | crates/smolvm-agent/src/nsfile.rs:237-248 | crates/smolvm-agent/src/pod.rs:786-787 — 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.
Duplicated block (8–12 lines × 2) src/api/handlers/machines.rs:7656— src/api/handlers/machines.rs:7656-7667 | src/data/pack_ref.rs:232-239 — 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–10 lines × 5) crates/smolvm-registry/src/client.rs:397— crates/smolvm-registry/src/client.rs:397-406 | crates/smolvm-registry/src/client.rs:713-722 | crates/smolvm-registry/src/client.rs:805-814 | crates/smolvm-registry/src/client.rs:1128-1136 | crates/smolvm-registry/src/peer.rs:158-166 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9–10 lines × 4) crates/smolvm-s3fs/src/fs.rs:842— crates/smolvm-s3fs/src/fs.rs:842-851 | crates/smolvm-s3fs/src/fs.rs:992-1000 | crates/smolvm-s3fs/src/fs.rs:1019-1028 | crates/smolvm-s3fs/src/fs.rs:1043-1051 — 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 (8–10 lines × 2) crates/smolvm-agent/src/crun.rs:486— crates/smolvm-agent/src/crun.rs:486-495 | crates/smolvm-agent/src/crun.rs:550-557 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9–10 lines × 2) crates/smolvm-registry/src/client.rs:496— crates/smolvm-registry/src/client.rs:496-504 | crates/smolvm-registry/src/client.rs:656-665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7–8 lines × 5) crates/smolvm-s3fs/src/fs.rs:714— crates/smolvm-s3fs/src/fs.rs:714-720 | crates/smolvm-s3fs/src/fs.rs:845-852 | crates/smolvm-s3fs/src/fs.rs:995-1001 | crates/smolvm-s3fs/src/fs.rs:1022-1029 | crates/smolvm-s3fs/src/fs.rs:1046-1052 — all 5 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 (8 lines × 4) src/api/handlers/exec.rs:114— src/api/handlers/exec.rs:114-121 | src/api/handlers/exec.rs:175-182 | src/api/handlers/exec.rs:654-661 | src/api/state.rs:1870-1877 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (4–8 lines × 3) src/api/device_handoff.rs:329— src/api/device_handoff.rs:329-336 | src/cuda_daemon.rs:504-511 | src/cuda_daemon.rs:4357-4360 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (6–7 lines × 3) src/api/device_handoff.rs:328— src/api/device_handoff.rs:328-333 | src/cuda_daemon.rs:502-508 | src/cuda_daemon.rs:537-542 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (2–7 lines × 3) crates/smolvm-pack/src/extract.rs:3598— crates/smolvm-pack/src/extract.rs:3598-3604 | crates/smolvm-pack/src/extract.rs:3699-3700 | crates/smolvm-pack/src/extract.rs:4178-4184 — 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 (6 lines × 4) src/api/handlers/machines.rs:6566— src/api/handlers/machines.rs:6566-6571 | src/api/handlers/machines.rs:6627-6633 | src/api/handlers/machines.rs:6824-6830 | src/api/handlers/machines.rs:7298-7304 — 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 (5–6 lines × 2) src/agent/fork.rs:1564— src/agent/fork.rs:1564-1568 | src/agent/fork.rs:1574-1579 — 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 (3–5 lines × 4) src/platform/linux.rs:111— src/platform/linux.rs:111-115 | src/platform/macos.rs:56-58 | src/platform/macos.rs:262-266 | src/platform/windows.rs:48-52 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (13 lines × 3) src/cuda_daemon.rs:1722— src/cuda_daemon.rs:1722-1734 | src/cuda_daemon.rs:1787-1799 | src/cuda_daemon.rs:1843-1855 — 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 (10 lines × 3) src/artifact_cache.rs:630— src/artifact_cache.rs:630-639 | src/artifact_cache.rs:740-749 | src/artifact_cache.rs:790-799 — 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.
Weak hash algorithm src/agent/websocket.rs:33— MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
Interpolated log message defeats structured logging src/cuda_daemon.rs:1986— `info!` at line 1986 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/cuda_host.rs:556— `info!` at line 556 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/internal_boot.rs:680— `warn!` at line 680 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm_exit.rs:213— `info!` at line 213 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm_exit.rs:215— `warn!` at line 215 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:150— `debug!` at line 150 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:167— `debug!` at line 167 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:239— `debug!` at line 239 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:240— `debug!` at line 240 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:241— `debug!` at line 241 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:242— `debug!` at line 242 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:245— `debug!` at line 245 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:269— `warn!` at line 269 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:321— `warn!` at line 321 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:341— `warn!` at line 341 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:360— `warn!` at line 360 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:377— `warn!` at line 377 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:499— `debug!` at line 499 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:512— `debug!` at line 512 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:534— `debug!` at line 534 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:536— `debug!` at line 536 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/vm/backend/libkrun.rs:548— `debug!` at line 548 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/platform/macos.rs:61— `debug!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/platform/macos.rs:219— `debug!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Interpolated log message defeats structured logging src/cli/pack.rs:1097— `warn!` at line 1097 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
Silent fallback default on Err crates/smolvm-agent/src/nsfile.rs:899— `live_main_containers` 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 crates/smolvm-agent/src/nsfile.rs:917— `live_containers` 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 crates/smolvm-agent/src/process.rs:175— `live_descendants` 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 crates/smolvm-cudart-shim/src/lib.rs:1980— `smolvm_cudart_translate_host_pointers` turns every `Err` into `0` — 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 crates/smolvm-cudart-shim/src/lib.rs:5199— `nvcompBatchedDeflateDecompressGetTempSizeEx` turns every `Err` into `1` — 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 crates/smolvm-cudart-shim/src/lib.rs:5400— `cudnnBackendGetAttribute` turns every `Err` into `1` — 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 crates/smolvm-cudart-shim/src/lib.rs:5409— `cudnnBackendFinalize` turns every `Err` into `1` — 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 crates/smolvm-cudart-shim/src/lib.rs:6131— `bn_size_call` turns every `Err` into `1` — 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 crates/smolvm-network/src/watchlist.rs:282— `record_once` turns every `Err` into `Verdict::default()` — 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 crates/smolvm-pack/src/extract.rs:1904— `dir_disk_usage` turns every `Err` into `0` — 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 crates/smolvm-pack/src/extract.rs:1953— `evict_cache_to_size_protecting` turns every `Err` into `0` — 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 crates/smolvm-pack/src/extract.rs:5017— `sum_tar_sizes` turns every `Err` into `0` — 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 crates/smolvm-registry/src/client.rs:159— `upload_http_client` turns every `Err` into `reqwest::Client::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 src/agent/krun.rs:391— `console_output_to_file` turns every `Err` into `-1` — 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 src/agent/krun.rs:422— `console_output_to_file` turns every `Err` into `-1` — 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 src/pack_export.rs:643— `describe_source_device` 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.
Silent fallback default on Err src/agent/manager.rs:429— `walk_blocks` (in `disk_used_mb`) turns every `Err` into `0` — 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 src/api/cache_base_budget.rs:107— `scan` 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 src/pack_export.rs:383— `directory_apparent_bytes` turns every `Err` into `0` — 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.
Duplicated predicate crates/smolvm-agent/src/credentials.rs:70— `!bundle.is_empty() && !bundle.ends_with(b"\n")` appears character-identically in 2 files — crates/smolvm-agent/src/credentials.rs, crates/smolvm-agent/src/storage.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.
Duplicated predicate src/api/handlers/machines.rs:2969— `checkpoint.is_none() && manifest.mode == smolvm_pack::format::PackMode::Vm` appears character-identically in 2 files — src/api/handlers/machines.rs, src/cli/machine.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.
Duplicated predicate src/agent/launcher.rs:912— `cpu_profile_result < 0 && cpu_profile_result != -libc::ENOTSUP` appears character-identically in 2 files — src/agent/launcher.rs, src/agent/launcher_dynamic.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.
Duplicated predicate src/api/handlers/machines.rs:3112— `cpus != checkpoint.cpus || mem != checkpoint.memory_mib` appears character-identically in 2 files — src/api/handlers/machines.rs, src/cli/machine.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.
Duplicated predicate crates/smolvm-cuda-shim/src/lib.rs:1082— `device.is_null() || pci_bus_id.is_null()` appears character-identically in 2 files — crates/smolvm-cuda-shim/src/lib.rs, crates/smolvm-cudart-shim/src/lib.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.
Duplicated predicate crates/smolvm-cuda-shim/src/lib.rs:191— `e == libc::EAGAIN || e == libc::EWOULDBLOCK` appears character-identically in 2 files — crates/smolvm-cuda-shim/src/lib.rs, crates/smolvm-cudart-shim/src/lib.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.
Duplicated predicate src/agent/launcher.rs:2904— `engine == BlockIoEngine::Async || durability == DiskDurability::Deferred` appears character-identically in 2 files — src/agent/launcher.rs, src/agent/launcher_dynamic.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.
Duplicated predicate crates/smolvm-network/src/dns_relay.rs:248— `event.key >= 1 && event.key - 1 < ready.len()` appears character-identically in 3 files — crates/smolvm-network/src/dns_relay.rs, crates/smolvm-network/src/icmp_relay.rs, crates/smolvm-network/src/udp_relay.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.
Duplicated predicate crates/smolvm-protocol/src/lib.rs:2115— `image == "alpine:3.20" && workload_id == "fork-overlay-owner"` appears character-identically in 2 files — crates/smolvm-protocol/src/lib.rs, src/agent/client.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.
Duplicated predicate crates/smolvm-agent/src/oci.rs:411— `line.is_empty() || line.starts_with('#')` appears character-identically in 4 files — crates/smolvm-agent/src/oci.rs, crates/smolvm-network/src/egress.rs, crates/smolvm-network/src/watchlist.rs, src/data/image_source.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.
Duplicated predicate crates/smolvm-agent/src/storage.rs:2210— `n >= 2 && magic[0] == 0x1f && magic[1] == 0x8b` appears character-identically in 2 files — crates/smolvm-agent/src/storage.rs, crates/smolvm-oci-layer/src/lib.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.
Duplicated predicate crates/smolvm-agent/src/storage.rs:6243— `potential_registry.contains('.') || potential_registry.contains(':')` appears character-identically in 2 files — crates/smolvm-agent/src/storage.rs, src/registry.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.
Duplicated predicate src/agent/launcher.rs:2958— `r == -libc::ENOSYS || r == -libc::EPERM || r == -libc::EACCES || r == -libc::ENOTSUP` appears character-identically in 2 files — src/agent/launcher.rs, src/agent/launcher_dynamic.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.
Duplicated predicate src/api/handlers/machines.rs:4086— `record.external_interceptor_required && external_interceptor.is_none()` appears character-identically in 3 files — src/api/handlers/machines.rs, src/cli/machine.rs, src/cli/vm_common.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.
Duplicated predicate crates/smolvm-agent/src/disk_trim.rs:57— `v.eq_ignore_ascii_case("off") || v == "0"` appears character-identically in 2 files — crates/smolvm-agent/src/disk_trim.rs, src/agent/launcher.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.
Duplicated predicate src/api/handlers/machines.rs:3002— `vm_seed.is_some() || checkpoint.is_some()` appears character-identically in 2 files — src/api/handlers/machines.rs, src/cli/machine.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.
C2 · Access Controls· No named authorization policies · ×1
No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 18 project(s) overshoot their size bounds, lowering Project Cohesion to 8.9/10. The most over is `(repository root)` (146089 LoC, 510 module-visible types across 18 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D40 · Network Egress Confinement· No network policy · ×1
No network policy — No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need.
No seccomp profile REDACTED:11— The workload runs a container with no seccomp profile in force (neither RuntimeDefault nor a Localhost profile, on the container or the pod), so Kubernetes runs it Unconfined. Seccomp blocks the syscalls a container never needs, shrinking the kernel attack surface a container escape would use.
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.
README/code drift docs/dev-env/README.md:50— docs/dev-env/README.md links to `../live-resize.md`, but `docs/live-resize.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Logging is not universal — Only 10/13 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/smolvm-cuda-codegen`, `crates/smolvm-cuda-guest`.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment automation exists and the service already exposes health probe endpoints (healthz/livez/readyz or a container healthcheck), but no manifest in this repository wires them into readiness/liveness probes, a rolling-update strategy, lifecycle hooks or a migration job — a bad release is harder to detect and reverse. If that wiring lives in a separate ops/Helm repository, document the pointer here so release safety is evidenced.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
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(` (src/cli/serve.rs:541).
Outdated: anyhow — `anyhow` is locked at 1.0.102 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/smolvm-credentials/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
Outdated: bytes — `bytes` is locked at 1.11.1 but 1.12.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/smolvm-credentials/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p bytes` and commit the updated REDACTED.
Outdated: crc32fast — `crc32fast` is locked at 1.5.0 but 1.5.3 is the current stable release on crates.io, and it already satisfies the `"1.4"` requirement declared in crates/smolvm-pack/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crc32fast` and commit the updated REDACTED.
Outdated: crossbeam-queue — `crossbeam-queue` is locked at 0.3.12 but 0.3.14 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/smolvm-network/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam-queue` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.10 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/smolvm-agent/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: futures-util — `futures-util` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
Outdated: http-body — `http-body` is locked at 1.0.1 but 1.1.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p http-body` and commit the updated REDACTED.
Outdated: http-body-util — `http-body-util` is locked at 0.1.3 but 0.1.5 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/smolvm-credentials/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p http-body-util` and commit the updated REDACTED.
Outdated: humantime — `humantime` is locked at 2.3.0 but 2.4.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p humantime` and commit the updated REDACTED.
Outdated: hyper — `hyper` is locked at 1.10.1 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/smolvm-credentials/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hyper` and commit the updated REDACTED.
Outdated: hyper-util — `hyper-util` is locked at 0.1.20 but 0.1.21 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/smolvm-credentials/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hyper-util` and commit the updated REDACTED.
Outdated: imago — `imago` is locked at 0.2.4 but 0.2.6 is the current stable release on crates.io, and it already satisfies the `"0.2.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p imago` and commit the updated REDACTED.
Outdated: ipnet — `ipnet` is locked at 2.12.0 but 2.12.2 is the current stable release on crates.io, and it already satisfies the `"2.12.0"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ipnet` and commit the updated REDACTED.
Outdated: landlock — `landlock` is locked at 0.4.5 but 0.4.7 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p landlock` and commit the updated REDACTED.
Outdated: lazy_static — `lazy_static` is locked at 1.5.0 but 1.5.1 is the current stable release on crates.io, and it already satisfies the `"1.4"` requirement declared in crates/smolvm-agent/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p lazy_static` and commit the updated REDACTED.
Outdated: libc — `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
Outdated: log — `log` is locked at 0.4.32 but 0.4.34 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/smolvm-shim/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p log` and commit the updated REDACTED.
Outdated: pkg-config — `pkg-config` is locked at 0.3.33 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pkg-config` and commit the updated REDACTED.
Outdated: rustix — `rustix` is locked at 1.1.4 but 1.1.6 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/smolvm-agent/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustix` and commit the updated REDACTED.
Outdated: rustls-native-certs — `rustls-native-certs` is locked at 0.8.4 but 0.8.5 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/smolvm-registry/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-native-certs` and commit the updated REDACTED.
Outdated: rustls-pki-types — `rustls-pki-types` is locked at 1.14.1 but 1.15.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-pki-types` and commit the updated REDACTED.
Outdated: serde — `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
Outdated: serde_json — `serde_json` is locked at 1.0.150 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
Outdated: socket2 — `socket2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p socket2` and commit the updated REDACTED.
Outdated: time — `time` is locked at 0.3.47 but 0.3.55 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/smolvm-pack/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p time` and commit the updated REDACTED.
+ 5 more in this group — see findings.md.
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 — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
Run 01a17f43-4b4f-7355-8347-d8cd4e9954be · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 109 · Warnings: 1095 · Recommendations: 92 · Info: 30 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 27-10-2026 @ 21:27 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.