Public report of DataDog/saluki, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 17:39 UTC · Survey ID cd_b47a0a009a03417989754b863ac58d42
DataDog/saluki
Measured 17 November 2026, 17:38 UTC, at code version 26783e1
First survey, so nothing to compare with yet
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
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: 278,150 lines of product code in 42 projects, tests not counted · Estimated rebuild effort: about 2.7 person-years · Weakest lens: Security and Compliance, 55.1
Findings by how serious they are
69 critical866 serious99 minor
9 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 17:38 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
73of 73 dimensions measured by tools.
997of 1034 findings point to an exact file and line, so you can open each one in the code. The other 37 concern the repository as a whole, such as missing documentation.
73dimensions across 9 lenses, read from 278,150 lines of product code in 42 projects.
DataDog/saluki falls short of our standard for production, held back most by its Security and Compliance lens, the code's security and compliance. It scores 62.3 out of 100 and is rated Adequate, and 22 of its 69 critical findings are security problems.
Security and Compliance, at 55.1, is the weakest lens and counts most in the score. The best first step is restoring certificate checks, worth about 4.9 points. Fixing the runtime or framework that no longer gets security updates comes next, worth about 1.3 points. Raising Security and Compliance to 70 would lift the score to about 66.1.
Eleven settings leave the servers or containers unsafe. Seven known security holes in the packages the code depends on can be used by attackers, and three pipeline steps run downloads nobody checks. Correcting the unsafe settings, updating the vulnerable packages and checking each download against a checksum would close these risks. Switching the validation back on would fix the security check on connections or logins switched off. The five sets of files in separate parts that keep changing together need that dependency made explicit.
The product code is 278,150 lines, about €390,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 Security and Compliance rose from 55.1 to 70, the lowest score rated Strong, the score would rise from 62.3 to about 66.1.
Code composition: what the lines of code are
Product code 91%Tests 9%
Rebuild cost: about €390,000 · Estimate
Cost to rebuild
€130,000 to €650,000, for 2,172 to 6,891 hours of work, about 2.7 person-years for 1 to 6 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.9 at a score of 62. 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: 278,150 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Raises the score by about 2.5 points · Medium effort · DR & Backup
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 €390,000 to build again, about 2.7 person-years of work. Its weakest lens is Security and Compliance, at 55.1 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off. Of all the actions in this report, it raises the score most for the work it takes: about 4.9 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
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.
702 modules, with 1926 dependencies between them. 23 loops run through 82 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 662 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.
saluki_components.common.datadog.io uses saluki_core.components, so a change to saluki_core.components can break saluki_components.common.datadog.io, while a change to saluki_components.common.datadog.io can't break saluki_core.components.
Position
Below the diagonal: saluki_components.common.datadog.io uses a module listed above it, which is the healthy direction.
saluki_components.common.datadog.io uses saluki_metrics.builder, so a change to saluki_metrics.builder can break saluki_components.common.datadog.io, while a change to saluki_components.common.datadog.io can't break saluki_metrics.builder.
Position
Below the diagonal: saluki_components.common.datadog.io uses a module listed above it, which is the healthy direction.
saluki_components.common.datadog.io uses stringtheory, so a change to stringtheory can break saluki_components.common.datadog.io, while a change to saluki_components.common.datadog.io can't break stringtheory.
Position
Below the diagonal: saluki_components.common.datadog.io uses a module listed above it, which is the healthy direction.
11→18 saluki_core.accounting uses saluki_core.accounting.registrypart of a loop✕
Connections
1 pair of types, where a type in saluki_core.accounting uses a type in saluki_core.accounting.registry.
saluki_core.accounting uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_core.accounting, while a change to saluki_core.accounting can't break saluki_core.accounting.registry.
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.
saluki_core.components.build_context uses saluki_core.components, so a change to saluki_core.components can break saluki_core.components.build_context, while a change to saluki_core.components.build_context can't break saluki_core.components.
Position
Below the diagonal: saluki_core.components.build_context uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.trace uses stringtheory, so a change to stringtheory can break saluki_core.data_model.event.trace, while a change to saluki_core.data_model.event.trace can't break stringtheory.
Position
Below the diagonal: saluki_core.data_model.event.trace uses a module listed above it, which is the healthy direction.
13→19 saluki_core.data_model.event.trace uses saluki_core.data_model.eventpart of a loop✕
Connections
2 pairs of types, where a type in saluki_core.data_model.event.trace uses a type in saluki_core.data_model.event.
saluki_core.data_model.event.trace uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_core.data_model.event.trace, while a change to saluki_core.data_model.event.trace can't break saluki_core.data_model.event.
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.
14→21 saluki_core.data_model.tags.tagset.shared uses saluki_core.data_model.tags.tagset.ownedpart of a loop✕
Connections
1 pair of types, where a type in saluki_core.data_model.tags.tagset.shared uses a type in saluki_core.data_model.tags.tagset.owned.
saluki_core.data_model.tags.tagset.shared uses saluki_core.data_model.tags.tagset.owned, so a change to saluki_core.data_model.tags.tagset.owned can break saluki_core.data_model.tags.tagset.shared, while a change to saluki_core.data_model.tags.tagset.shared can't break saluki_core.data_model.tags.tagset.owned.
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.
saluki_core.runtime.supervisable uses saluki_common.sync.shutdown, so a change to saluki_common.sync.shutdown can break saluki_core.runtime.supervisable, while a change to saluki_core.runtime.supervisable can't break saluki_common.sync.shutdown.
Position
Below the diagonal: saluki_core.runtime.supervisable uses a module listed above it, which is the healthy direction.
saluki_env.workload.entity uses stringtheory, so a change to stringtheory can break saluki_env.workload.entity, while a change to saluki_env.workload.entity can't break stringtheory.
Position
Below the diagonal: saluki_env.workload.entity uses a module listed above it, which is the healthy direction.
saluki_components.common.otlp uses saluki_core.components, so a change to saluki_core.components can break saluki_components.common.otlp, while a change to saluki_components.common.otlp can't break saluki_core.components.
Position
Below the diagonal: saluki_components.common.otlp uses a module listed above it, which is the healthy direction.
saluki_components.common.otlp uses saluki_io.net.addr, so a change to saluki_io.net.addr can break saluki_components.common.otlp, while a change to saluki_components.common.otlp can't break saluki_io.net.addr.
Position
Below the diagonal: saluki_components.common.otlp uses a module listed above it, which is the healthy direction.
saluki_components.common.otlp uses stringtheory, so a change to stringtheory can break saluki_components.common.otlp, while a change to saluki_components.common.otlp can't break stringtheory.
Position
Below the diagonal: saluki_components.common.otlp uses a module listed above it, which is the healthy direction.
saluki_components.common.otlp uses saluki_components.common.datadog.io, so a change to saluki_components.common.datadog.io can break saluki_components.common.otlp, while a change to saluki_components.common.otlp can't break saluki_components.common.datadog.io.
Position
Below the diagonal: saluki_components.common.otlp uses a module listed above it, which is the healthy direction.
saluki_core.accounting.registry uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_core.accounting.registry, while a change to saluki_core.accounting.registry can't break saluki_core.accounting.
Position
Below the diagonal: saluki_core.accounting.registry uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event uses saluki_core.data_model.event.trace, so a change to saluki_core.data_model.event.trace can break saluki_core.data_model.event, while a change to saluki_core.data_model.event can't break saluki_core.data_model.event.trace.
Position
Below the diagonal: saluki_core.data_model.event uses a module listed above it, which is the healthy direction.
19→25 saluki_core.data_model.event uses saluki_core.data_model.event.metricpart of a loop✕
Connections
1 pair of types, where a type in saluki_core.data_model.event uses a type in saluki_core.data_model.event.metric.
saluki_core.data_model.event uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_core.data_model.event, while a change to saluki_core.data_model.event can't break saluki_core.data_model.event.metric.
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.
saluki_core.data_model.origin uses stringtheory, so a change to stringtheory can break saluki_core.data_model.origin, while a change to saluki_core.data_model.origin can't break stringtheory.
Position
Below the diagonal: saluki_core.data_model.origin uses a module listed above it, which is the healthy direction.
saluki_core.data_model.origin uses saluki_core.data_model.tags.tagset.shared, so a change to saluki_core.data_model.tags.tagset.shared can break saluki_core.data_model.origin, while a change to saluki_core.data_model.origin can't break saluki_core.data_model.tags.tagset.shared.
Position
Below the diagonal: saluki_core.data_model.origin uses a module listed above it, which is the healthy direction.
saluki_core.data_model.tags.tagset.owned uses saluki_core.data_model.tags.tagset.shared, so a change to saluki_core.data_model.tags.tagset.shared can break saluki_core.data_model.tags.tagset.owned, while a change to saluki_core.data_model.tags.tagset.owned can't break saluki_core.data_model.tags.tagset.shared.
Position
Below the diagonal: saluki_core.data_model.tags.tagset.owned uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_io.net.addr, so a change to saluki_io.net.addr can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_io.net.addr.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses stringtheory, so a change to stringtheory can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break stringtheory.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_core.data_model.tags.tagset.shared, so a change to saluki_core.data_model.tags.tagset.shared can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_core.data_model.tags.tagset.shared.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_components.common.otlp, so a change to saluki_components.common.otlp can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_components.common.otlp.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_components.sources.otlp uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.sources.otlp, while a change to saluki_components.sources.otlp can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.sources.otlp uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.builder uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_core.components.transforms.builder, while a change to saluki_core.components.transforms.builder can't break saluki_core.accounting.
Position
Below the diagonal: saluki_core.components.transforms.builder uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.builder uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_core.components.transforms.builder, while a change to saluki_core.components.transforms.builder can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_core.components.transforms.builder uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.builder uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_core.components.transforms.builder, while a change to saluki_core.components.transforms.builder can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_core.components.transforms.builder uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.metric.context uses stringtheory, so a change to stringtheory can break saluki_core.data_model.event.metric.context, while a change to saluki_core.data_model.event.metric.context can't break stringtheory.
Position
Below the diagonal: saluki_core.data_model.event.metric.context uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.metric.context uses saluki_core.data_model.tags.tagset.owned, so a change to saluki_core.data_model.tags.tagset.owned can break saluki_core.data_model.event.metric.context, while a change to saluki_core.data_model.event.metric.context can't break saluki_core.data_model.tags.tagset.owned.
Position
Below the diagonal: saluki_core.data_model.event.metric.context uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.metric uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_core.data_model.event.metric, while a change to saluki_core.data_model.event.metric can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_core.data_model.event.metric uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.metric uses saluki_core.data_model.event.metric.context, so a change to saluki_core.data_model.event.metric.context can break saluki_core.data_model.event.metric, while a change to saluki_core.data_model.event.metric can't break saluki_core.data_model.event.metric.context.
Position
Below the diagonal: saluki_core.data_model.event.metric uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.data_model.payload, so a change to saluki_core.data_model.payload can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.data_model.payload.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.data_model.tags.tagset.shared, so a change to saluki_core.data_model.tags.tagset.shared can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.data_model.tags.tagset.shared.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.metrics uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_components.encoders.datadog.metrics, while a change to saluki_components.encoders.datadog.metrics can't break saluki_core.data_model.event.metric.
Position
Below the diagonal: saluki_components.encoders.datadog.metrics uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_common.sync.shutdown, so a change to saluki_common.sync.shutdown can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_common.sync.shutdown.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_io.net.addr, so a change to saluki_io.net.addr can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_io.net.addr.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses stringtheory, so a change to stringtheory can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break stringtheory.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.runtime.supervisable, so a change to saluki_core.runtime.supervisable can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.runtime.supervisable.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_components.common.otlp, so a change to saluki_components.common.otlp can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_components.common.otlp.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_components.sources.dogstatsd uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_components.sources.dogstatsd, while a change to saluki_components.sources.dogstatsd can't break saluki_core.data_model.event.metric.
Position
Below the diagonal: saluki_components.sources.dogstatsd uses a module listed above it, which is the healthy direction.
saluki_core.data_model.event.metric.value.histogram uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_core.data_model.event.metric.value.histogram, while a change to saluki_core.data_model.event.metric.value.histogram can't break saluki_core.data_model.event.metric.
Position
Below the diagonal: saluki_core.data_model.event.metric.value.histogram uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_io.net.addr, so a change to saluki_io.net.addr can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_io.net.addr.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses stringtheory, so a change to stringtheory can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break stringtheory.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.data_model.event.metric.context, so a change to saluki_core.data_model.event.metric.context can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.data_model.event.metric.context.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.data_model.event.metric.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.destinations.prometheus uses saluki_core.data_model.event.metric.value.histogram, so a change to saluki_core.data_model.event.metric.value.histogram can break saluki_components.destinations.prometheus, while a change to saluki_components.destinations.prometheus can't break saluki_core.data_model.event.metric.value.histogram.
Position
Below the diagonal: saluki_components.destinations.prometheus uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.payload, so a change to saluki_core.data_model.payload can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.payload.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_metrics.builder, so a change to saluki_metrics.builder can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_metrics.builder.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses stringtheory, so a change to stringtheory can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break stringtheory.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.event.trace, so a change to saluki_core.data_model.event.trace can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.event.trace.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.tags.tagset.shared, so a change to saluki_core.data_model.tags.tagset.shared can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.tags.tagset.shared.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.tags.tagset.owned, so a change to saluki_core.data_model.tags.tagset.owned can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.tags.tagset.owned.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_components.encoders.datadog.traces uses saluki_core.data_model.event.metric.value.histogram, so a change to saluki_core.data_model.event.metric.value.histogram can break saluki_components.encoders.datadog.traces, while a change to saluki_components.encoders.datadog.traces can't break saluki_core.data_model.event.metric.value.histogram.
Position
Below the diagonal: saluki_components.encoders.datadog.traces uses a module listed above it, which is the healthy direction.
saluki_core.health uses saluki_core.data_model.event.metric.value.histogram, so a change to saluki_core.data_model.event.metric.value.histogram can break saluki_core.health, while a change to saluki_core.health can't break saluki_core.data_model.event.metric.value.histogram.
Position
Below the diagonal: saluki_core.health uses a module listed above it, which is the healthy direction.
saluki_core.observability.metrics uses saluki_common.sync.shutdown, so a change to saluki_common.sync.shutdown can break saluki_core.observability.metrics, while a change to saluki_core.observability.metrics can't break saluki_common.sync.shutdown.
Position
Below the diagonal: saluki_core.observability.metrics uses a module listed above it, which is the healthy direction.
saluki_core.observability.metrics uses saluki_core.runtime.supervisable, so a change to saluki_core.runtime.supervisable can break saluki_core.observability.metrics, while a change to saluki_core.observability.metrics can't break saluki_core.runtime.supervisable.
Position
Below the diagonal: saluki_core.observability.metrics uses a module listed above it, which is the healthy direction.
saluki_core.observability.metrics uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_core.observability.metrics, while a change to saluki_core.observability.metrics can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_core.observability.metrics uses a module listed above it, which is the healthy direction.
saluki_core.observability.metrics uses saluki_core.data_model.event.metric.context, so a change to saluki_core.data_model.event.metric.context can break saluki_core.observability.metrics, while a change to saluki_core.observability.metrics can't break saluki_core.data_model.event.metric.context.
Position
Below the diagonal: saluki_core.observability.metrics uses a module listed above it, which is the healthy direction.
saluki_core.observability.metrics uses saluki_core.data_model.event.metric.value.histogram, so a change to saluki_core.data_model.event.metric.value.histogram can break saluki_core.observability.metrics, while a change to saluki_core.observability.metrics can't break saluki_core.data_model.event.metric.value.histogram.
Position
Below the diagonal: saluki_core.observability.metrics uses a module listed above it, which is the healthy direction.
datadog_agent_runtime.env uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break datadog_agent_runtime.env, while a change to datadog_agent_runtime.env can't break saluki_core.accounting.registry.
Position
Below the diagonal: datadog_agent_runtime.env uses a module listed above it, which is the healthy direction.
datadog_agent_runtime.env uses saluki_core.health, so a change to saluki_core.health can break datadog_agent_runtime.env, while a change to datadog_agent_runtime.env can't break saluki_core.health.
Position
Below the diagonal: datadog_agent_runtime.env uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.context uses saluki_core.components, so a change to saluki_core.components can break saluki_core.components.transforms.context, while a change to saluki_core.components.transforms.context can't break saluki_core.components.
Position
Below the diagonal: saluki_core.components.transforms.context uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.context uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_core.components.transforms.context, while a change to saluki_core.components.transforms.context can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_core.components.transforms.context uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms.context uses saluki_core.health, so a change to saluki_core.health can break saluki_core.components.transforms.context, while a change to saluki_core.components.transforms.context can't break saluki_core.health.
Position
Below the diagonal: saluki_core.components.transforms.context uses a module listed above it, which is the healthy direction.
saluki_core.runtime.supervisor uses saluki_common.sync.shutdown, so a change to saluki_common.sync.shutdown can break saluki_core.runtime.supervisor, while a change to saluki_core.runtime.supervisor can't break saluki_common.sync.shutdown.
Position
Below the diagonal: saluki_core.runtime.supervisor uses a module listed above it, which is the healthy direction.
saluki_core.runtime.supervisor uses saluki_core.runtime.supervisable, so a change to saluki_core.runtime.supervisable can break saluki_core.runtime.supervisor, while a change to saluki_core.runtime.supervisor can't break saluki_core.runtime.supervisable.
Position
Below the diagonal: saluki_core.runtime.supervisor uses a module listed above it, which is the healthy direction.
saluki_core.runtime.supervisor uses saluki_core.observability.metrics, so a change to saluki_core.observability.metrics can break saluki_core.runtime.supervisor, while a change to saluki_core.runtime.supervisor can't break saluki_core.observability.metrics.
Position
Below the diagonal: saluki_core.runtime.supervisor uses a module listed above it, which is the healthy direction.
agent_data_plane.cli.run uses agent_data_plane_config, so a change to agent_data_plane_config can break agent_data_plane.cli.run, while a change to agent_data_plane.cli.run can't break agent_data_plane_config.
Position
Below the diagonal: agent_data_plane.cli.run uses a module listed above it, which is the healthy direction.
agent_data_plane.cli.run uses stringtheory, so a change to stringtheory can break agent_data_plane.cli.run, while a change to agent_data_plane.cli.run can't break stringtheory.
Position
Below the diagonal: agent_data_plane.cli.run uses a module listed above it, which is the healthy direction.
agent_data_plane.cli.run uses saluki_components.sources.dogstatsd, so a change to saluki_components.sources.dogstatsd can break agent_data_plane.cli.run, while a change to agent_data_plane.cli.run can't break saluki_components.sources.dogstatsd.
Position
Below the diagonal: agent_data_plane.cli.run uses a module listed above it, which is the healthy direction.
agent_data_plane.cli.run uses datadog_agent_runtime.env, so a change to datadog_agent_runtime.env can break agent_data_plane.cli.run, while a change to agent_data_plane.cli.run can't break datadog_agent_runtime.env.
Position
Below the diagonal: agent_data_plane.cli.run uses a module listed above it, which is the healthy direction.
agent_data_plane.cli.run uses saluki_core.runtime.supervisor, so a change to saluki_core.runtime.supervisor can break agent_data_plane.cli.run, while a change to agent_data_plane.cli.run can't break saluki_core.runtime.supervisor.
Position
Below the diagonal: agent_data_plane.cli.run uses a module listed above it, which is the healthy direction.
saluki_core.components.transforms uses saluki_core.components.transforms.context, so a change to saluki_core.components.transforms.context can break saluki_core.components.transforms, while a change to saluki_core.components.transforms can't break saluki_core.components.transforms.context.
Position
Below the diagonal: saluki_core.components.transforms uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.components.transforms.builder, so a change to saluki_core.components.transforms.builder can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.components.transforms.builder.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.data_model.event.metric.context, so a change to saluki_core.data_model.event.metric.context can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.data_model.event.metric.context.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.data_model.event.metric, so a change to saluki_core.data_model.event.metric can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.data_model.event.metric.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.components.transforms.context, so a change to saluki_core.components.transforms.context can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.components.transforms.context.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.aggregate uses saluki_core.components.transforms, so a change to saluki_core.components.transforms can break saluki_components.transforms.aggregate, while a change to saluki_components.transforms.aggregate can't break saluki_core.components.transforms.
Position
Below the diagonal: saluki_components.transforms.aggregate uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses stringtheory, so a change to stringtheory can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break stringtheory.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.data_model.event.trace, so a change to saluki_core.data_model.event.trace can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.data_model.event.trace.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.components.transforms.builder, so a change to saluki_core.components.transforms.builder can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.components.transforms.builder.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.components.transforms.context, so a change to saluki_core.components.transforms.context can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.components.transforms.context.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.apm_stats uses saluki_core.components.transforms, so a change to saluki_core.components.transforms can break saluki_components.transforms.apm_stats, while a change to saluki_components.transforms.apm_stats can't break saluki_core.components.transforms.
Position
Below the diagonal: saluki_components.transforms.apm_stats uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses stringtheory, so a change to stringtheory can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break stringtheory.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.accounting, so a change to saluki_core.accounting can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.accounting.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.components.build_context, so a change to saluki_core.components.build_context can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.components.build_context.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.data_model.event.trace, so a change to saluki_core.data_model.event.trace can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.data_model.event.trace.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.accounting.registry, so a change to saluki_core.accounting.registry can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.accounting.registry.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.data_model.event, so a change to saluki_core.data_model.event can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.data_model.event.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.components.transforms.builder, so a change to saluki_core.components.transforms.builder can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.components.transforms.builder.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.components.transforms.context, so a change to saluki_core.components.transforms.context can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.components.transforms.context.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
saluki_components.transforms.trace_sampler uses saluki_core.components.transforms, so a change to saluki_core.components.transforms can break saluki_components.transforms.trace_sampler, while a change to saluki_components.transforms.trace_sampler can't break saluki_core.components.transforms.
Position
Below the diagonal: saluki_components.transforms.trace_sampler uses a module listed above it, which is the healthy direction.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A02:2025 — Security Misconfiguration
34
High / Critical
A03:2025 — Software Supply Chain Failures
21
High / Critical
A05:2025 — Injection
4
High / Critical
Roadmap
Top priorities: Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off; Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
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.
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.
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 — 69
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 — 866
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 — 99
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 9
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 73 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 73 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, 997 of 1034 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs, .go) and this repository declares a Cargo test suite (repository root, 504 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The image build failed, and its output does not match a cause we recognise. (rule: unrecognised-build-failure). The renderer reported: docker build failed (exit 1) — - InvalidDefaultArgInFrom: Default value for ARG ${APP_IMAGE} results in empty or invalid base image name (line 14) REDACTED:4 -------------------- 2 | ARG APP_IMAGE 3 | 4 | >>> FROM ${BUILD_IMAGE} AS builder 5 | 6 | # Build the binary. -------------------- ERROR: failed to solve: base name (${BUILD_IMAGE}) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped.
AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — - InvalidDefaultArgInFrom: Default value for ARG ${APP_IMAGE} results in empty or invalid base image name (line 14) REDACTED:4 -------------------- 2 | ARG APP_IMAGE 3 | 4 | >>> FROM ${BUILD_IMAGE} AS builder 5 | 6 | # Build the binary. -------------------- ERROR: failed to solve: base name (${BUILD_IMAGE}) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped.
ED1 Handler temporal coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 1 further occurrence(s) are not listed individually; the score already reflects all 41.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 189 further occurrence(s) are not listed individually; the score already reflects all 229.
X5 Nullable reference types — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 377 further occurrence(s) are not listed individually; the score already reflects all 417.
Repo exclusion declarations: 4 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
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.
D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
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.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
82 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SQLTokenizer::scan at 55. A further 24 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 Concept::as_str at 68 — they are counted neither in the figure above nor in this dimension's score. 14 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: lib/datadog-agent/apm/src/semantics/mod.rs (Concept::as_str at 68), lib/saluki-components/src/decoders/datadog/read.rs (saluki_components::decoders::datadog::read::skip_value_depth at 25), lib/agent-data-plane-config-system/src/corpus_replay/compare.rs (agent_data_plane_config_system::corpus_replay::compare::agent_prefix_entries at 20), lib/saluki-components/src/sources/otlp/metrics/remap.rs (saluki_components::sources::otlp::metrics::remap::remap_container_metrics at 19), lib/saluki-components/src/transforms/apm_stats/aggregation.rs (GrpcStatusCode::from_str at 19), and 9 more not listed here. 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.
+ 48 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 12 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with SQLTokenizer::scan (cyclomatic 55), saluki_components::sources::otlp::logs::transform::transform_log_record (cyclomatic 44), SalukiOnly::seed (cyclomatic 43). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
203 method(s) exceeded the cognitive complexity threshold of 15; the worst was saluki_components::encoders::datadog::metrics::run_request_builder at 139.
+ 116 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with saluki_components::encoders::datadog::metrics::run_request_builder (cognitive 139). — Refactoring it lifts Cognitive Complexity from 5.5 to about 5.7/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.6 / 10Stronggated by 48 serious findings✓ 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 18 FunctionTooLong finding(s) in God Classes — start with transform.rs (5), remap.rs (2), runtime_metrics.rs (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 13 FileTooLong finding(s) in God Classes — start with mod.rs (4), expected.rs, transform.rs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 8 MethodTooLong finding(s) in God Classes — start with writer.rs, mod.rs, sql_tokenizer.rs. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
132 duplicated block group(s) detected. 2.5 % of the production lines (6,883 of 278,150) are in a reported copy. A further 123 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 12 of the 255 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.
Edited copy of a member (13 corresponding lines) · ×8lib/saluki-core/src/runtime/supervisor.rs:1247
+ 106 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with mod.rs (3), context.rs (2), tls.rs. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 10 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), collapsing_lowest.rs, api.rs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), sql_tokenizer.rs, compare.rs. — One of this dimension's main actionable groups (9 warning-level).
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.
41 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 9 module(s) off the main sequence, with abstractness counted on 35 of the 41 (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: agent-data-plane-config · ×9
What to do
Resolve the 9 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with driver.rs (2), mod.rs, state.rs. — One of this dimension's main actionable groups (5 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the code respects its intended layering / architecture rules.
Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.
No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
12 outdated, 0 yanked direct Cargo dependencies. 129 of 130 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: arc-swap · ×12
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 639 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. A further 12 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Top hotspots: lib/agent-data-plane-config-system/src/saluki_only.rs (17×43=731); lib/saluki-components/src/encoders/datadog/metrics/mod.rs (18×40=720); lib/saluki-components/src/sources/otlp/mod.rs (22×28=616) Repeated repair below the complexity floor: bin/correctness/otlp-fixtures/src/main.rs (6 of 11 changes were fixes); lib/saluki-env/src/workload/helpers/cgroups.rs (5 of 7 changes were fixes); lib/saluki-io/src/deser/codec/dogstatsd/mod.rs (3 of 4 changes were fixes)
Resolve the 23 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (9), transform.rs (2), saluki_only.rs. — One of this dimension's main actionable groups (23 warning-level).
Resolve the 3 Repeated repair finding(s) in Churn × Complexity Hotspots — start with main.rs, cgroups.rs, mod.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.4 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
76 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is lib/saluki-core/src/topology/blueprint.rs. Counted over 498 of the 653 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×3
Further sole-owners (lower concentration)
What to do
Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
129 deducted task-comment markers across 278150 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
TodoComment · ×129lib/stringtheory/src/lib.rs:905
What to do
Resolve the 129 TodoComment finding(s) in Explicit Debt — start with mod.rs (38), sketch.rs (9), saluki_only.rs (8). — One of this dimension's main actionable groups (129 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 2 documentation facets pass in full; short on: F2 example. 45 document(s) read across 36 unit(s).
Documentation: no build, run or usage exampleREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
0 of 3 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.
✓ On the Gold path — maintain.
Detailed fixes: d20_recommendation.md.
Do you agree with this assessment?
D22 · Internal API Consistency0.0 / 10Critical✓ Tool-verified
What it measures: Whether the internal API surface is consistent and coherent.
Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.
1 API inconsistencies among 10 exposed members measured against a convention their peers follow.
`driver.ExpectedSources` returns a map (`map[K]V`) where its 3 siblings return a slice (`[]T`)lib/datadog-agent/config-recorder/go/driver/bisect.go:28
What to do
Resolve the 1 `driver.ExpectedSources` returns a map (`map[K]V`) where its 3 siblings… finding(s) in Internal API Consistency — start with bisect.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.
Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.
Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.
5 of 42 build units (Cargo, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×5lib/saluki-components/Cargo.toml:1
What to do
Resolve the 5 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with Cargo.toml (5). — One of this dimension's main actionable groups (5 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).
4 finding(s): 0 critical, 3 high, 1 medium, 0 low. semgrep hit a parse error in 10 file(s) — `bin/correctness/panoramic/mounts/etc/cont-init.d/00-panoramic-dynamic.sh` (lines 41–58), `ci/tooling/aix-jemalloc/nm` (line 6), `ci/tooling/build-adp-aix.sh` (line 19, line 20), `ci/tooling/collect-third-party-licenses.sh` (line 17, line 18, line 19), `ci/tooling/compute-smp-sha.sh` (line 27), … (+5 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 3 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
What to do
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 20 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (5), REDACTED (3). — One of this dimension's main actionable groups (20 warning-level).
Resolve the 11 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED, REDACTED. — One of this dimension's main actionable groups (11 issue-level).
Resolve the 3 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 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.
10 of 498 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is lib/ottl/src/parser/arena.rs. Counted over 498 of the 653 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned file · ×10lib/ottl/src/parser/arena.rs:1
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with mod.rs (2), datadog_translator.rs, defaults.rs. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 8 Change coupling finding(s) in Change Coupling — start with mod.rs (6), normalize.rs (2). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 3 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.
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with rust-toolchain.toml. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
`saluki-app` is a Application project but references `saluki-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
`saluki-core` is a Domain project but references `saluki-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
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 · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether domain identifiers are strongly typed (a newtype wrapper) rather than raw primitives — consistency once an idiom exists.
Method: Roslyn (DDD-gated): strongly-typed id adoption on domain entities/events; raw Guid/int/string ids counted versus wrapped types. An id wrapper is recognised by VALUE SEMANTICS, not by being a struct — a record struct, a record class (`record ApartmentId(Guid Value)`) or a class declared by a typed-id base (`class MemberId : TypedIdValueBase`) all count, while a plain mutable class (reference equality) and a verb-phrase query record (`GetCustomerById`) do not. Deterministic, adoption percentage.
Coverage: Population: id-like members by *Id/*Key NAME suffix; strongly-typed-ID shape then checked semantically — non-suffixed identifiers are not seen.
Do you agree with this assessment?
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified
Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Event-Driven — Whether event/message handlers avoid synchronous blocking waits — a blocking wait inside a handler stalls throughput and risks deadlock.
Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.
`src.run_inner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/agent-data-plane/src/main.rs:221
`src.run_inner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/agent-data-plane/src/main.rs:248
`config.load_case` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/config.rs:690
`config.discover_tests` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/config.rs:727
`config.try_load_test` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/config.rs:768
`k8s.run_k8s_correctness_test` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/correctness/k8s.rs:124
`k8s.build_agent_config_volumes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/correctness/k8s.rs:858
`CorrectnessRunner.build_shared_millstone_group_runner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/correctness/runner.rs:249
`machine_output.collect_diagnostic_lines` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:437
`machine_output.write_detail_files` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:512
`machine_output.write_detail_files` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:528
`machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:558
`machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::rename`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:558
`machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/machine_output.rs:561
`src.run_tests` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/main.rs:246
`mounts.apply_target_mounts` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/mounts.rs:34
`IntegrationRunner.write_logs` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — bin/correctness/panoramic/src/runner.rs:1096, bin/correctness/panoramic/src/runner.rs:1104
`runner.write_result_log` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/runner.rs:1124
`traffic.try_write_decoded` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:231
`traffic.try_write_decoded` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:239
`traffic.write_decoded_records` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:249
`traffic.write_marker` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:309
`traffic.write_marker` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:309
`traffic.missing_input_reason` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:451
`traffic.missing_decoded_reason` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:464
`traffic.file_size` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:495
`traffic.read_json_file` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:499
`traffic.write_json_file` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:512
`traffic.remove_file` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/traffic.rs:516
`UnixIntegrationRunner.run` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/unix_runner.rs:158
`unix_runner.create_test_state_dir` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — bin/correctness/panoramic/src/unix_runner.rs:409
`LoadedConfiguration.load` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/agent-data-plane-config-system/src/loaded.rs:91
`src.read_yaml` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/datadog-agent/config-overlay-model/src/lib.rs:421
`remote_agent.fd_count` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/datadog-agent/runtime/src/remote_agent/mod.rs:514
`remote_agent.thread_count` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/datadog-agent/runtime/src/remote_agent/mod.rs:530
`linux.determine_stat_source` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — lib/process-memory/src/linux.rs:122, lib/process-memory/src/linux.rs:123
`features.file_exists` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/saluki-env/src/features/mod.rs:73
`features.check_unix_socket` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — lib/saluki-env/src/features/mod.rs:102
What to do
Use the awaited twin of each blocking call, or move the work off the loop with `tokio::task::spawn_blocking` — a synchronous handler cannot simply `.await` in place.
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.
Other · Code Health — Unreviewed-generation residue in this repository's Rust: functions whose whole body is still `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Rust: functions whose body is `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, match arms and branches left as `todo!()`, functions that take inputs and return a constant (`Ok(())`, `None`, `Default::default()`, an empty `Vec`) or do nothing, and impls most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`run_cancellable_command` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — bin/agent-data-plane/src/cli/dogstatsd.rs:277
`write_progress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — bin/agent-data-plane/src/cli/remote.rs:176
`push_line` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — bin/correctness/airlock/src/unix.rs:312
`refresh` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — lib/saluki-components/src/common/datadog/api_key.rs:66
`respond` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — lib/saluki-components/src/transforms/aggregate/mod.rs:176
`send_retraction` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — lib/saluki-core/src/runtime/state/dataspace.rs:109
`enable_uds_socket_credentials` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — lib/saluki-io/src/net/unix/non_linux.rs:8
`before_retry` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — lib/saluki-io/src/net/util/retry/lifecycle/mod.rs:25
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Only 20/23 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bin/correctness/courier`, `bin/correctness/otlp-fixtures`, `lib/saluki-api`.
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.
`check-aws-lc-fips-certification.yml` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.
What to do
Trigger your SAST workflow on pull requests — a scan that only runs on a cron reports history, it does not 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.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Do you agree with this assessment?
P5 · DR & Backup3.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
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.
`ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — bin/correctness/panoramic/src/actions/core_agent_config_set.rs:187, bin/correctness/panoramic/src/assertions/http_check.rs:121
What to do
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 the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
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 (`.serve_connection(` (lib/saluki-io/src/net/server/http.rs:731)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`.danger_accept_invalid_certs(true)` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on. — bin/correctness/panoramic/src/actions/core_agent_config_set.rs:188
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: `.serve_connection(` (lib/saluki-io/src/net/server/http.rs:731).
What to do
Stop accepting every TLS certificate: delete `danger_accept_invalid_certs(true)` / `SslVerifyMode::NONE` / the rustls verifier that returns `ServerCertVerified::assertion()` unconditionally, and trust a self-signed or private server by adding its CA as a root (`add_root_certificate`, a rustls `RootCertStore`) — never by switching verification off.
Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
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.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.4 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`next` is public and takes a `IntoIter` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-env/src/workload/helpers/mod.rs:105
`name` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 501 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `name` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/runtime/supervisor.rs:501
`wants_shutdown_signal` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 513 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `wants_shutdown_signal` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/runtime/supervisor.rs:513
`shutdown_strategy` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 520 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `shutdown_strategy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/runtime/supervisor.rs:520
`clone` is public and takes a `SupervisedChild` as its receiver from its caller, and it recurses at line 620 through `inner_clone` and back with a piece of the document (and at line 1673, line 1674) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/runtime/supervisor.rs:620
`drop` is public, takes a document from its caller (line 351) and hands it to `take`, which calls itself at line 407 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `take` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/runtime/scope/mod.rs:407
`total_minimum_required_bytes` is public and takes a `ComponentBounds` as its receiver from its caller, and it calls itself at line 174 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `total_minimum_required_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/accounting/mod.rs:174
`total_firm_limit_bytes` is public and takes a `ComponentBounds` as its receiver from its caller, and it calls itself at line 186 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `total_firm_limit_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/accounting/mod.rs:186
`as_bounds` is public and takes a `ComponentMetadata` as its receiver from its caller, and it calls itself at line 118 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `as_bounds` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/saluki-core/src/accounting/registry.rs:118
`load_schema_from_value` is public, takes a document from its caller (line 106) and hands it to `collect_entries`, which calls itself at line 136 with a piece of the document (and at line 141) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `collect_entries` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/datadog-agent/config-overlay-model/src/schema_gen.rs:136
`decode` is public, takes a document from its caller (line 205) and hands it to `go_value`, which calls itself at line 196 with a piece of the document (and at line 199) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `go_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/datadog-agent/config-corpus/src/getter.rs:196
`to_value` is public and takes a `Json` as its receiver from its caller, and it calls itself at line 332 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `to_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/datadog-agent/config-corpus/src/json.rs:332
`all_explicit` is public, takes a document from its caller (line 59) and hands it to `from_value`, which calls itself at line 221 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `from_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — lib/agent-data-plane-config-system/src/source.rs:221
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
`Arc::into_raw(value)` (line 458) gives up ownership in exchange for a raw handle — the value's `Drop` will no longer run — and nothing in the crate's code ever reclaims a `Arc` from a raw pointer (`Arc::from_raw`). The memory or descriptor stays allocated until the process ends, once per call. Pair the hand-out with its reclaim (a `free` function that rebuilds the owner with `from_raw` and drops it), or keep the owning value. — lib/stringtheory/src/lib.rs:458
`writer` (line 271) is a `BufWriter` this function owns and never releases: no `flush()` (or `into_inner()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a buffered writer that is dropped flushes and throws the error away, so a failed write reports success. Release it where the work ends. — lib/saluki-components/src/sources/dogstatsd/replay/writer.rs:271
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
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. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.
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.
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.
`AgentContextRecord.tagger_tags` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — bin/agent-data-plane/src/dogstatsd_contexts/artifact.rs:196
`AgentContextRecord.no_index` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — bin/agent-data-plane/src/dogstatsd_contexts/artifact.rs:198
`Cli._help` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — bin/correctness/panoramic/src/cli.rs:124
`ResourceUsage.live_objects` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — lib/saluki-core/src/runtime/tree/snapshot.rs:203
What to do
Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
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. Whether a `for … range` leaves the slice or map it is walking alone — Go raises nothing, but the walk and the collection part: a range evaluates its slice once, so an element appended in the body is never visited and a removal by reslicing (`s = append(s[:i], s[i+1:]...)`, `slices.Delete`) shifts the next element under the index, which is then skipped while the last is read twice; a reslice, a reassignment or a sort leaves every later `s[i]` naming another element; and a map's order is unspecified, so deleting another key (or clearing the map) changes from run to run which entries the loop still sees.
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.
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.
`debug!` at line 781 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`. — lib/saluki-tls/src/lib.rs:781
`debug!` at line 786 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`. — lib/saluki-tls/src/lib.rs:786
`info!` at line 160 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`. — lib/saluki-io/src/net/util/retry/queue/persisted.rs:160
`warn!` at line 318 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`. — lib/saluki-io/src/net/util/retry/queue/persisted.rs:318
`warn!` at line 49 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`. — lib/saluki-io/src/net/util/retry/lifecycle/http.rs:49
`debug!` at line 26 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`. — lib/saluki-io/src/net/util/retry/lifecycle/mod.rs:26
`warn!` at line 766 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`. — lib/saluki-io/src/net/server/http.rs:766
`debug!` at line 166 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`. — lib/saluki-io/src/net/client/http/conn.rs:166
`warn!` at line 261 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`. — lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:261
`trace!` at line 94 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: `trace!(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`. — lib/saluki-env/src/workload/on_demand_pid/linux.rs:94
`trace!` at line 100 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: `trace!(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`. — lib/saluki-env/src/workload/on_demand_pid/linux.rs:100
`debug!` at line 110 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`. — lib/saluki-env/src/workload/on_demand_pid/linux.rs:110
`debug!` at line 116 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`. — lib/saluki-env/src/workload/on_demand_pid/linux.rs:116
`warn!` at line 36 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:36
`warn!` at line 40 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:40
`info!` at line 60 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:60
`warn!` at line 75 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:75
`debug!` at line 174 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:174
`debug!` at line 184 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:184
`warn!` at line 191 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:191
`warn!` at line 235 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:235
`debug!` at line 265 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`. — lib/saluki-env/src/autodiscovery/providers/local.rs:265
`debug!` at line 179 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`. — lib/saluki-core/src/runtime/restart.rs:179
`debug!` at line 1218 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`. — lib/saluki-core/src/runtime/supervisor.rs:1218
`error!` at line 1421 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`. — lib/saluki-core/src/runtime/supervisor.rs:1421
`debug!` at line 329 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`. — lib/saluki-core/src/health/mod.rs:329
`warn!` at line 373 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`. — lib/saluki-core/src/data_model/origin.rs:373
`warn!` at line 386 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`. — lib/saluki-core/src/data_model/origin.rs:386
`warn!` at line 211 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`. — lib/saluki-core/src/accounting/limiter.rs:211
`info!` 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: `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`. — lib/saluki-core/src/accounting/limiter.rs:219
`error!` at line 610 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`. — lib/saluki-config/src/lib.rs:610
`warn!` at line 66 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`. — lib/saluki-config/src/dynamic/watcher.rs:66
`warn!` at line 394 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`. — lib/saluki-components/src/transforms/trace_sampler/event_processor.rs:394
`debug!` at line 802 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`. — lib/saluki-components/src/transforms/trace_sampler/mod.rs:802
`warn!` at line 159 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`. — lib/saluki-components/src/transforms/dogstatsd_mapper/mod.rs:159
`debug!` at line 87 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`. — lib/saluki-components/src/transforms/chained/mod.rs:87
`error!` at line 194 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`. — lib/saluki-components/src/transforms/apm_stats/statsraw.rs:194
`error!` at line 138 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`. — lib/saluki-components/src/transforms/aggregate/config.rs:138
`error!` at line 151 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`. — lib/saluki-components/src/transforms/aggregate/config.rs:151
`error!` at line 155 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`. — lib/saluki-components/src/transforms/aggregate/config.rs:155
Other · Code Health — Whether Rust's absent values are handled rather than forced — `Option` and `Result` make absence a value the caller must handle in every crate, and each `.unwrap()` or `.expect()` that no guard on its path proves present is a panic the first time the value is `None` or `Err`.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
`shards.try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `with_capacity` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/stringtheory/src/interning/fixed_size.rs:569
`DEFAULT_CRYPTO_PROVIDER_SET.set(())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `initialize_default_crypto_provider` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-tls/src/lib.rs:599
`SHA256_SUITE.common.hash_provider.hash(data).as_ref().try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `sha256` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-tls/src/lib.rs:636
`DEFAULT_ROOT_CERT_STORE.set(Arc::new(root_cert_store))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `load_platform_root_certificates` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-tls/src/lib.rs:734
`std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-metadata/build.rs:43
`std::fs::write(details_file,format!(r#"
pub const DETECTED_GIT_HASH: &str = "{}";
pub const DETECTED_APP_BUILD_TIME: &str = "{}";
pub const DETECTED_APP_DEV_BUILD: bool = {};
pub const DETECTED_TARGET_ARCH: &str = "{}";
"#,app_git_hash,app_build_time,app_dev_build,target_arch,),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-metadata/build.rs:56
`self.pending.pop_front()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `push` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/util/retry/queue/mod.rs:255
`self.persisted_pending.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `push` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/util/retry/queue/mod.rs:263
`this.req.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `poll` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — lib/saluki-io/src/net/util/middleware/retry_circuit_breaker.rs:123, lib/saluki-io/src/net/util/middleware/retry_circuit_breaker.rs:157
`Supervisor::new(&*self.name)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `into_supervisor` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/server/http.rs:400
`listen_address.as_windows_named_pipe_path()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `from_listen_address` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/listener/mod.rs:263
`uri.scheme_str()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/client/http/telemetry.rs:216
`uri.host()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/client/http/telemetry.rs:216
`domain.get(endpoint_name)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_telemetry_handle` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/net/client/http/telemetry.rs:306
`self.data.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `freeze` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-io/src/buf/vec.rs:82
`self.state.try_lock()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_store` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/aggregator.rs:64
`self.state.try_lock()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `specify_bounds` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/aggregator.rs:79
`CacheBuilder::from_identifier("origin_cache")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/origin.rs:122
`NonZeroUsize::new(DEFAULT_PID_CACHE_CACHED_PIDS_LIMIT)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/on_demand_pid/linux.rs:60
`Endpoint::try_from("https://[::]")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/helpers/containerd/mod.rs:94
`ns.name.parse()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_timed_namespaced_request` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/workload/helpers/containerd/mod.rs:221
`configs.get(&config_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `process_yaml_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/autodiscovery/providers/local.rs:181
`path.file_stem()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scan_and_emit_events` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/autodiscovery/providers/local.rs:220
`configs.remove(&config_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scan_and_emit_events` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-env/src/autodiscovery/providers/local.rs:268
`self.build_state.get_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `state_mut` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/blueprint.rs:150
`self.build_state.get_mut().expect("topology blueprint mutex poisoned").as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `state_mut` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/blueprint.rs:152
`self.health_registry.clone()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `topology_ready` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/blueprint.rs:228
`topology_shutdown_trigger.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `initialize` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/blueprint.rs:1127
`outputs.iter().find(|output|output.component_output().output()==id.output()).map(|output|output.output_ty())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_output_type` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/graph.rs:455
`traversal.back().cloned()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `check_for_cycles` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/graph.rs:543
`self.get_component_type(component_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `get_outbound_directed_edges` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/graph.rs:619
`self.get_component_type(&raw_from_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_outbound_directed_edges` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/graph.rs:640
`self.get_component_type(&raw_to_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_outbound_directed_edges` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/graph.rs:647
`item` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `send` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/interconnect/dispatcher.rs:139
`self.events.swap_remove_back(i)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `extract_events` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/topology/interconnect/event_buffer.rs:143
`self.restart_history.front()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `evaluate_restart` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/runtime/restart.rs:173
`` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `create_process` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — lib/saluki-core/src/runtime/supervisor.rs:554
`roster.get(child_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `supervise` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — lib/saluki-core/src/runtime/supervisor.rs:1408, lib/saluki-core/src/runtime/supervisor.rs:1495
What to do
Each row is a forced `Option`/`Result` no guard on its path proves present. Handle the absent case where it arises rather than forcing it: `?` to hand it to the caller, `if let` / `match` / `let … else` to branch on it, `unwrap_or` / `unwrap_or_default` / `unwrap_or_else` where a default is right. Where the value genuinely cannot be absent, say so in a way a reader can check from the line: test it first (`if x.is_none() { return … }`), look the key up with `contains_key` or the index against `len()`, or construct the value so it cannot be absent.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 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 — 7 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 51 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: Go's fx constructs every dependency once for the life of the application, so there is no shorter lifetime to capture.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Go request handler (a net/http, Gin, Echo, Fiber or fasthttp handler, or a gRPC service method) is declared as a method or function, and no handler function literal writes a value captured from outside it, so no state is shared between request goroutines. 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 — AX6 reached only 3% of this repository's production lines — rust (270,816 lines), c (3 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — - InvalidDefaultArgInFrom: Default value for ARG ${APP_IMAGE} results in empty or invalid base image name (line 14) REDACTED:4 -------------------- 2 | ARG APP_IMAGE 3 | 4 | >>> FROM ${BUILD_IMAGE} AS builder 5 | 6 | # Build the binary. -------------------- ERROR: failed to solve: base name (${BUILD_IMAGE}) should not be blank; likely cause (not identified): the image build failed, and its output does not match a cause we recognise; runtime evidence skipped 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 — ~26808 lines of test source are present (.rs, .go) 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
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 — D21 withholds its case and prefix conventions rows: 10 candidate(s) found and not reported.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .go, .py, .rs source were not judged.
D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D8 Code Coverage — Coverage not measured — Rust suite
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
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
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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — X26 reached only 3% of this repository's production lines — rust (270,816 lines), typescript (81 lines), javascript (34 lines), c (3 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 3% of this repository's production lines — rust (270,816 lines), c (3 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 69 finding(s)
ED1 · Handler temporal coupling· Blocking call on the event loop · ×40
Blocking call on the event loop: src.run_inner calls `std::fs::write` bin/agent-data-plane/src/main.rs:221— `src.run_inner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.run_inner calls `std::fs::remove_file` bin/agent-data-plane/src/main.rs:248— `src.run_inner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: config.load_case calls `std::fs::read_to_string` bin/correctness/panoramic/src/config.rs:690— `config.load_case` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: config.discover_tests calls `std::fs::read_dir` bin/correctness/panoramic/src/config.rs:727— `config.discover_tests` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: config.try_load_test calls `std::fs::read_to_string` bin/correctness/panoramic/src/config.rs:768— `config.try_load_test` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: k8s.run_k8s_correctness_test calls `std::fs::read_to_string` bin/correctness/panoramic/src/correctness/k8s.rs:124— `k8s.run_k8s_correctness_test` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: k8s.build_agent_config_volumes calls `std::fs::read_to_string` bin/correctness/panoramic/src/correctness/k8s.rs:858— `k8s.build_agent_config_volumes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: CorrectnessRunner.build_shared_millstone_group_runner calls `std::fs::create_dir_all` bin/correctness/panoramic/src/correctness/runner.rs:249— `CorrectnessRunner.build_shared_millstone_group_runner` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.collect_diagnostic_lines calls `File::open` bin/correctness/panoramic/src/machine_output.rs:437— `machine_output.collect_diagnostic_lines` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.write_detail_files calls `std::fs::create_dir_all` bin/correctness/panoramic/src/machine_output.rs:512— `machine_output.write_detail_files` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.write_detail_files calls `File::create` bin/correctness/panoramic/src/machine_output.rs:528— `machine_output.write_detail_files` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.write_json calls `std::fs::write` bin/correctness/panoramic/src/machine_output.rs:558— `machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.write_json calls `std::fs::rename` bin/correctness/panoramic/src/machine_output.rs:558— `machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::rename`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: machine_output.write_json calls `std::fs::remove_file` bin/correctness/panoramic/src/machine_output.rs:561— `machine_output.write_json` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: src.run_tests calls `std::fs::create_dir_all` bin/correctness/panoramic/src/main.rs:246— `src.run_tests` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: mounts.apply_target_mounts calls `std::fs::read_dir` bin/correctness/panoramic/src/mounts.rs:34— `mounts.apply_target_mounts` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: IntegrationRunner.write_logs calls `File::create` bin/correctness/panoramic/src/runner.rs:1096— `IntegrationRunner.write_logs` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: IntegrationRunner.write_logs calls `File::create` bin/correctness/panoramic/src/runner.rs:1104— `IntegrationRunner.write_logs` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: runner.write_result_log calls `File::create` bin/correctness/panoramic/src/runner.rs:1124— `runner.write_result_log` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.try_write_decoded calls `std::fs::create_dir_all` bin/correctness/panoramic/src/traffic.rs:231— `traffic.try_write_decoded` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.try_write_decoded calls `std::fs::remove_file` bin/correctness/panoramic/src/traffic.rs:239— `traffic.try_write_decoded` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.write_decoded_records calls `File::create` bin/correctness/panoramic/src/traffic.rs:249— `traffic.write_decoded_records` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::create`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.write_marker calls `std::fs::create_dir_all` bin/correctness/panoramic/src/traffic.rs:309— `traffic.write_marker` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.write_marker calls `std::fs::write` bin/correctness/panoramic/src/traffic.rs:309— `traffic.write_marker` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Blocking call on the event loop: traffic.missing_input_reason calls `std::fs::read_to_string` bin/correctness/panoramic/src/traffic.rs:451— `traffic.missing_input_reason` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
Boundary-crossing change coupling: datadog_translator.rs ↔ control.rs lib/agent-data-plane-config-system/src/translators/datadog_translator.rs:1— `lib/agent-data-plane-config-system/src/translators/datadog_translator.rs` (context agent-data-plane-config-system) and `lib/agent-data-plane-config/src/control.rs` (context agent-data-plane-config) sit in DIFFERENT parts of the tree yet change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `3a972729` feat(config): read `logs_enabled` and `log_enabled` (#3193); `d95fa93c` fix(agent-data-plane): connect to the Agent IPC server at cmd_host (#…; `3f020041` feat(config): model the experimental APM proxy configuration (#2924) — run `git show` on any of them.
Boundary-crossing change coupling: defaults.rs ↔ saluki_keys.rs lib/agent-data-plane-config/src/defaults.rs:1— `lib/agent-data-plane-config/src/defaults.rs` (context agent-data-plane-config) and `lib/datadog-agent/config-overlay-model/src/saluki_keys.rs` (context datadog-agent) sit in DIFFERENT parts of the tree yet change together 60% of the time (9 of the 15 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 `3f020041` feat(config): model the experimental APM proxy configuration (#2924); `36812693` feat(config): add APM v1.0 trace pipeline settings (#2593); `087aae40` chore(config): app memory settings from typed config (#2522) — run `git show` on any of them.
Boundary-crossing change coupling: metadata.rs ↔ mod.rs lib/saluki-core/src/data_model/event/metric/metadata.rs:1— `lib/saluki-core/src/data_model/event/metric/metadata.rs` (context saluki-core) and `lib/saluki-io/src/deser/codec/dogstatsd/mod.rs` (context saluki-io) sit in DIFFERENT parts of the tree yet change together 58% of the time (11 of the 19 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 11 shared commits counted here, the most recent 3 are `799f140d` experiment: enrich metrics directly in the DSD source (#415) (at that commit the file was still `lib/saluki-event/src/metric/metadata.rs`); `16888ac7` chore: wire up External Data support for origin detection (#389) (at that commit the file was still `lib/saluki-event/src/metric/metadata.rs`); `7e1f0871` bring back sentinel empty strings for size optimization (at that commit the file was still `lib/saluki-event/src/metric/metadata.rs`) — run `git show` on any of them.
Boundary-crossing change coupling: mod.rs ↔ dispatcher.rs lib/saluki-components/src/sources/dogstatsd/mod.rs:1— `lib/saluki-components/src/sources/dogstatsd/mod.rs` (context saluki-components) and `lib/saluki-core/src/topology/interconnect/dispatcher.rs` (context saluki-core) sit in DIFFERENT parts of the tree yet change together 52% of the time (11 of the 21 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 11 shared commits counted here, the most recent 3 are `14282980` chore(antithesis): Expand cheap-win antithesis SDK assertions (#1930); `0c8b7aa4` chore(antithesis): Migrate Antithesis SDK to saluki-antithesis (#1928); `15b07cca` chore(metrics): begin splitting internal metrics between trace/debug/… — run `git show` on any of them.
Boundary-crossing change coupling: mod.rs ↔ mod.rs lib/saluki-core/src/data_model/event/eventd/mod.rs:1— `lib/saluki-core/src/data_model/event/eventd/mod.rs` (context saluki-core) and `lib/saluki-io/src/deser/codec/dogstatsd/mod.rs` (context saluki-io) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `efb3648d` chore(docs): improve technical terms detection (#1665); `20721f34` enhancement: add origin detection support to DogStatsD events and ser…; `3faee99c` chore: switch to MetaString for events/service checks (#169) (at that commit the file was still `lib/saluki-event/src/eventd/mod.rs`) — run `git show` on any of them.
Dependency-rule violation: saluki-app (Application) → saluki-api (Web) — `saluki-app` is a Application project but references `saluki-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
Dependency-rule violation: saluki-core (Domain) → saluki-api (Web) — `saluki-core` is a Domain project but references `saluki-api`, a Web project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one.
D30 · Dependency Vulnerabilities· High vulnerability · ×1
TLS certificate validation disabled bin/correctness/panoramic/src/actions/core_agent_config_set.rs:188— `.danger_accept_invalid_certs(true)` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer — reqwest, native-tls, rustls and openssl's `SslConnector` all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: `reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(…))`, a rustls `RootCertStore` holding its CA, or `SslConnectorBuilder::set_ca_file`, which keeps the chain and hostname checks on.
TodoComment lib/stringtheory/src/lib.rs:905— // TODO: We're foregoing additional code/complexity to recover a static reference, when our string storage is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/compression.rs:234— /// TODO: We should probably move this into `Compressor` itself, because it will also make it easier to do — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/net/addr.rs:125— // TODO: why did i do this? it's totally possible to connect to a unix domain socket locally... — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/net/util/retry/queue/persisted.rs:350— // TODO: Evaluate the possible failures scenarios a little more thoroughly, and see if we can improve — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/net/unix/mod.rs:112— // TODO: We technically don't need to do this for SOCK_STREAM because we can do it once when the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:184— // TODO: Should we throw an error, warn, or be silently permissive? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:191— // TODO: Similarly to the above comment, should having any remaining data here cause us to throw an error, warn, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/deser/codec/dogstatsd/mod.rs:235— // TODO: Can probably assert remaining is empty now. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-io/src/buf/vec.rs:165— // TODO: it's not great that we're manually emulating the internal structure of `BytesBuffer`, since the whole point is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/aggregator.rs:16— // TODO: Make this configurable. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/stores/external_data.rs:135— // TODO: Maybe come up with a better pattern for doing "only clone for the first N-1 actions, don't clone for the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/stores/tag.rs:178— // TODO: Maybe come up with a better pattern for doing "only clone for the first N-1 actions, don't clone for the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/stores/tag.rs:208— // TODO: We don't properly consider the hierarchy mappings here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/stores/tag.rs:227— // See TODO note about why this is an estimate. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/helpers/containerd/events.rs:102— // TODO: Thread the tag interner used by `ContainerdCollector` through to this point, so in the future when — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/collectors/cgroups.rs:119— // TODO: Kind of a throwaway calculation because nothing about the reader can really be bounded at the moment. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/collectors/containerd.rs:107— // TODO: Kind of a throwaway calculation because nothing about the gRPC client can really be bounded at the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:260— // TODO: Kind of a throwaway calculation because nothing about the gRPC client can really be bounded at the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:274— // TODO: Kind of a throwaway calculation because nothing about the gRPC client can really be bounded at the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-env/src/workload/collectors/containerd.rs:226— // TODO: We should be creating this stream -- and polling it! -- before we build our initial metadata — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-core/src/topology/blueprint.rs:554— // TODO: Add a minimum subitem for payloads when we have payload interconnects. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-core/src/topology/blueprint.rs:562— // TODO: Somewhat fragile. Need to revisit this. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-core/src/topology/blueprint.rs:563— // TODO: Add a firm subitem for payloads when we have payload interconnects. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-core/src/topology/interconnect/consumer.rs:147— // TODO: This API for querying the metrics really sucks... and we need something better. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment lib/saluki-core/src/topology/interconnect/consumer.rs:168— // TODO: This API for querying the metrics really sucks... and we need something better. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
saluki_components::encoders::datadog::metrics::run_request_builder (cognitive 139) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:777— saluki_components::encoders::datadog::metrics::run_request_builder has cognitive complexity 139 (threshold 15). Drivers by points: if/else 31 (116 pts), match/switch 5 (13 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 95). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
saluki_components::sources::otlp::logs::transform::transform_log_record (cognitive 93) lib/saluki-components/src/sources/otlp/logs/transform.rs:213— saluki_components::sources::otlp::logs::transform::transform_log_record has cognitive complexity 93 (threshold 15). Drivers by points: if/else 26 (72 pts), loops 6 (12 pts), match/switch 5 (9 pts) (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
saluki_components::sources::otlp::run_converter (cognitive 88) lib/saluki-components/src/sources/otlp/mod.rs:417— saluki_components::sources::otlp::run_converter has cognitive complexity 88 (threshold 15). Drivers by points: if/else 17 (55 pts), loops 6 (23 pts), match/switch 3 (10 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
saluki_components::encoders::datadog::metrics::write_metric_to_v3 (cognitive 63) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1685— saluki_components::encoders::datadog::metrics::write_metric_to_v3 has cognitive complexity 63 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 7 (15 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 32). 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.
saluki_components::common::otlp::traces::transform::otel_span_to_dd_span (cognitive 58) lib/saluki-components/src/common/otlp/traces/transform.rs:257— saluki_components::common::otlp::traces::transform::otel_span_to_dd_span has cognitive complexity 58 (threshold 15). Drivers by points: if/else 33 (52 pts), boolean chains 3, loops 3 (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.
saluki_components::encoders::datadog::stats::run_request_builder (cognitive 50) lib/saluki-components/src/encoders/datadog/stats/mod.rs:275— saluki_components::encoders::datadog::stats::run_request_builder has cognitive complexity 50 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 5 (19 pts), loops 4 (11 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.
saluki_components::encoders::datadog::traces::run_request_builder (cognitive 50) lib/saluki-components/src/encoders/datadog/traces/mod.rs:401— saluki_components::encoders::datadog::traces::run_request_builder has cognitive complexity 50 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 5 (19 pts), loops 4 (11 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.
saluki_components::common::otlp::traces::normalize::normalize_unchecked (cognitive 47) lib/saluki-components/src/common/otlp/traces/normalize.rs:281— saluki_components::common::otlp::traces::normalize::normalize_unchecked has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (42 pts), boolean chains 4, loops 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 (cognitive 44) lib/saluki-components/src/common/otlp/traces/transform.rs:1238— saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (40 pts), match/switch 1 (2 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.
saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal (cognitive 41) lib/saluki-components/src/common/otlp/traces/transform.rs:980— saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 6, match/switch 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.
saluki_components::transforms::trace_obfuscation::sql::obfuscate_sql_string (cognitive 38) lib/saluki-components/src/transforms/trace_obfuscation/sql.rs:17— saluki_components::transforms::trace_obfuscation::sql::obfuscate_sql_string has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (26 pts), match/switch 4 (8 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
saluki_components::common::otlp::traces::transform::get_otel_resource_v2 (cognitive 37) lib/saluki-components/src/common/otlp/traces/transform.rs:1452— saluki_components::common::otlp::traces::transform::get_otel_resource_v2 has cognitive complexity 37 (threshold 15). Drivers by points: if/else 23 (37 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.
saluki_components::common::datadog::io::run_endpoint_io_loop (cognitive 35) lib/saluki-components/src/common/datadog/io.rs:919— saluki_components::common::datadog::io::run_endpoint_io_loop has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 6 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 20). 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.
saluki_components::common::otlp::traces::transform::status_to_error (cognitive 34) lib/saluki-components/src/common/otlp/traces/transform.rs:2189— saluki_components::common::otlp::traces::transform::status_to_error has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (27 pts), match/switch 1 (4 pts), loops 2 (3 pts) (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.
saluki_components::transforms::trace_obfuscation::credit_cards::valid_card_prefix (cognitive 32) lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:163— saluki_components::transforms::trace_obfuscation::credit_cards::valid_card_prefix has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 9, match/switch 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.
saluki_components::sources::otlp::metrics::translator::runtime::map_sum_runtime_metric_with_attributes (cognitive 28) lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:11— saluki_components::sources::otlp::metrics::translator::runtime::map_sum_runtime_metric_with_attributes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 2 (5 pts) (nesting depth added 20). 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. This shape REPEATS in the file: one other method here (saluki_components::sources::otlp::metrics::translator::runtime::map_gauge_runtime_metric_with_attributes) 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.
saluki_components::sources::otlp::metrics::translator::runtime::map_gauge_runtime_metric_with_attributes (cognitive 28) lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:67— saluki_components::sources::otlp::metrics::translator::runtime::map_gauge_runtime_metric_with_attributes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 2 (5 pts) (nesting depth added 20). 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. This shape REPEATS in the file: one other method here (saluki_components::sources::otlp::metrics::translator::runtime::map_sum_runtime_metric_with_attributes) 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.
saluki_components::common::otlp::traces::normalize::normalize_name (cognitive 25) lib/saluki-components/src/common/otlp/traces/normalize.rs:83— saluki_components::common::otlp::traces::normalize::normalize_name has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, loops 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.
saluki_components::common::otlp::attributes::tags_from_attributes (cognitive 24) lib/saluki-components/src/common/otlp/attributes/mod.rs:154— saluki_components::common::otlp::attributes::tags_from_attributes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). 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.
saluki_components::transforms::trace_obfuscation::redis::quantize_redis_string (cognitive 23) lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:13— saluki_components::transforms::trace_obfuscation::redis::quantize_redis_string has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, 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.
saluki_components::sources::otlp::metrics::remap::has_any (cognitive 22) lib/saluki-components/src/sources/otlp/metrics/remap.rs:587— saluki_components::sources::otlp::metrics::remap::has_any has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 2 (3 pts) (nesting depth added 15). 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.
saluki_components::transforms::aggregate::transform_and_push_metric (cognitive 22) lib/saluki-components/src/transforms/aggregate/mod.rs:874— saluki_components::transforms::aggregate::transform_and_push_metric has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 11). 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.
saluki_components::transforms::apm_stats::peer_ip_quantize::parse_ipv4 (cognitive 22) lib/saluki-components/src/transforms/apm_stats/peer_ip_quantize.rs:234— saluki_components::transforms::apm_stats::peer_ip_quantize::parse_ipv4 has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 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.
saluki_components::common::datadog::io::run_io_loop (cognitive 21) lib/saluki-components/src/common/datadog/io.rs:654— saluki_components::common::datadog::io::run_io_loop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (4 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.
saluki_components::common::otlp::traces::transform::conditionally_map_otlp_attribute (cognitive 21) lib/saluki-components/src/common/otlp/traces/transform.rs:2349— saluki_components::common::otlp::traces::transform::conditionally_map_otlp_attribute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
+ 17 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×40
Symbol treated as nullable, then dereferenced unguarded lib/stringtheory/src/interning/fixed_size.rs:569— `shards.try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `with_capacity` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-tls/src/lib.rs:599— `DEFAULT_CRYPTO_PROVIDER_SET.set(())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `initialize_default_crypto_provider` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-tls/src/lib.rs:636— `SHA256_SUITE.common.hash_provider.hash(data).as_ref().try_into()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `sha256` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-tls/src/lib.rs:734— `DEFAULT_ROOT_CERT_STORE.set(Arc::new(root_cert_store))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `load_platform_root_certificates` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-metadata/build.rs:43— `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-metadata/build.rs:56— `std::fs::write(details_file,format!(r#"
pub const DETECTED_GIT_HASH: &str = "{}";
pub const DETECTED_APP_BUILD_TIME: &str = "{}";
pub const DETECTED_APP_DEV_BUILD: bool = {};
pub const DETECTED_TARGET_ARCH: &str = "{}";
"#,app_git_hash,app_build_time,app_dev_build,target_arch,),)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/util/retry/queue/mod.rs:255— `self.pending.pop_front()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `push` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/util/retry/queue/mod.rs:263— `self.persisted_pending.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `push` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/util/middleware/retry_circuit_breaker.rs:123— `this.req.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `poll` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/util/middleware/retry_circuit_breaker.rs:157— `this.req.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `poll` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/server/http.rs:400— `Supervisor::new(&*self.name)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `into_supervisor` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/listener/mod.rs:263— `listen_address.as_windows_named_pipe_path()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `from_listen_address` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/client/http/telemetry.rs:216— `uri.scheme_str()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/client/http/telemetry.rs:216— `uri.host()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/net/client/http/telemetry.rs:306— `domain.get(endpoint_name)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `get_telemetry_handle` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-io/src/buf/vec.rs:82— `self.data.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `freeze` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/aggregator.rs:64— `self.state.try_lock()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `add_store` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/aggregator.rs:79— `self.state.try_lock()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `specify_bounds` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/origin.rs:122— `CacheBuilder::from_identifier("origin_cache")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/on_demand_pid/linux.rs:60— `NonZeroUsize::new(DEFAULT_PID_CACHE_CACHED_PIDS_LIMIT)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/helpers/containerd/mod.rs:94— `Endpoint::try_from("https://[::]")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `new` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/workload/helpers/containerd/mod.rs:221— `ns.name.parse()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_timed_namespaced_request` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/autodiscovery/providers/local.rs:181— `configs.get(&config_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `process_yaml_file` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/autodiscovery/providers/local.rs:220— `path.file_stem()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scan_and_emit_events` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Symbol treated as nullable, then dereferenced unguarded lib/saluki-env/src/autodiscovery/providers/local.rs:268— `configs.remove(&config_id)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scan_and_emit_events` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
Hotspot: lib/agent-data-plane-config-system/src/saluki_only.rs lib/agent-data-plane-config-system/src/saluki_only.rs:536— lib/agent-data-plane-config-system/src/saluki_only.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in SalukiOnly::seed at line 536. 1 of those changes was a fix/bug commit, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/agent-data-plane-config-system/src/saluki_only.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: lib/saluki-components/src/encoders/datadog/metrics/mod.rs lib/saluki-components/src/encoders/datadog/metrics/mod.rs:777— lib/saluki-components/src/encoders/datadog/metrics/mod.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in saluki_components::encoders::datadog::metrics::run_request_builder at line 777. 3 of those changes were fix/bug commits, and the other 15 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/encoders/datadog/metrics/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/sources/otlp/mod.rs lib/saluki-components/src/sources/otlp/mod.rs:417— lib/saluki-components/src/sources/otlp/mod.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in saluki_components::sources::otlp::run_converter at line 417. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/sources/otlp/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/encoders/datadog/traces/mod.rs lib/saluki-components/src/encoders/datadog/traces/mod.rs:595— lib/saluki-components/src/encoders/datadog/traces/mod.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in TraceEndpointEncoder::encode_tracer_payload at line 595. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/encoders/datadog/traces/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/sources/dogstatsd/mod.rs lib/saluki-components/src/sources/dogstatsd/mod.rs:1642— lib/saluki-components/src/sources/dogstatsd/mod.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in DogStatsDDecoder::decode_buffer_contents at line 1642. 6 of those changes were fix/bug commits, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/sources/dogstatsd/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: bin/correctness/panoramic/src/main.rs bin/correctness/panoramic/src/main.rs:154— bin/correctness/panoramic/src/main.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in panoramic::run_tests at line 154. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- bin/correctness/panoramic/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: lib/saluki-components/src/common/datadog/io.rs lib/saluki-components/src/common/datadog/io.rs:919— lib/saluki-components/src/common/datadog/io.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in saluki_components::common::datadog::io::run_endpoint_io_loop at line 919. 4 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/common/datadog/io.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: lib/saluki-components/src/sources/otlp/logs/transform.rs lib/saluki-components/src/sources/otlp/logs/transform.rs:213— lib/saluki-components/src/sources/otlp/logs/transform.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in saluki_components::sources::otlp::logs::transform::transform_log_record at line 213. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/sources/otlp/logs/transform.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: lib/saluki-components/src/transforms/trace_sampler/mod.rs lib/saluki-components/src/transforms/trace_sampler/mod.rs:487— lib/saluki-components/src/transforms/trace_sampler/mod.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in TraceSampler::run_samplers_inner at line 487. 3 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/transforms/trace_sampler/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/common/otlp/traces/transform.rs lib/saluki-components/src/common/otlp/traces/transform.rs:257— lib/saluki-components/src/common/otlp/traces/transform.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in saluki_components::common::otlp::traces::transform::otel_span_to_dd_span at line 257. 1 of those changes was a fix/bug commit, and the other 8 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/common/otlp/traces/transform.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: bin/correctness/panoramic/src/runner.rs bin/correctness/panoramic/src/runner.rs:604— bin/correctness/panoramic/src/runner.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in IntegrationRunner::run at line 604. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- bin/correctness/panoramic/src/runner.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: lib/saluki-core/src/runtime/supervisor.rs lib/saluki-core/src/runtime/supervisor.rs:1353— lib/saluki-core/src/runtime/supervisor.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Supervisor::supervise at line 1353. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-core/src/runtime/supervisor.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/transforms/aggregate/mod.rs lib/saluki-components/src/transforms/aggregate/mod.rs:461— lib/saluki-components/src/transforms/aggregate/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in Aggregate::run at line 461. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/transforms/aggregate/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:156— lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in OtlpMetricsTranslator::translate_metrics_inner at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: bin/correctness/panoramic/src/correctness/k8s.rs bin/correctness/panoramic/src/correctness/k8s.rs:47— bin/correctness/panoramic/src/correctness/k8s.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in panoramic::correctness::k8s::run_k8s_correctness_test at line 47. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- bin/correctness/panoramic/src/correctness/k8s.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: lib/saluki-components/src/common/otlp/traces/translator.rs lib/saluki-components/src/common/otlp/traces/translator.rs:313— lib/saluki-components/src/common/otlp/traces/translator.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in OtlpTracesTranslator::translate_spans at line 313. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/common/otlp/traces/translator.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: lib/saluki-io/src/deser/codec/dogstatsd/metric.rs lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:67— lib/saluki-io/src/deser/codec/dogstatsd/metric.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in saluki_io::deser::codec::dogstatsd::metric::parse_dogstatsd_metric at line 67. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-io/src/deser/codec/dogstatsd/metric.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: lib/datadog-agent/config/build/datadog_config_gen.rs lib/datadog-agent/config/build/datadog_config_gen.rs:817— lib/datadog-agent/config/build/datadog_config_gen.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in datadog_agent_config::build::datadog_config_gen::permissivize at line 817. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/datadog-agent/config/build/datadog_config_gen.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: lib/saluki-components/src/encoders/datadog/stats/mod.rs lib/saluki-components/src/encoders/datadog/stats/mod.rs:275— lib/saluki-components/src/encoders/datadog/stats/mod.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in saluki_components::encoders::datadog::stats::run_request_builder at line 275. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-components/src/encoders/datadog/stats/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-core/src/observability/metrics/mod.rs lib/saluki-core/src/observability/metrics/mod.rs:557— lib/saluki-core/src/observability/metrics/mod.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in saluki_core::observability::metrics::flush_once at line 557. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-core/src/observability/metrics/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-core/src/runtime/worker_state.rs lib/saluki-core/src/runtime/worker_state.rs:320— lib/saluki-core/src/runtime/worker_state.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in WorkerState::shutdown_workers_inner at line 320. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-core/src/runtime/worker_state.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: lib/saluki-io/src/deser/codec/dogstatsd/event.rs lib/saluki-io/src/deser/codec/dogstatsd/event.rs:32— lib/saluki-io/src/deser/codec/dogstatsd/event.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-io/src/deser/codec/dogstatsd/event.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: lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:37— lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in saluki_io::deser::codec::dogstatsd::service_check::parse_dogstatsd_service_check at line 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-io/src/deser/codec/dogstatsd/service_check.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.
saluki_components::sources::otlp::logs::transform::transform_log_record (cyclomatic 44) lib/saluki-components/src/sources/otlp/logs/transform.rs:213— saluki_components::sources::otlp::logs::transform::transform_log_record has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
saluki_components::encoders::datadog::metrics::run_request_builder (cyclomatic 40) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:777— saluki_components::encoders::datadog::metrics::run_request_builder has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
saluki_components::common::otlp::traces::transform::otel_span_to_dd_span (cyclomatic 37) lib/saluki-components/src/common/otlp/traces/transform.rs:257— saluki_components::common::otlp::traces::transform::otel_span_to_dd_span has cyclomatic complexity 37 (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.
saluki_components::encoders::datadog::metrics::write_metric_to_v3 (cyclomatic 36) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1685— saluki_components::encoders::datadog::metrics::write_metric_to_v3 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.
saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal (cyclomatic 30) lib/saluki-components/src/common/otlp/traces/transform.rs:980— saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal 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.
saluki_components::sources::otlp::run_converter (cyclomatic 28) lib/saluki-components/src/sources/otlp/mod.rs:417— saluki_components::sources::otlp::run_converter 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.
saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 (cyclomatic 27) lib/saluki-components/src/common/otlp/traces/transform.rs:1238— saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 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.
saluki_components::transforms::trace_obfuscation::credit_cards::valid_card_prefix (cyclomatic 26) lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:163— saluki_components::transforms::trace_obfuscation::credit_cards::valid_card_prefix 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.
saluki_components::transforms::trace_obfuscation::redis::obfuscate_redis_cmd (cyclomatic 21) lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:222— saluki_components::transforms::trace_obfuscation::redis::obfuscate_redis_cmd 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.
saluki_components::common::otlp::traces::normalize::normalize_unchecked (cyclomatic 20) lib/saluki-components/src/common/otlp/traces/normalize.rs:281— saluki_components::common::otlp::traces::normalize::normalize_unchecked 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.
saluki_components::common::otlp::traces::transform::get_otel_resource_v2 (cyclomatic 20) lib/saluki-components/src/common/otlp/traces/transform.rs:1452— saluki_components::common::otlp::traces::transform::get_otel_resource_v2 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.
saluki_components::common::otlp::traces::normalize::normalize_name (cyclomatic 19) lib/saluki-components/src/common/otlp/traces/normalize.rs:83— saluki_components::common::otlp::traces::normalize::normalize_name 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.
saluki_components::transforms::trace_obfuscation::sql::obfuscate_sql_string (cyclomatic 19) lib/saluki-components/src/transforms/trace_obfuscation/sql.rs:17— saluki_components::transforms::trace_obfuscation::sql::obfuscate_sql_string 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.
saluki_components::common::otlp::traces::transform::status_to_error (cyclomatic 18) lib/saluki-components/src/common/otlp/traces/transform.rs:2189— saluki_components::common::otlp::traces::transform::status_to_error 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. This is NOT this file's highest cyclomatic complexity: saluki_components::common::otlp::traces::transform::grpc_status_code_name_from_str (cyclomatic 19) 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.
saluki_components::common::datadog::io::run_endpoint_io_loop (cyclomatic 17) lib/saluki-components/src/common/datadog/io.rs:919— saluki_components::common::datadog::io::run_endpoint_io_loop has cyclomatic complexity 17 (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.
saluki_components::encoders::datadog::stats::run_request_builder (cyclomatic 17) lib/saluki-components/src/encoders/datadog/stats/mod.rs:275— saluki_components::encoders::datadog::stats::run_request_builder 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.
saluki_components::encoders::datadog::traces::run_request_builder (cyclomatic 17) lib/saluki-components/src/encoders/datadog/traces/mod.rs:401— saluki_components::encoders::datadog::traces::run_request_builder 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.
saluki_components::sources::checks_ipc::check_data_to_event (cyclomatic 17) lib/saluki-components/src/sources/checks_ipc/mod.rs:186— saluki_components::sources::checks_ipc::check_data_to_event 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.
saluki_components::encoders::datadog::metrics::v1::encode_series_metric (cyclomatic 16) lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:29— saluki_components::encoders::datadog::metrics::v1::encode_series_metric 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.
FunctionTooLong: agent_data_plane_config_system::corpus_replay::expected::expectations lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:27— FunctionTooLong — agent_data_plane_config_system::corpus_replay::expected::expectations runs 2006 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 1906 over it, 20.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::sources::otlp::metrics::remap::remap_container_metrics lib/saluki-components/src/sources/otlp/metrics/remap.rs:231— FunctionTooLong — saluki_components::sources::otlp::metrics::remap::remap_container_metrics runs 167 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 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: agent_data_plane_config_system::corpus_replay::expectations::judge lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:983— FunctionTooLong — agent_data_plane_config_system::corpus_replay::expectations::judge runs 166 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 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal lib/saluki-components/src/common/otlp/traces/transform.rs:980— FunctionTooLong — saluki_components::common::otlp::traces::transform::otel_to_dd_span_minimal runs 165 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 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::common::datadog::io::run_endpoint_io_loop lib/saluki-components/src/common/datadog/io.rs:919— FunctionTooLong — saluki_components::common::datadog::io::run_endpoint_io_loop runs 161 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 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::common::otlp::traces::transform::otel_span_to_dd_span lib/saluki-components/src/common/otlp/traces/transform.rs:257— FunctionTooLong — saluki_components::common::otlp::traces::transform::otel_span_to_dd_span runs 158 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 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 lib/saluki-components/src/common/otlp/traces/transform.rs:1238— FunctionTooLong — saluki_components::common::otlp::traces::transform::get_otel_operation_name_v2 runs 156 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 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::sources::otlp::metrics::runtime_metrics::stable_java_runtime_metrics_mappings lib/saluki-components/src/sources/otlp/metrics/runtime_metrics.rs:207— FunctionTooLong — saluki_components::sources::otlp::metrics::runtime_metrics::stable_java_runtime_metrics_mappings runs 154 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 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::sources::otlp::metrics::runtime_metrics::java_runtime_metrics_mappings lib/saluki-components/src/sources/otlp/metrics/runtime_metrics.rs:430— FunctionTooLong — saluki_components::sources::otlp::metrics::runtime_metrics::java_runtime_metrics_mappings runs 154 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 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::encoders::datadog::metrics::run_request_builder lib/saluki-components/src/encoders/datadog/metrics/mod.rs:777— FunctionTooLong — saluki_components::encoders::datadog::metrics::run_request_builder runs 151 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 51 over it, 1.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: datadog_agent_config_corpus::reader::case_line lib/datadog-agent/config-corpus/src/reader.rs:557— FunctionTooLong — datadog_agent_config_corpus::reader::case_line runs 134 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 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::sources::otlp::logs::transform::transform_log_record lib/saluki-components/src/sources/otlp/logs/transform.rs:213— FunctionTooLong — saluki_components::sources::otlp::logs::transform::transform_log_record 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.
FunctionTooLong: saluki_components::sources::otlp::metrics::remap::remap_system_metrics lib/saluki-components/src/sources/otlp/metrics/remap.rs:55— FunctionTooLong — saluki_components::sources::otlp::metrics::remap::remap_system_metrics runs 132 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 32 over it, 1.32× 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: ottl::parser::grammar::build_parser lib/ottl/src/parser/grammar.rs:232— FunctionTooLong — ottl::parser::grammar::build_parser runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::encoders::datadog::metrics::write_metric_to_v3 lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1685— FunctionTooLong — saluki_components::encoders::datadog::metrics::write_metric_to_v3 runs 115 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 15 over it, 1.15× 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: saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event lib/saluki-io/src/deser/codec/dogstatsd/event.rs:32— FunctionTooLong — saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event runs 114 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 14 over it, 1.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.
FunctionTooLong: datadog_agent_config_corpus::reader::read lib/datadog-agent/config-corpus/src/reader.rs:957— FunctionTooLong — datadog_agent_config_corpus::reader::read runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: saluki_components::common::otlp::traces::transform::get_otel_resource_v2 lib/saluki-components/src/common/otlp/traces/transform.rs:1452— FunctionTooLong — saluki_components::common::otlp::traces::transform::get_otel_resource_v2 runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FileTooLong: corpus_replay/expected.rs lib/agent-data-plane-config-system/src/corpus_replay/expected.rs— FileTooLong — 2081 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 1581 over it, 4.16× 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: traces/transform.rs lib/saluki-components/src/common/otlp/traces/transform.rs— FileTooLong — 1846 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 61 free functions. The bar is 500 significant lines; this is 1346 over it, 3.69× 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: dogstatsd/mod.rs lib/saluki-components/src/sources/dogstatsd/mod.rs— FileTooLong — 1322 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 822 over it, 2.64× 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: metrics/mod.rs lib/saluki-components/src/encoders/datadog/metrics/mod.rs— FileTooLong — 1200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 700 over it, 2.40× 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: translators/datadog_translator.rs lib/agent-data-plane-config-system/src/translators/datadog_translator.rs— FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 84% of them inside a single declaration: DatadogTranslator (3 blocks, 49-2046). The bar is 500 significant lines; this is 599 over it, 2.20× 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: datadog/io.rs lib/saluki-components/src/common/datadog/io.rs— FileTooLong — 893 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 393 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/reader.rs lib/datadog-agent/config-corpus/src/reader.rs— FileTooLong — 770 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 270 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: corpus_replay/expectations.rs lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs— FileTooLong — 748 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 248 over it, 1.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: runtime/supervisor.rs lib/saluki-core/src/runtime/supervisor.rs— FileTooLong — 720 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 220 over it, 1.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: traces/mod.rs lib/saluki-components/src/encoders/datadog/traces/mod.rs— FileTooLong — 637 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 137 over it, 1.27× 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: topology/blueprint.rs lib/saluki-core/src/topology/blueprint.rs— FileTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 60% of them inside a single declaration: TopologyBuildState (2 blocks, 82-1024). The bar is 500 significant lines; this is 134 over it, 1.27× 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/writer.rs lib/datadog-agent/metrics-v3/src/writer.rs— FileTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 64% of them inside a single declaration: V3Writer (2 blocks, 144-685). The bar is 500 significant lines; this is 133 over it, 1.27× 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: tree/mod.rs lib/saluki-core/src/runtime/tree/mod.rs— FileTooLong — 502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2 over it, 1.00× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×13
Recursive walk over a caller-supplied document has no depth cap lib/saluki-env/src/workload/helpers/mod.rs:105— `next` is public and takes a `IntoIter` as its receiver from its caller, and it calls itself at line 105 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `next` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/runtime/supervisor.rs:501— `name` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 501 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `name` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/runtime/supervisor.rs:513— `wants_shutdown_signal` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 513 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `wants_shutdown_signal` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/runtime/supervisor.rs:520— `shutdown_strategy` is public and takes a `SupervisedChild` as its receiver from its caller, and it calls itself at line 520 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `shutdown_strategy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/runtime/supervisor.rs:620— `clone` is public and takes a `SupervisedChild` as its receiver from its caller, and it recurses at line 620 through `inner_clone` and back with a piece of the document (and at line 1673, line 1674) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `clone` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/runtime/scope/mod.rs:407— `drop` is public, takes a document from its caller (line 351) and hands it to `take`, which calls itself at line 407 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `take` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/accounting/mod.rs:174— `total_minimum_required_bytes` is public and takes a `ComponentBounds` as its receiver from its caller, and it calls itself at line 174 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `total_minimum_required_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/accounting/mod.rs:186— `total_firm_limit_bytes` is public and takes a `ComponentBounds` as its receiver from its caller, and it calls itself at line 186 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `total_firm_limit_bytes` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/saluki-core/src/accounting/registry.rs:118— `as_bounds` is public and takes a `ComponentMetadata` as its receiver from its caller, and it calls itself at line 118 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `as_bounds` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/datadog-agent/config-overlay-model/src/schema_gen.rs:136— `load_schema_from_value` is public, takes a document from its caller (line 106) and hands it to `collect_entries`, which calls itself at line 136 with a piece of the document (and at line 141) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `collect_entries` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/datadog-agent/config-corpus/src/getter.rs:196— `decode` is public, takes a document from its caller (line 205) and hands it to `go_value`, which calls itself at line 196 with a piece of the document (and at line 199) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `go_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/datadog-agent/config-corpus/src/json.rs:332— `to_value` is public and takes a `Json` as its receiver from its caller, and it calls itself at line 332 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `to_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap lib/agent-data-plane-config-system/src/source.rs:221— `all_explicit` is public, takes a document from its caller (line 59) and hands it to `from_value`, which calls itself at line 221 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `from_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Duplicated block (10 lines × 2) lib/datadog-agent/commons/src/ipc/tls.rs:131— lib/datadog-agent/commons/src/ipc/tls.rs:131-141 | lib/datadog-agent/commons/src/ipc/tls.rs:176-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 (10 lines × 2) lib/datadog-agent/runtime/src/env/autodiscovery.rs:100— lib/datadog-agent/runtime/src/env/autodiscovery.rs:100-109 | lib/saluki-env/src/autodiscovery/providers/local.rs:280-289 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/runtime/src/env/autodiscovery.rs:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/saluki-io/src/net/client/http/conn.rs:187— lib/saluki-io/src/net/client/http/conn.rs:187-196 | lib/saluki-io/src/net/client/http/conn.rs:225-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/net/client/http/conn.rs:187` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:95— lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:95-104 | lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:55-64 — before extracting anything, compare `lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs` and `lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:95` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/ddsketch/src/canonical/store/collapsing_highest.rs:36— lib/ddsketch/src/canonical/store/collapsing_highest.rs:36-45 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:36-45 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 (10 lines × 2) lib/saluki-components/src/destinations/dsd_debug_log/mod.rs:202— lib/saluki-components/src/destinations/dsd_debug_log/mod.rs:202-213 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:1001-1010 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `tags` to `&TagSet` in one and `TagSet` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) lib/saluki-components/src/destinations/prometheus/mod.rs:510— lib/saluki-components/src/destinations/prometheus/mod.rs:510-520 | lib/saluki-core/src/observability/metrics/histogram.rs:76-85 — before extracting anything, compare `lib/saluki-components/src/destinations/prometheus/mod.rs` and `lib/saluki-core/src/observability/metrics/histogram.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:117— lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:117-126 | lib/saluki-components/src/encoders/datadog/metrics/v2/mod.rs:535-544 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:66— lib/stringtheory/src/interning/fixed_size.rs:66-75 | lib/stringtheory/src/interning/map.rs:74-83 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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 (10 lines × 2) lib/saluki-core/src/components/test_util/context.rs:139— lib/saluki-core/src/components/test_util/context.rs:139-148 | lib/saluki-core/src/components/test_util/driver.rs:384-393 — before extracting anything, compare `lib/saluki-core/src/components/test_util/context.rs` and `lib/saluki-core/src/components/test_util/driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (10 lines × 2) lib/saluki-core/src/components/test_util/context.rs:180— lib/saluki-core/src/components/test_util/context.rs:180-189 | lib/saluki-core/src/components/test_util/driver.rs:498-507 — before extracting anything, compare `lib/saluki-core/src/components/test_util/context.rs` and `lib/saluki-core/src/components/test_util/driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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) lib/ddsketch/src/canonical/store/collapsing_lowest.rs:93— lib/ddsketch/src/canonical/store/collapsing_lowest.rs:93-98 | lib/ddsketch/src/canonical/store/dense.rs:49-54 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` and `lib/ddsketch/src/canonical/store/dense.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/ddsketch/src/canonical/store/collapsing_lowest.rs:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/saluki-app/src/logging/api.rs:206— lib/saluki-app/src/logging/api.rs:206-211 | lib/saluki-app/src/metrics/api.rs:167-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-app/src/logging/api.rs:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/saluki-components/src/common/otlp/traces/transform.rs:1956— lib/saluki-components/src/common/otlp/traces/transform.rs:1956-1961 | lib/saluki-components/src/common/otlp/traces/transform.rs:2069-2074 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/otlp/traces/transform.rs:1956` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:146— lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:146-151 | lib/saluki-components/src/transforms/metric_router/mod.rs:145-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/saluki-core/src/runtime/supervisor.rs:1254— lib/saluki-core/src/runtime/supervisor.rs:1254-1259 | lib/saluki-core/src/runtime/supervisor.rs:1282-1287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/runtime/supervisor.rs:1254` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:719— lib/stringtheory/src/interning/fixed_size.rs:719-724 | lib/stringtheory/src/interning/map.rs:672-677 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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) lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:146— lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:146-151 | lib/agent-data-plane-config-system/src/corpus_replay/derived.rs:225-230 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:76— lib/saluki-components/src/encoders/datadog/stats/mod.rs:76-81 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:164-169 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/saluki-components/src/encoders/datadog/traces/mod.rs:172` calls `get_app_details` and `lib/saluki-components/src/encoders/datadog/stats/mod.rs:84` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) lib/agent-data-plane-config-system/src/datadog_yaml.rs:606— lib/agent-data-plane-config-system/src/datadog_yaml.rs:606-611 | lib/datadog-agent/config/src/env_reader.rs:251-256 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/agent-data-plane-config-system/src/datadog_yaml.rs:606` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) lib/saluki-components/src/common/datadog/telemetry.rs:179— lib/saluki-components/src/common/datadog/telemetry.rs:179-184 | lib/saluki-components/src/common/datadog/telemetry.rs:193-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/datadog/telemetry.rs:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1773— lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1773-1780 | lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1799-1806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:246— lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:246-253 | lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:246` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/saluki-components/src/encoders/datadog/traces/mod.rs:788— lib/saluki-components/src/encoders/datadog/traces/mod.rs:788-795 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:807-814 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/saluki-components/src/encoders/datadog/traces/mod.rs:796` calls `tracestate_ref`, `flags` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs:815` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:569— lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:569-576 | lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:430-437 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) lib/prometheus-exposition/src/lib.rs:176— lib/prometheus-exposition/src/lib.rs:176-187 | lib/prometheus-exposition/src/lib.rs:219-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/prometheus-exposition/src/lib.rs:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/saluki-components/src/common/otlp/traces/transform.rs:2735— lib/saluki-components/src/common/otlp/traces/transform.rs:2735-2743 | lib/saluki-components/src/sources/otlp/logs/transform.rs:112-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/otlp/traces/transform.rs:2735` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/saluki-io/src/net/client/http/conn.rs:287— lib/saluki-io/src/net/client/http/conn.rs:287-294 | lib/saluki-io/src/net/client/http/conn.rs:310-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/net/client/http/conn.rs:287` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) lib/datadog-agent/config/src/list_de.rs:23— lib/datadog-agent/config/src/list_de.rs:23-30 | lib/saluki-config/src/space_separated.rs:17-24 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/config/src/list_de.rs:23` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) lib/datadog-agent/config-recorder/go/gen/generate.go:158— lib/datadog-agent/config-recorder/go/gen/generate.go:158-165 | lib/datadog-agent/config-recorder/go/record/casewrite.go:217-224 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:580— lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:580-584 | lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:441-445 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:580` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/saluki-components/src/common/otlp/traces/transform.rs:1923— lib/saluki-components/src/common/otlp/traces/transform.rs:1923-1927 | lib/saluki-components/src/common/otlp/traces/transform.rs:2023-2027 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/otlp/traces/transform.rs:1923` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:246— lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:246-250 | lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:18-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:246` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/saluki-components/src/destinations/prometheus/mod.rs:504— lib/saluki-components/src/destinations/prometheus/mod.rs:504-508 | lib/saluki-core/src/observability/metrics/histogram.rs:70-74 — before extracting anything, compare `lib/saluki-components/src/destinations/prometheus/mod.rs` and `lib/saluki-core/src/observability/metrics/histogram.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) lib/saluki-tls/src/lib.rs:464— lib/saluki-tls/src/lib.rs:464-468 | lib/saluki-tls/src/lib.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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-tls/src/lib.rs:464` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) lib/saluki-core/src/data_model/event/metric/value/histogram.rs:64— lib/saluki-core/src/data_model/event/metric/value/histogram.rs:64-68 | lib/saluki-core/src/data_model/event/metric/value/histogram.rs:75-79 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/data_model/event/metric/value/histogram.rs:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/saluki-core/src/pooling/elastic.rs:141— lib/saluki-core/src/pooling/elastic.rs:141-145 | lib/saluki-core/src/pooling/fixed.rs:116-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) lib/saluki-core/src/topology/built.rs:498— lib/saluki-core/src/topology/built.rs:498-502 | lib/saluki-core/src/topology/built.rs:522-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/topology/built.rs:498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) lib/saluki-io/src/net/addr.rs:172— lib/saluki-io/src/net/addr.rs:172-176 | lib/saluki-io/src/net/addr.rs:287-291 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/net/addr.rs:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: agent-data-plane-config — agent-data-plane-config: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: datadog-agent-config-overlay-model — datadog-agent-config-overlay-model: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: datadog-agent-metrics-v3 — datadog-agent-metrics-v3: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: process-memory — process-memory: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: prometheus-exposition — prometheus-exposition: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Off the main sequence: saluki-metadata — saluki-metadata: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: stringtheory — stringtheory: abstractness 0.08, instability 0.11, distance 0.81 — zone of pain — concrete and depended on by 8 project(s), so it's rigid to change.
Off the main sequence: ottl — ottl: abstractness 0.20, instability 0.00, distance 0.80 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: saluki-tls — saluki-tls: abstractness 0.00, instability 0.29, distance 0.71 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
panoramic::run_tests (cognitive 65) bin/correctness/panoramic/src/main.rs:154— panoramic::run_tests has cognitive complexity 65 (threshold 15). Drivers by points: if/else 35 (53 pts), match/switch 7 (10 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
panoramic::collector::consume_run (cognitive 28) bin/correctness/panoramic/src/collector.rs:210— panoramic::collector::consume_run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (7 pts), match/switch 3 (7 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.
panoramic::runner::write_result_log (cognitive 24) bin/correctness/panoramic/src/runner.rs:1120— panoramic::runner::write_result_log has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (13 pts), if/else 6 (10 pts), match/switch 1 (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
panoramic::correctness::k8s::wait_for_millstone_exit (cognitive 21) bin/correctness/panoramic/src/correctness/k8s.rs:1016— panoramic::correctness::k8s::wait_for_millstone_exit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 1 (nesting depth added 13). 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.
panoramic::config::parse_duration (cognitive 18) bin/correctness/panoramic/src/config.rs:34— panoramic::config::parse_duration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
panoramic::config::discover_tests (cognitive 17) bin/correctness/panoramic/src/config.rs:715— panoramic::config::discover_tests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 1 (5 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
panoramic::config::try_load_test (cognitive 17) bin/correctness/panoramic/src/config.rs:764— panoramic::config::try_load_test has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 8). 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.
panoramic::machine_output::collect_diagnostic_lines (cognitive 16) bin/correctness/panoramic/src/machine_output.rs:428— panoramic::machine_output::collect_diagnostic_lines has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), 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.
MethodTooLong: V3Writer.finalize lib/datadog-agent/metrics-v3/src/writer.rs:329— MethodTooLong — finalize runs 191 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 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TraceEndpointEncoder.encode_tracer_payload lib/saluki-components/src/encoders/datadog/traces/mod.rs:595— MethodTooLong — encode_tracer_payload runs 185 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 85 over it, 1.85× 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: SQLTokenizer.scan lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:102— MethodTooLong — scan runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: BuiltTopology.spawn_inner lib/saluki-core/src/topology/built.rs:168— MethodTooLong — spawn_inner runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TopologyBuildState.build lib/saluki-core/src/topology/blueprint.rs:849— MethodTooLong — build runs 128 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 28 over it, 1.28× 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: SalukiOnly.seed lib/agent-data-plane-config-system/src/saluki_only.rs:536— MethodTooLong — seed runs 114 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 14 over it, 1.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: Scrubber.default lib/saluki-common/src/scrubber.rs:52— MethodTooLong — default runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Supervisor.supervise lib/saluki-core/src/runtime/supervisor.rs:1353— MethodTooLong — supervise runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Change coupling: mod.rs ↔ mod.rs lib/saluki-components/src/sources/dogstatsd/mod.rs:1— `lib/saluki-components/src/sources/dogstatsd/mod.rs` and `lib/saluki-components/src/transforms/host_enrichment/mod.rs` change together 83% of the time (10 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `1f7ba250` chore(core): add typed event views to event buffers (#3085); `0cd3793c` fix(dogstatsd): keep an explicitly empty hostname on events and servi…; `ea6f18d1` fix(metrics): store host on context only (#1978) — run `git show` on any of them.
Change coupling: normalize.rs ↔ translator.rs lib/saluki-components/src/common/otlp/traces/normalize.rs:1— `lib/saluki-components/src/common/otlp/traces/normalize.rs` and `lib/saluki-components/src/common/otlp/traces/translator.rs` 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c06c6609` enhancement(otlp): add the Agent's V1 OTLP span naming and receive pa…; `c786bff4` feat(traces): resolve and normalize peer.service and _dd.base_service…; `2bed3f04` feat(otlp): name normalization and tag normalization via truncation (… — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs lib/saluki-core/src/data_model/event/eventd/mod.rs:1— `lib/saluki-core/src/data_model/event/eventd/mod.rs` and `lib/saluki-core/src/data_model/event/service_check/mod.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `0cd3793c` fix(dogstatsd): keep an explicitly empty hostname on events and servi…; `9f90b14c` enhancement(core): switch from `SharedTagSet` to `TagSet` for core da…; `20721f34` enhancement: add origin detection support to DogStatsD events and ser… — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs lib/saluki-components/src/encoders/datadog/events/mod.rs:1— `lib/saluki-components/src/encoders/datadog/events/mod.rs` and `lib/saluki-components/src/encoders/datadog/metrics/mod.rs` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `f7d29428` feat(traces): add trace and stats writer payload counters (#3199); `0c17b669` chore(config): migrate payload encoders to typed config (#2377); `42ef4c8f` fix(config): isolate tests from ambient proxy variables (#2235) — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs lib/saluki-components/src/sources/dogstatsd/mod.rs:1— `lib/saluki-components/src/sources/dogstatsd/mod.rs` and `lib/saluki-components/src/transforms/chained/mod.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 8 shared commits counted here, the most recent 3 are `40e71d49` enhancement(core): add new "decoder" component and add named outputs …; `05ea5ade` fix(observability): ensure context resolver IDs are unique per compon…; `57afe0f1` chore(core): rename `interconnect::Forwarder` to `Dispatcher` to avoi… — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs lib/saluki-components/src/encoders/datadog/events/mod.rs:1— `lib/saluki-components/src/encoders/datadog/events/mod.rs` and `lib/saluki-components/src/encoders/datadog/logs/mod.rs` change together 53% of the time (8 of the 15 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 8 shared commits counted here, the most recent 3 are `f7d29428` feat(traces): add trace and stats writer payload counters (#3199); `863a6871` fix(metrics): follow-ups from review of the expvar telemetry changes …; `0c17b669` chore(config): migrate payload encoders to typed config (#2377) — run `git show` on any of them.
Change coupling: mod.rs ↔ mod.rs lib/saluki-components/src/transforms/aggregate/mod.rs:1— `lib/saluki-components/src/transforms/aggregate/mod.rs` and `lib/saluki-components/src/transforms/chained/mod.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `40e71d49` enhancement(core): add new "decoder" component and add named outputs …; `57afe0f1` chore(core): rename `interconnect::Forwarder` to `Dispatcher` to avoi…; `ccc6dadc` chore: massive cleanup around MetricsBuilder and EndpointTelemetryLayer — run `git show` on any of them.
Change coupling: normalize.rs ↔ mod.rs lib/saluki-components/src/common/otlp/traces/normalize.rs:1— `lib/saluki-components/src/common/otlp/traces/normalize.rs` and `lib/saluki-components/src/sources/otlp/mod.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 `2bed3f04` feat(otlp): name normalization and tag normalization via truncation (…; `f481f1fd` experiment(otlp): use string interner in OTLP trace translation (#1133); `134f7db1` chore: move OTLP translation to common (#1079) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×8
Edited copy of a member (13 corresponding lines) lib/saluki-core/src/runtime/supervisor.rs:1247— lib/saluki-core/src/runtime/supervisor.rs:1247-1259 | lib/saluki-core/src/runtime/supervisor.rs:1270-1287 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/saluki-components/src/common/otlp/attributes/mod.rs:310— lib/saluki-components/src/common/otlp/attributes/mod.rs:310-322 | lib/saluki-components/src/common/otlp/util.rs:122-134 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/saluki-core/src/data_model/tags/tagset/frozen.rs:72— lib/saluki-core/src/data_model/tags/tagset/frozen.rs:72-84 | lib/saluki-core/src/data_model/tags/tagset/shared.rs:174-186 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/datadog-agent/runtime/src/control_plane/config_runtime.rs:112— lib/datadog-agent/runtime/src/control_plane/config_runtime.rs:112-124 | lib/datadog-agent/runtime/src/remote_agent/mod.rs:693-705 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/saluki-env/src/workload/stores/external_data.rs:75— lib/saluki-env/src/workload/stores/external_data.rs:75-87 | lib/saluki-env/src/workload/stores/tag.rs:104-118 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/saluki-config/src/yaml.rs:47— lib/saluki-config/src/yaml.rs:47-59 | lib/saluki-env/src/autodiscovery/mod.rs:300-313 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:380— lib/stringtheory/src/interning/fixed_size.rs:380-392 | lib/stringtheory/src/interning/map.rs:337-349 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) lib/saluki-core/src/components/test_util/context.rs:195— lib/saluki-core/src/components/test_util/context.rs:195-207 | lib/saluki-core/src/components/test_util/context.rs:210-222 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×8
Edited copy of a member (9 corresponding lines) lib/saluki-io/src/net/addr.rs:171— lib/saluki-io/src/net/addr.rs:171-179 | lib/saluki-io/src/net/addr.rs:286-294 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/saluki-io/src/net/stream.rs:76— lib/saluki-io/src/net/stream.rs:76-84 | lib/saluki-io/src/net/stream.rs:88-96 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/ottl/src/parser/ast.rs:205— lib/ottl/src/parser/ast.rs:205-213 | lib/ottl/src/parser/ast.rs:267-275 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/saluki-io/src/net/stream.rs:98— lib/saluki-io/src/net/stream.rs:98-106 | lib/saluki-io/src/net/stream.rs:108-116 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/ottl/src/parser/ops.rs:73— lib/ottl/src/parser/ops.rs:73-81 | lib/ottl/src/parser/ops.rs:84-92 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/saluki-env/src/workload/helpers/containerd/mod.rs:127— lib/saluki-env/src/workload/helpers/containerd/mod.rs:127-140 | lib/saluki-env/src/workload/helpers/containerd/mod.rs:195-203 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/datadog-agent/config-recorder/go/gen/values.go:101— lib/datadog-agent/config-recorder/go/gen/values.go:101-111 | lib/datadog-agent/config-recorder/go/gen/depth.go:120-128 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:370— lib/stringtheory/src/interning/fixed_size.rs:370-378 | lib/stringtheory/src/interning/map.rs:327-335 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×8
Edited copy of a member (12 corresponding lines) lib/saluki-components/src/common/otlp/traces/transform.rs:2730— lib/saluki-components/src/common/otlp/traces/transform.rs:2730-2743 | lib/saluki-components/src/sources/otlp/logs/transform.rs:108-119 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/datadog-agent/runtime/src/env/autodiscovery.rs:98— lib/datadog-agent/runtime/src/env/autodiscovery.rs:98-109 | lib/saluki-env/src/autodiscovery/providers/local.rs:278-289 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/saluki-core/src/data_model/tags/raw.rs:125— lib/saluki-core/src/data_model/tags/raw.rs:125-136 | lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:54-65 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/agent-data-plane-config-system/src/translators/datadog_translator.rs:956— lib/agent-data-plane-config-system/src/translators/datadog_translator.rs:956-967 | lib/agent-data-plane-config-system/src/translators/datadog_translator.rs:1952-1963 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/saluki-env/src/workload/aggregator.rs:92— lib/saluki-env/src/workload/aggregator.rs:92-103 | lib/saluki-env/src/workload/collectors/mod.rs:76-87 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/saluki-components/src/decoders/datadog/read.rs:90— lib/saluki-components/src/decoders/datadog/read.rs:90-101 | lib/saluki-components/src/decoders/datadog/read.rs:110-121 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/datadog-agent/runtime/src/env/autodiscovery.rs:138— lib/datadog-agent/runtime/src/env/autodiscovery.rs:138-149 | lib/saluki-app/src/metrics/mod.rs:140-152 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) lib/saluki-env/src/workload/stores/external_data.rs:56— lib/saluki-env/src/workload/stores/external_data.rs:56-68 | lib/saluki-env/src/workload/stores/tag.rs:86-97 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (14 lines × 2) lib/saluki-core/src/data_model/event/metric/context/mod.rs:138— lib/saluki-core/src/data_model/event/metric/context/mod.rs:138-151 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:161-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/data_model/event/metric/context/mod.rs:138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-core/src/data_model/event/metric/context/mod.rs:160` calls `into` and `lib/saluki-core/src/data_model/event/metric/context/mod.rs:137` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) lib/saluki-core/src/data_model/tags/tagset/shared.rs:126— lib/saluki-core/src/data_model/tags/tagset/shared.rs:126-139 | lib/saluki-core/src/data_model/tags/tagset/shared.rs:147-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `&TagSet` in one and `&SharedTagSet` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:288— lib/stringtheory/src/interning/fixed_size.rs:288-301 | lib/stringtheory/src/interning/map.rs:283-296 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:1200— lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:1200-1213 | lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:2022-2035 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:1200` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) lib/saluki-core/src/data_model/event/metric/context/resolver.rs:386— lib/saluki-core/src/data_model/event/metric/context/resolver.rs:386-399 | lib/saluki-core/src/data_model/event/metric/context/resolver.rs:864-877 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/data_model/event/metric/context/resolver.rs:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:242— lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:242-255 | lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:256-269 — before extracting anything, compare `lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs` and `lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:242` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) lib/saluki-config/src/lib.rs:203— lib/saluki-config/src/lib.rs:203-216 | lib/saluki-config/src/lib.rs:241-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-config/src/lib.rs:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) lib/datadog-agent/config-recorder/go/record/jsonline.go:104— lib/datadog-agent/config-recorder/go/record/jsonline.go:104-117 | lib/datadog-agent/config-recorder/go/record/values.go:219-232 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/config-recorder/go/record/jsonline.go:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
OtlpMetricsTranslator::translate_metrics_inner (cognitive 70) lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:156— OtlpMetricsTranslator::translate_metrics_inner has cognitive complexity 70 (threshold 15). Drivers by points: if/else 12 (38 pts), loops 7 (21 pts), match/switch 3 (11 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.
OtlpMetricsTranslator::map_exponential_histogram_metrics (cognitive 60) lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs:13— OtlpMetricsTranslator::map_exponential_histogram_metrics has cognitive complexity 60 (threshold 15). Drivers by points: if/else 23 (53 pts), match/switch 2 (4 pts), boolean chains 2, 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.
OtlpMetricsTranslator::map_histogram_metrics (cognitive 52) lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:200— OtlpMetricsTranslator::map_histogram_metrics has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (46 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (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.
OtlpMetricsTranslator::get_sketch_buckets (cognitive 34) lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:58— OtlpMetricsTranslator::get_sketch_buckets has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (30 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.
OtlpMetricsTranslator::map_summary_metrics (cognitive 26) lib/saluki-components/src/sources/otlp/metrics/translator/summary.rs:15— OtlpMetricsTranslator::map_summary_metrics has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OtlpMetricsTranslator::map_to_dd_format (cognitive 23) lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:322— OtlpMetricsTranslator::map_to_dd_format has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 5 (16 pts), if/else 4 (7 pts) (nesting depth added 14). 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.
OtlpMetricsTranslator::map_number_monotonic_metrics (cognitive 19) lib/saluki-components/src/sources/otlp/metrics/translator/monotonic.rs:36— OtlpMetricsTranslator::map_number_monotonic_metrics has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 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.
agent_data_plane_config_system::corpus_replay::expectations::judge (cognitive 47) lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:983— agent_data_plane_config_system::corpus_replay::expectations::judge has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 9, match/switch 4 (9 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent_data_plane_config_system::corpus_replay::derived::corpus_derived_rows (cognitive 42) lib/agent-data-plane-config-system/src/corpus_replay/derived.rs:287— agent_data_plane_config_system::corpus_replay::derived::corpus_derived_rows has cognitive complexity 42 (threshold 15). Drivers by points: if/else 5 (16 pts), match/switch 4 (16 pts), loops 4 (10 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.
agent_data_plane_config_system::corpus_replay::expectations::step_checks (cognitive 20) lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:644— agent_data_plane_config_system::corpus_replay::expectations::step_checks has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 6 (9 pts), 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.
agent_data_plane_config_system::corpus_replay::expectations::collect_for (cognitive 19) lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:469— agent_data_plane_config_system::corpus_replay::expectations::collect_for has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5, 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.
agent_data_plane_config_system::datadog_yaml::go_float (cognitive 19) lib/agent-data-plane-config-system/src/datadog_yaml.rs:414— agent_data_plane_config_system::datadog_yaml::go_float has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (19 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
agent_data_plane_config_system::corpus_replay::leaf_replay::corpus_rows (cognitive 17) lib/agent-data-plane-config-system/src/corpus_replay/leaf_replay.rs:380— agent_data_plane_config_system::corpus_replay::leaf_replay::corpus_rows has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (5 pts), loops 2 (3 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.
Duplicated block (11 lines × 2) lib/datadog-agent/config/src/cast_de.rs:105— lib/datadog-agent/config/src/cast_de.rs:105-115 | lib/datadog-agent/config/src/size_in_bytes.rs:57-67 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) lib/saluki-components/src/sources/dogstatsd/mod.rs:2232— lib/saluki-components/src/sources/dogstatsd/mod.rs:2232-2242 | lib/saluki-components/src/sources/dogstatsd/mod.rs:2278-2288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `packet` to `EventPacket` in one and `ServiceCheckPacket` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:52— lib/stringtheory/src/interning/fixed_size.rs:52-62 | lib/stringtheory/src/interning/map.rs:60-70 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) lib/saluki-components/src/transforms/apm_stats/mod.rs:264— lib/saluki-components/src/transforms/apm_stats/mod.rs:264-274 | lib/saluki-components/src/transforms/apm_stats/mod.rs:280-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/transforms/apm_stats/mod.rs:264` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:180— lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:180-190 | lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:206-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:180` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) lib/saluki-core/src/components/test_util/context.rs:163— lib/saluki-core/src/components/test_util/context.rs:163-173 | lib/saluki-core/src/components/test_util/driver.rs:420-430 — before extracting anything, compare `lib/saluki-core/src/components/test_util/context.rs` and `lib/saluki-core/src/components/test_util/driver.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (9 lines × 2) lib/saluki-components/src/transforms/trace_sampler/rare_sampler.rs:209— lib/saluki-components/src/transforms/trace_sampler/rare_sampler.rs:209-217 | lib/saluki-components/src/transforms/trace_sampler/rare_sampler.rs:229-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:88— lib/saluki-io/src/deser/codec/dogstatsd/event.rs:88-96 | lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:65-73 — before extracting anything, compare `lib/saluki-io/src/deser/codec/dogstatsd/event.rs` and `lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/event.rs:88` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) lib/saluki-io/src/net/addr.rs:222— lib/saluki-io/src/net/addr.rs:222-230 | lib/saluki-io/src/net/addr.rs:235-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:422— lib/stringtheory/src/interning/fixed_size.rs:422-430 | lib/stringtheory/src/interning/map.rs:358-366 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:106— lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:106-114 | lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:66-74 — before extracting anything, compare `lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs` and `lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 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 (9 lines × 2) lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:85— lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:85-93 | lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:177-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. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) lib/ottl/src/parser/ast.rs:207— lib/ottl/src/parser/ast.rs:207-213 | lib/ottl/src/parser/ast.rs:269-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/ottl/src/parser/ast.rs:207` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) lib/saluki-components/src/destinations/prometheus/mod.rs:447— lib/saluki-components/src/destinations/prometheus/mod.rs:447-453 | lib/saluki-components/src/destinations/prometheus/mod.rs:455-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) lib/saluki-components/src/transforms/trace_sampler/mod.rs:824— lib/saluki-components/src/transforms/trace_sampler/mod.rs:824-830 | lib/saluki-components/src/transforms/trace_sampler/mod.rs:839-845 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) lib/datadog-agent/config/src/list_de.rs:36— lib/datadog-agent/config/src/list_de.rs:36-42 | lib/saluki-config/src/space_separated.rs:30-36 — 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) lib/stringtheory/src/interning/fixed_size.rs:519— lib/stringtheory/src/interning/fixed_size.rs:519-525 | lib/stringtheory/src/interning/map.rs:425-431 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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 (7 lines × 2) lib/saluki-components/src/common/datadog/endpoints.rs:635— lib/saluki-components/src/common/datadog/endpoints.rs:635-641 | lib/saluki-components/src/common/datadog/endpoints.rs:648-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/datadog/endpoints.rs:635` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×5
Edited copy of a member (16 corresponding lines) lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:319— lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:319-334 | lib/agent-data-plane-config-system/src/corpus_replay/compare.rs:337-352 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) lib/agent-data-plane-config-system/src/datadog_yaml.rs:598— lib/agent-data-plane-config-system/src/datadog_yaml.rs:598-613 | lib/datadog-agent/config/src/env_reader.rs:240-258 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:511— lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:511-531 | lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:563-578 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) lib/saluki-config/src/lib.rs:201— lib/saluki-config/src/lib.rs:201-216 | lib/saluki-config/src/lib.rs:239-254 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:415— lib/stringtheory/src/interning/fixed_size.rs:415-430 | lib/stringtheory/src/interning/map.rs:351-366 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) lib/datadog-agent/config/src/cast_de.rs:123— lib/datadog-agent/config/src/cast_de.rs:123-135 | lib/datadog-agent/config/src/size_in_bytes.rs:70-80 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/saluki-core/src/topology/graph.rs:160— lib/saluki-core/src/topology/graph.rs:160-170 | lib/saluki-core/src/topology/graph.rs:181-191 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/saluki-core/src/runtime/supervisor.rs:1598— lib/saluki-core/src/runtime/supervisor.rs:1598-1610 | lib/saluki-core/src/runtime/supervisor.rs:1655-1665 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/saluki-components/src/encoders/datadog/stats/mod.rs:130— lib/saluki-components/src/encoders/datadog/stats/mod.rs:130-140 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:225-236 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:116— lib/stringtheory/src/interning/fixed_size.rs:116-127 | lib/stringtheory/src/interning/map.rs:115-125 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×5
Edited copy of a member (7 corresponding lines) lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:241— lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:241-250 | lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:16-22 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/datadog-agent/config/src/cast_de.rs:587— lib/datadog-agent/config/src/cast_de.rs:587-597 | lib/datadog-agent/config/src/cast_de.rs:607-613 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/saluki-components/src/sources/otlp/logs/transform.rs:89— lib/saluki-components/src/sources/otlp/logs/transform.rs:89-96 | lib/saluki-components/src/sources/otlp/logs/transform.rs:99-105 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/saluki-components/src/transforms/trace_obfuscation/mod.rs:264— lib/saluki-components/src/transforms/trace_obfuscation/mod.rs:264-270 | lib/saluki-components/src/transforms/trace_tag_replacer.rs:151-161 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) lib/saluki-core/src/data_model/event/eventd/mod.rs:244— lib/saluki-core/src/data_model/event/eventd/mod.rs:244-250 | lib/saluki-core/src/data_model/event/service_check/mod.rs:137-143 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:300— lib/saluki-components/src/encoders/datadog/stats/mod.rs:300-312 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:425-437 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/stats/mod.rs:300` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:337— lib/saluki-components/src/encoders/datadog/stats/mod.rs:337-349 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:464-476 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/stats/mod.rs:337` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) lib/saluki-components/src/sources/dogstatsd/replay/captured_tagger.rs:35— lib/saluki-components/src/sources/dogstatsd/replay/captured_tagger.rs:35-47 | lib/saluki-env/src/workload/providers/testing.rs:34-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) lib/saluki-components/src/common/otlp/traces/transform.rs:1405— lib/saluki-components/src/common/otlp/traces/transform.rs:1405-1418 | lib/saluki-components/src/common/otlp/traces/transform.rs:1422-1434 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/otlp/traces/transform.rs:1405` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/common/otlp/traces/transform.rs:1404` calls `get_both_string_attribute`, `is_some` and `lib/saluki-components/src/common/otlp/traces/transform.rs:1421` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) lib/saluki-core/src/components/test_util/context.rs:95— lib/saluki-core/src/components/test_util/context.rs:95-107 | lib/saluki-core/src/components/test_util/context.rs:122-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/components/test_util/context.rs:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `outputs` to `&[OutputDefinition<EventType>]` in one and `&[OutputDefinition<PayloadType>]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) lib/saluki-components/src/common/otlp/traces/transform.rs:2128— lib/saluki-components/src/common/otlp/traces/transform.rs:2128-2139 | lib/saluki-components/src/common/otlp/traces/transform.rs:2166-2177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/common/otlp/traces/transform.rs:2128` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:204— lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:204-215 | lib/saluki-components/src/sources/otlp/metrics/translator/number.rs:27-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:204` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `data_points` to `Vec<OtlpHistogramDataPoint>` in one and `Vec<OtlpNumberDataPoint>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:705— lib/stringtheory/src/interning/fixed_size.rs:705-716 | lib/stringtheory/src/interning/map.rs:658-669 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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 (12 lines × 2) lib/saluki-core/src/components/relays/context.rs:31— lib/saluki-core/src/components/relays/context.rs:31-42 | lib/saluki-core/src/components/sources/context.rs:31-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/components/relays/context.rs:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `dispatcher` to `PayloadsDispatcher` in one and `EventsDispatcher` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) lib/datadog-agent/config-recorder/go/generate.go:50— lib/datadog-agent/config-recorder/go/generate.go:50-62 | lib/datadog-agent/config-recorder/go/probe.go:30-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Low cohesion: DriverOptions (LCOM4 21) lib/saluki-core/src/components/test_util/driver.rs:195— DriverOptions's methods fall into 21 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 21 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: DriverConfig (LCOM4 10) bin/correctness/airlock/src/driver.rs:87— DriverConfig's methods fall into 10 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 10 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: EventD (LCOM4 8) lib/saluki-core/src/data_model/event/eventd/mod.rs:124— EventD's methods fall into 8 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 8 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: Inner (LCOM4 5) bin/correctness/datadog-intake/src/app/traces/state.rs:8— Inner'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: OtlpMetricsTranslatorConfig (LCOM4 4) lib/saluki-components/src/sources/otlp/metrics/config.rs:90— OtlpMetricsTranslatorConfig's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs· Empty method body · ×5
Empty method body — does nothing with its inputs bin/correctness/airlock/src/unix.rs:312— `push_line` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs lib/saluki-components/src/common/datadog/api_key.rs:66— `refresh` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs lib/saluki-components/src/transforms/aggregate/mod.rs:176— `respond` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs lib/saluki-core/src/runtime/state/dataspace.rs:109— `send_retraction` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs lib/saluki-io/src/net/util/retry/lifecycle/mod.rs:25— `before_retry` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
datadog_agent_config_corpus::reader::read (cyclomatic 31) lib/datadog-agent/config-corpus/src/reader.rs:957— datadog_agent_config_corpus::reader::read 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.
datadog_agent_config_corpus::reader::case_line (cyclomatic 27) lib/datadog-agent/config-corpus/src/reader.rs:557— datadog_agent_config_corpus::reader::case_line 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.
datadog_agent_config_corpus::reader::inputs (cyclomatic 24) lib/datadog-agent/config-corpus/src/reader.rs:431— datadog_agent_config_corpus::reader::inputs 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.
datadog_agent_config_corpus::reader::key_line (cyclomatic 20) lib/datadog-agent/config-corpus/src/reader.rs:788— datadog_agent_config_corpus::reader::key_line 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.
OtlpMetricsTranslator::translate_metrics_inner (cyclomatic 25) lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:156— OtlpMetricsTranslator::translate_metrics_inner 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.
OtlpMetricsTranslator::map_exponential_histogram_metrics (cyclomatic 23) lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs:13— OtlpMetricsTranslator::map_exponential_histogram_metrics 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.
OtlpMetricsTranslator::get_sketch_buckets (cyclomatic 23) lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:58— OtlpMetricsTranslator::get_sketch_buckets 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.
OtlpMetricsTranslator::map_histogram_metrics (cyclomatic 22) lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs:200— OtlpMetricsTranslator::map_histogram_metrics 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.
datadog_agent_config_corpus::reader::read (cognitive 47) lib/datadog-agent/config-corpus/src/reader.rs:957— datadog_agent_config_corpus::reader::read has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 8 (18 pts), boolean chains 3, 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.
datadog_agent_config_corpus::reader::inputs (cognitive 39) lib/datadog-agent/config-corpus/src/reader.rs:431— datadog_agent_config_corpus::reader::inputs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 6 (10 pts), loops 4 (6 pts), boolean chains 3 (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.
datadog_agent_config_corpus::reader::case_line (cognitive 39) lib/datadog-agent/config-corpus/src/reader.rs:557— datadog_agent_config_corpus::reader::case_line has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 5 (6 pts), boolean chains 5, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
datadog_agent_config_corpus::reader::key_line (cognitive 24) lib/datadog-agent/config-corpus/src/reader.rs:788— datadog_agent_config_corpus::reader::key_line has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 2, match/switch 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.
TooManyMethods: ClientGroupedStats lib/saluki-core/src/data_model/event/trace_stats/mod.rs:333— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× 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: DDSketch lib/ddsketch/src/agent/sketch.rs:73— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ClientStatsPayload lib/saluki-core/src/data_model/event/trace_stats/mod.rs:56— TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Span lib/saluki-core/src/data_model/event/trace/mod.rs:259— TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×4
Edited copy of a member (18 corresponding lines) lib/ottl/src/helpers.rs:35— lib/ottl/src/helpers.rs:35-56 | lib/ottl/src/parser/eval.rs:25-42 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:118— lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:118-135 | lib/saluki-components/src/transforms/metric_router/mod.rs:107-133 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1144— lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1144-1161 | lib/saluki-components/src/encoders/datadog/metrics/mod.rs:1165-1182 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) lib/saluki-core/src/data_model/tags/tagset/shared.rs:122— lib/saluki-core/src/data_model/tags/tagset/shared.rs:122-139 | lib/saluki-core/src/data_model/tags/tagset/shared.rs:143-160 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) lib/datadog-agent/config/src/list_de.rs:22— lib/datadog-agent/config/src/list_de.rs:22-54 | lib/saluki-config/src/space_separated.rs:16-40 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:429— lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:429-453 | lib/saluki-components/src/sources/otlp/metrics/translator/mod.rs:458-483 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) lib/saluki-components/src/encoders/datadog/stats/mod.rs:102— lib/saluki-components/src/encoders/datadog/stats/mod.rs:102-126 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:196-221 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:255— lib/stringtheory/src/interning/fixed_size.rs:255-280 | lib/stringtheory/src/interning/map.rs:245-269 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×4
Edited copy of a member (19 corresponding lines) lib/saluki-core/src/data_model/event/metric/value/histogram.rs:373— lib/saluki-core/src/data_model/event/metric/value/histogram.rs:373-391 | lib/saluki-core/src/data_model/event/metric/value/set.rs:142-160 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) lib/saluki-core/src/data_model/tags/tagset/owned.rs:153— lib/saluki-core/src/data_model/tags/tagset/owned.rs:153-171 | lib/saluki-core/src/data_model/tags/tagset/owned.rs:181-199 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) lib/saluki-core/src/data_model/event/metric/context/resolver.rs:381— lib/saluki-core/src/data_model/event/metric/context/resolver.rs:381-399 | lib/saluki-core/src/data_model/event/metric/context/resolver.rs:859-877 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (19 corresponding lines) lib/saluki-components/src/destinations/prometheus/mod.rs:484— lib/saluki-components/src/destinations/prometheus/mod.rs:484-502 | lib/saluki-core/src/observability/metrics/histogram.rs:36-55 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×4
Edited copies of one member (3 members, 13+ corresponding lines) lib/saluki-core/src/observability/metrics/mod.rs:260— lib/saluki-core/src/observability/metrics/mod.rs:260-272 | lib/saluki-core/src/observability/metrics/mod.rs:285-297 | lib/saluki-core/src/observability/metrics/mod.rs:300-312 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) lib/saluki-components/src/common/otlp/mod.rs:585— lib/saluki-components/src/common/otlp/mod.rs:585-597 | lib/saluki-components/src/common/otlp/mod.rs:602-614 | lib/saluki-components/src/common/otlp/mod.rs:619-631 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:104— lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:104-116 | lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:173-190 | lib/saluki-io/src/deser/codec/dogstatsd/helpers.rs:198-216 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) lib/saluki-app/src/logging/api.rs:205— lib/saluki-app/src/logging/api.rs:205-217 | lib/saluki-app/src/metrics/api.rs:166-179 | lib/saluki-core/src/observability/metrics/api.rs:70-83 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (16 lines × 2) lib/ddsketch/src/agent/sketch.rs:259— lib/ddsketch/src/agent/sketch.rs:259-274 | lib/ddsketch/src/agent/sketch.rs:322-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/ddsketch/src/agent/sketch.rs:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) lib/ddsketch/src/canonical/sketch.rs:225— lib/ddsketch/src/canonical/sketch.rs:225-240 | lib/ddsketch/src/canonical/sketch.rs:467-482 — both copies are in the same file, so extract the 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) lib/saluki-components/src/sources/otlp/mod.rs:510— lib/saluki-components/src/sources/otlp/mod.rs:510-525 | lib/saluki-components/src/sources/otlp/mod.rs:530-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/sources/otlp/mod.rs:509` calls `tick` and `lib/saluki-components/src/sources/otlp/mod.rs:528` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:151— lib/stringtheory/src/interning/fixed_size.rs:151-166 | lib/stringtheory/src/interning/map.rs:148-163 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/stringtheory/src/interning/fixed_size.rs:151` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) lib/ddsketch/src/canonical/store/collapsing_highest.rs:279— lib/ddsketch/src/canonical/store/collapsing_highest.rs:279-290 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:294-305 | lib/ddsketch/src/canonical/store/dense.rs:190-201 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 3) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:920— lib/saluki-components/src/encoders/datadog/metrics/mod.rs:920-931 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:342-353 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:469-480 — `lib/saluki-components/src/encoders/datadog/metrics/mod.rs` and `lib/saluki-components/src/encoders/datadog/stats/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/metrics/mod.rs:920` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 3) lib/ddsketch/src/canonical/store/collapsing_highest.rs:188— lib/ddsketch/src/canonical/store/collapsing_highest.rs:188-199 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:197-208 | lib/ddsketch/src/canonical/store/dense.rs:93-104 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 (12 lines × 3) lib/ddsketch/src/canonical/store/collapsing_highest.rs:201— lib/ddsketch/src/canonical/store/collapsing_highest.rs:201-212 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:210-221 | lib/ddsketch/src/canonical/store/dense.rs:106-117 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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.
Configuration option is read nowhere bin/agent-data-plane/src/dogstatsd_contexts/artifact.rs:196— `AgentContextRecord.tagger_tags` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere bin/agent-data-plane/src/dogstatsd_contexts/artifact.rs:198— `AgentContextRecord.no_index` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere bin/correctness/panoramic/src/cli.rs:124— `Cli._help` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
Configuration option is read nowhere lib/saluki-core/src/runtime/tree/snapshot.rs:203— `ResourceUsage.live_objects` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
panoramic::run_tests (cyclomatic 34) bin/correctness/panoramic/src/main.rs:154— panoramic::run_tests 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.
panoramic::correctness::k8s::run_k8s_correctness_test (cyclomatic 18) bin/correctness/panoramic/src/correctness/k8s.rs:47— panoramic::correctness::k8s::run_k8s_correctness_test has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
panoramic::config::parse_duration (cyclomatic 16) bin/correctness/panoramic/src/config.rs:34— panoramic::config::parse_duration 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.
saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event (cyclomatic 31) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:32— saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event has cyclomatic complexity 31 (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.
saluki_io::deser::codec::dogstatsd::metric::parse_dogstatsd_metric (cyclomatic 27) lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:67— saluki_io::deser::codec::dogstatsd::metric::parse_dogstatsd_metric 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.
saluki_io::deser::codec::dogstatsd::service_check::parse_dogstatsd_service_check (cyclomatic 18) lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:37— saluki_io::deser::codec::dogstatsd::service_check::parse_dogstatsd_service_check 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.
Repeated repair: bin/correctness/otlp-fixtures/src/main.rs bin/correctness/otlp-fixtures/src/main.rs:58— bin/correctness/otlp-fixtures/src/main.rs changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is otlp_fixtures::main at line 58), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(otlp): match the Agent's OTLP log scope metadata precedence (#3171)”; “fix(otlp): set `otel.event_name` for OTLP logs (#3170)”; “fix(otlp): fall back to the observed timestamp for OTLP logs (#3169)”; “fix(otlp): resolve duplicate reserved OTLP log attributes like the Agent (#3168)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- bin/correctness/otlp-fixtures/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.
Repeated repair: lib/saluki-env/src/workload/helpers/cgroups.rs lib/saluki-env/src/workload/helpers/cgroups.rs:556— lib/saluki-env/src/workload/helpers/cgroups.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is saluki_env::workload::helpers::cgroups::visit_subdirectories at line 556), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cgroups): resolve own container by controller inode (#2550)”; “fix(cgroups): detect host-mapped cgroupfs independently of procfs (#2549)”; “fix(cgroups): tolerate paths that vanish mid-traversal (#2460)”; “fix(cgroups): ignore controllers reporting a reserved inode (#2462)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-env/src/workload/helpers/cgroups.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Repeated repair: lib/saluki-io/src/deser/codec/dogstatsd/mod.rs lib/saluki-io/src/deser/codec/dogstatsd/mod.rs:225— lib/saluki-io/src/deser/codec/dogstatsd/mod.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is DogStatsDCodec::decode_packet at line 225), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(dogstatsd): accept payloads the Datadog Agent accepts in permissive mode (#3072)”; “fix(dogstatsd): skip empty fields and values instead of dropping data (#3071)”; “fix(dogstatsd): normalize invalid UTF-8 tag blocks (#2504)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-19..2026-11-17, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-19 16:10:56 +00:00' --until='2026-11-17 16:10:56 +00:00' --full-history --no-merges -- lib/saluki-io/src/deser/codec/dogstatsd/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
saluki_io::deser::codec::dogstatsd::metric::parse_dogstatsd_metric (cognitive 44) lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:67— saluki_io::deser::codec::dogstatsd::metric::parse_dogstatsd_metric has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 3 (11 pts), boolean chains 6, loops 1 (2 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.
saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event (cognitive 30) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:32— saluki_io::deser::codec::dogstatsd::event::parse_dogstatsd_event has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 6, match/switch 3, loops 1 (2 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.
saluki_io::deser::codec::dogstatsd::service_check::parse_dogstatsd_service_check (cognitive 22) lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:37— saluki_io::deser::codec::dogstatsd::service_check::parse_dogstatsd_service_check has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (2 pts), boolean chains 1, 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.
datadog_agent_apm::semantics::lookup::lookup_int64 (cognitive 43) lib/datadog-agent/apm/src/semantics/lookup.rs:46— datadog_agent_apm::semantics::lookup::lookup_int64 has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (40 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 31). 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.
datadog_agent_apm::semantics::lookup::lookup_float64 (cognitive 23) lib/datadog-agent/apm/src/semantics/lookup.rs:90— datadog_agent_apm::semantics::lookup::lookup_float64 has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 1 (2 pts), 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.
datadog_agent_apm::semantics::lookup::lookup_string (cognitive 18) lib/datadog-agent/apm/src/semantics/lookup.rs:125— datadog_agent_apm::semantics::lookup::lookup_string has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 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.
datadog_agent_config::build::datadog_config_gen::prune (cognitive 30) lib/datadog-agent/config/build/datadog_config_gen.rs:130— datadog_agent_config::build::datadog_config_gen::prune has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
datadog_agent_config::env_decode::csv_comma_separated (cognitive 22) lib/datadog-agent/config/src/env_decode.rs:154— datadog_agent_config::env_decode::csv_comma_separated has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts), match/switch 1 (3 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.
datadog_agent_config::build::classifier_gen::generate (cognitive 16) lib/datadog-agent/config/build/classifier_gen.rs:8— datadog_agent_config::build::classifier_gen::generate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), 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.
Driver::capture_container_logs (cognitive 24) bin/correctness/airlock/src/driver.rs:1216— Driver::capture_container_logs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (5 pts), 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.
Driver::start_container_inner (cognitive 23) bin/correctness/airlock/src/driver.rs:848— Driver::start_container_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (8 pts) (nesting depth added 16). 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.
Driver::run (cognitive 16) bin/correctness/millstone/src/driver.rs:71— Driver::run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Parser::string (cognitive 24) lib/datadog-agent/config-corpus/src/json.rs:213— Parser::string has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), match/switch 2 (5 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.
Parser::object (cognitive 16) lib/datadog-agent/config-corpus/src/json.rs:142— Parser::object has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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.
Parser::number (cognitive 16) lib/datadog-agent/config-corpus/src/json.rs:278— Parser::number has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (6 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.
TooManyFields: DogStatsDConfiguration lib/saluki-components/src/sources/dogstatsd/mod.rs:170— TooManyFields — 42 stored fields beside 14 methods. 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: V3Writer lib/datadog-agent/metrics-v3/src/writer.rs:144— TooManyFields — 37 stored fields beside 16 methods. The bar is 30 stored fields; this is 7 over it, 1.23× 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: SalukiOnly lib/agent-data-plane-config-system/src/saluki_only.rs:140— TooManyFields — 34 stored fields beside 1 method. 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.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×3
Edited copy of a member (26 corresponding lines) lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:140— lib/saluki-components/src/transforms/autoscaling_failover_gateway/mod.rs:140-165 | lib/saluki-components/src/transforms/metric_router/mod.rs:138-168 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:147— lib/stringtheory/src/interning/fixed_size.rs:147-173 | lib/stringtheory/src/interning/map.rs:144-169 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) lib/ddsketch/src/canonical/mapping/fixed.rs:100— lib/ddsketch/src/canonical/mapping/fixed.rs:100-125 | lib/ddsketch/src/canonical/mapping/logarithmic.rs:138-163 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) lib/saluki-components/src/sources/dogstatsd/replay/captured_tagger.rs:33— lib/saluki-components/src/sources/dogstatsd/replay/captured_tagger.rs:33-47 | lib/saluki-env/src/workload/providers/testing.rs:33-46 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) lib/saluki-components/src/common/datadog/api_key.rs:323— lib/saluki-components/src/common/datadog/api_key.rs:323-336 | lib/saluki-components/src/common/datadog/api_key.rs:340-353 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) lib/saluki-components/src/sources/dogstatsd/mod.rs:1782— lib/saluki-components/src/sources/dogstatsd/mod.rs:1782-1795 | lib/saluki-core/src/topology/interconnect/event_buffer.rs:226-245 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×3
Edited copy of a member (10 corresponding lines) lib/saluki-common/src/sync/live.rs:248— lib/saluki-common/src/sync/live.rs:248-257 | lib/saluki-common/src/sync/live.rs:268-277 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) lib/saluki-components/src/common/datadog/endpoints.rs:632— lib/saluki-components/src/common/datadog/endpoints.rs:632-641 | lib/saluki-components/src/common/datadog/endpoints.rs:645-654 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:130— lib/stringtheory/src/interning/fixed_size.rs:130-140 | lib/stringtheory/src/interning/map.rs:128-137 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (3 corresponding lines) · ×3
Edited copy of a member (3 corresponding lines) lib/saluki-core/src/data_model/tags/tagset/frozen.rs:45— lib/saluki-core/src/data_model/tags/tagset/frozen.rs:45-47 | lib/saluki-core/src/data_model/tags/tagset/shared.rs:109-112 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) lib/agent-data-plane-config/src/lib.rs:114— lib/agent-data-plane-config/src/lib.rs:114-116 | lib/datadog-agent/config/src/translate_error.rs:84-86 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (3 corresponding lines) lib/saluki-common/src/buf/chunked.rs:175— lib/saluki-common/src/buf/chunked.rs:175-177 | lib/saluki-io/src/net/util/http.rs:54-56 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (15 lines × 2) lib/saluki-components/src/destinations/prometheus/mod.rs:488— lib/saluki-components/src/destinations/prometheus/mod.rs:488-502 | lib/saluki-core/src/observability/metrics/histogram.rs:41-55 — before extracting anything, compare `lib/saluki-components/src/destinations/prometheus/mod.rs` and `lib/saluki-core/src/observability/metrics/histogram.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/destinations/prometheus/mod.rs:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) lib/saluki-core/src/data_model/event/metric/context/resolver.rs:635— lib/saluki-core/src/data_model/event/metric/context/resolver.rs:635-649 | lib/saluki-env/src/workload/on_demand_pid/linux.rs:164-178 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:727— lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:727-741 | lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:1734-1748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:727` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 3) lib/ddsketch/src/canonical/store/collapsing_highest.rs:172— lib/ddsketch/src/canonical/store/collapsing_highest.rs:172-182 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:181-191 | lib/ddsketch/src/canonical/store/dense.rs:78-87 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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 (10 lines × 3) lib/saluki-components/src/forwarders/otlp/mod.rs:157— lib/saluki-components/src/forwarders/otlp/mod.rs:157-166 | lib/saluki-components/src/forwarders/otlp/mod.rs:196-205 | lib/saluki-components/src/forwarders/otlp/mod.rs:235-244 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/forwarders/otlp/mod.rs:157` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `core_agent_grpc_client` to `&mut MetricsServiceClient<Channel>` in one and `&mut LogsServiceClient<Channel>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 3) lib/datadog-agent/config-recorder/go/record/jsonline.go:108— lib/datadog-agent/config-recorder/go/record/jsonline.go:108-117 | lib/datadog-agent/config-recorder/go/record/results.go:112-121 | lib/datadog-agent/config-recorder/go/record/values.go:223-232 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/datadog-agent/config-recorder/go/record/jsonline.go:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) lib/saluki-io/src/net/util/retry/queue/persisted.rs:286— lib/saluki-io/src/net/util/retry/queue/persisted.rs:286-303 | lib/saluki-io/src/net/util/retry/queue/persisted.rs:370-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/net/util/retry/queue/persisted.rs:286` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) lib/saluki-config/src/provider.rs:34— lib/saluki-config/src/provider.rs:34-50 | lib/saluki-config/src/provider.rs:59-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-config/src/provider.rs:34` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:225— lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:225-241 | lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:355-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/agent-data-plane-config-system/src/corpus_replay/expected.rs:225` 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.
Hollow method — returns a constant without doing the work bin/agent-data-plane/src/cli/dogstatsd.rs:277— `run_cancellable_command` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work bin/agent-data-plane/src/cli/remote.rs:176— `write_progress` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work lib/saluki-io/src/net/unix/non_linux.rs:8— `enable_uds_socket_credentials` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
datadog_agent_config::build::datadog_config_gen::permissivize (cyclomatic 16) lib/datadog-agent/config/build/datadog_config_gen.rs:817— datadog_agent_config::build::datadog_config_gen::permissivize 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.
datadog_agent_config::cast_de::parse_go_uint (cyclomatic 16) lib/datadog-agent/config/src/cast_de.rs:138— datadog_agent_config::cast_de::parse_go_uint 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.
SQLTokenizer::scan (cognitive 70) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:102— SQLTokenizer::scan has cognitive complexity 70 (threshold 15). Drivers by points: if/else 46 (66 pts), boolean chains 3, match/switch 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.
SQLTokenizer::scan_dollar_quoted_string (cognitive 19) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:467— SQLTokenizer::scan_dollar_quoted_string has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, 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.
datadog_agent_config_overlay_model::resolve_otel_refs (cognitive 48) lib/datadog-agent/config-overlay-model/src/lib.rs:568— datadog_agent_config_overlay_model::resolve_otel_refs has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 5 (16 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
datadog_agent_config_overlay_model::merge_receiver_node (cognitive 20) lib/datadog-agent/config-overlay-model/src/lib.rs:529— datadog_agent_config_overlay_model::merge_receiver_node has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (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.
Metric::try_from_v3 (cognitive 40) bin/correctness/stele/src/metrics.rs:398— Metric::try_from_v3 has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 3 (7 pts), match/switch 1 (4 pts), boolean chains 1 (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.
Metric::try_from_series_v2 (cognitive 17) bin/correctness/stele/src/metrics.rs:256— Metric::try_from_series_v2 has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (5 pts), match/switch 1 (2 pts) (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.
saluki_core::observability::metrics::flush_once (cognitive 36) lib/saluki-core/src/observability/metrics/mod.rs:557— saluki_core::observability::metrics::flush_once has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 8, loops 5 (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.
saluki_core::runtime::process::get_sanitized_name (cognitive 16) lib/saluki-core/src/runtime/process.rs:299— saluki_core::runtime::process::get_sanitized_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 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.
Runner::run_parallel (cognitive 35) bin/correctness/panoramic/src/runner.rs:311— Runner::run_parallel has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (8 pts), match/switch 1 (5 pts) (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.
Runner::run_fail_fast (cognitive 30) bin/correctness/panoramic/src/runner.rs:271— Runner::run_fail_fast has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (5 pts), match/switch 1 (5 pts) (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.
IntegrationRunner::run (cognitive 33) bin/correctness/panoramic/src/runner.rs:604— IntegrationRunner::run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 7 (10 pts), loops 1 (3 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.
IntegrationRunner::start_log_capture (cognitive 24) bin/correctness/panoramic/src/runner.rs:1011— IntegrationRunner::start_log_capture has cognitive complexity 24 (threshold 15). Drivers by points: loops 3 (11 pts), if/else 2 (8 pts), match/switch 2 (5 pts) (nesting depth added 17). 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.
saluki_app::logging::api::process_override_actions (cognitive 33) lib/saluki-app/src/logging/api.rs:220— saluki_app::logging::api::process_override_actions has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 5 (15 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
saluki_app::api::run_event_loop (cognitive 20) lib/saluki-app/src/api.rs:287— saluki_app::api::run_event_loop has cognitive complexity 20 (threshold 15). Drivers by points: if/else 2 (10 pts), match/switch 3 (9 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.
saluki_env::autodiscovery::providers::local::scan_and_emit_events (cognitive 28) lib/saluki-env/src/autodiscovery/providers/local.rs:207— saluki_env::autodiscovery::providers::local::scan_and_emit_events has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (9 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.
saluki_env::workload::helpers::cgroups::visit_subdirectories (cognitive 22) lib/saluki-env/src/workload/helpers/cgroups.rs:556— saluki_env::workload::helpers::cgroups::visit_subdirectories has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 3 (8 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.
SpanV1::fill_missing_fields (cognitive 20) lib/saluki-components/src/common/otlp/traces/transform.rs:717— SpanV1::fill_missing_fields has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (6 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.
SpanV1::copy_span_attributes (cognitive 19) lib/saluki-components/src/common/otlp/traces/transform.rs:631— SpanV1::copy_span_attributes has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, match/switch 1 (2 pts), 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.
agent_data_plane::internal::remote_command::stream_command_output (cognitive 18) bin/agent-data-plane/src/internal/remote_command.rs:176— agent_data_plane::internal::remote_command::stream_command_output has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
agent_data_plane::internal::status::write_forwarder_section (cognitive 17) bin/agent-data-plane/src/internal/status.rs:218— agent_data_plane::internal::status::write_forwarder_section has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ClassTooLong: DatadogTranslator lib/agent-data-plane-config-system/src/translators/datadog_translator.rs:49— ClassTooLong — 923 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, 3 blocks, lines 49-2046. The bar is 400 significant lines; this is 523 over it, 2.31× 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: V3Writer lib/datadog-agent/metrics-v3/src/writer.rs:144— ClassTooLong — 402 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 144-685. The bar is 400 significant lines; this is 2 over it, 1.01× 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 advisory (unmaintained) · ×2
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) lib/ddsketch/src/canonical/store/collapsing_highest.rs:258— lib/ddsketch/src/canonical/store/collapsing_highest.rs:258-276 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:271-291 | lib/ddsketch/src/canonical/store/dense.rs:167-187 | lib/ddsketch/src/canonical/store/sparse.rs:91-111 — 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) lib/saluki-components/src/encoders/buffered_incremental/mod.rs:171— lib/saluki-components/src/encoders/buffered_incremental/mod.rs:171-240 | lib/saluki-components/src/encoders/datadog/metrics/mod.rs:783-1005 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:279-383 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:405-513 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×2
Edited copy of a member (29 corresponding lines) lib/saluki-components/src/sources/dogstatsd/mod.rs:2227— lib/saluki-components/src/sources/dogstatsd/mod.rs:2227-2268 | lib/saluki-components/src/sources/dogstatsd/mod.rs:2273-2301 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:79— lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:79-109 | lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:171-199 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×2
Edited copy of a member (30 corresponding lines) lib/stringtheory/src/lib.rs:489— lib/stringtheory/src/lib.rs:489-518 | lib/stringtheory/src/lib.rs:525-558 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (30 corresponding lines) lib/saluki-components/src/common/otlp/util.rs:477— lib/saluki-components/src/common/otlp/util.rs:477-506 | lib/saluki-components/src/common/otlp/util.rs:512-542 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) lib/datadog-agent/config/src/cast_de.rs:172— lib/datadog-agent/config/src/cast_de.rs:172-213 | lib/datadog-agent/config/src/size_in_bytes.rs:125-162 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) lib/saluki-components/src/forwarders/cluster_agent/mod.rs:133— lib/saluki-components/src/forwarders/cluster_agent/mod.rs:133-170 | lib/saluki-components/src/forwarders/datadog/mod.rs:203-247 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) lib/saluki-core/src/topology/built.rs:497— lib/saluki-core/src/topology/built.rs:497-516 | lib/saluki-core/src/topology/built.rs:521-540 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) lib/saluki-common/src/deser.rs:106— lib/saluki-common/src/deser.rs:106-129 | lib/stringtheory/src/lib.rs:847-866 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×2
Edited copy of a member (28 corresponding lines) lib/datadog-agent/apm/src/semantics/lookup.rs:90— lib/datadog-agent/apm/src/semantics/lookup.rs:90-119 | lib/datadog-agent/apm/src/semantics/lookup.rs:125-152 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (28 corresponding lines) lib/stringtheory/src/interning/fixed_size.rs:340— lib/stringtheory/src/interning/fixed_size.rs:340-368 | lib/stringtheory/src/interning/map.rs:298-325 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) lib/ddsketch/src/canonical/store/collapsing_highest.rs:129— lib/ddsketch/src/canonical/store/collapsing_highest.rs:129-150 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:133-158 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) lib/saluki-components/src/destinations/dogstatsd_client_telemetry.rs:161— lib/saluki-components/src/destinations/dogstatsd_client_telemetry.rs:161-182 | lib/saluki-components/src/destinations/dsd_debug_log/mod.rs:156-180 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) lib/saluki-components/src/encoders/datadog/events/mod.rs:88— lib/saluki-components/src/encoders/datadog/events/mod.rs:88-110 | lib/saluki-components/src/encoders/datadog/service_checks/mod.rs:85-107 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:382— lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:382-412 | lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:425-447 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×2
Edited copy of a member (8 corresponding lines) lib/saluki-core/src/runtime/process.rs:101— lib/saluki-core/src/runtime/process.rs:101-108 | lib/saluki-core/src/runtime/process.rs:112-121 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) lib/ddsketch/src/canonical/mapping/fixed.rs:51— lib/ddsketch/src/canonical/mapping/fixed.rs:51-58 | lib/ddsketch/src/canonical/mapping/logarithmic.rs:97-104 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) lib/saluki-core/src/data_model/event/metric/value/iter.rs:33— lib/saluki-core/src/data_model/event/metric/value/iter.rs:33-38 | lib/saluki-core/src/data_model/event/metric/value/iter.rs:67-72 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) lib/saluki-core/src/data_model/event/metric/value/histogram.rs:271— lib/saluki-core/src/data_model/event/metric/value/histogram.rs:271-276 | lib/saluki-core/src/data_model/event/metric/value/sketch.rs:110-115 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×2
Edited copies of one member (3 members, 12+ corresponding lines) lib/saluki-components/src/common/datadog/telemetry.rs:173— lib/saluki-components/src/common/datadog/telemetry.rs:173-184 | lib/saluki-components/src/common/datadog/telemetry.rs:187-198 | lib/saluki-components/src/common/datadog/telemetry.rs:245-256 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) lib/saluki-io/src/net/client/http/conn.rs:184— lib/saluki-io/src/net/client/http/conn.rs:184-196 | lib/saluki-io/src/net/client/http/conn.rs:198-209 | lib/saluki-io/src/net/client/http/conn.rs:222-234 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×2
Edited copies of one member (3 members, 16+ corresponding lines) lib/saluki-core/src/data_model/event/metric/context/mod.rs:31— lib/saluki-core/src/data_model/event/metric/context/mod.rs:31-46 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:49-68 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:71-86 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) lib/saluki-core/src/components/test_util/context.rs:89— lib/saluki-core/src/components/test_util/context.rs:89-107 | lib/saluki-core/src/components/test_util/context.rs:116-134 | lib/saluki-core/src/components/test_util/context.rs:160-175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (26 lines × 2) lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:15— lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:15-40 | lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:71-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:15` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (26 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:456— lib/stringtheory/src/interning/fixed_size.rs:456-481 | lib/stringtheory/src/interning/map.rs:369-394 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 3) lib/saluki-core/src/data_model/event/metric/context/mod.rs:94— lib/saluki-core/src/data_model/event/metric/context/mod.rs:94-107 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:116-129 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:200-213 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/data_model/event/metric/context/mod.rs:94` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `tags` to `&[&'static str]` in one and `impl Into<TagSet>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-core/src/data_model/event/metric/context/mod.rs:115` calls `into` and `lib/saluki-core/src/data_model/event/metric/context/mod.rs:93` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:664— lib/saluki-components/src/encoders/datadog/metrics/mod.rs:664-677 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:225-238 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:349-362 — `lib/saluki-components/src/encoders/datadog/metrics/mod.rs` and `lib/saluki-components/src/encoders/datadog/stats/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/metrics/mod.rs:664` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Outbound HTTP without resilience bin/correctness/panoramic/src/actions/core_agent_config_set.rs:187— `ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience bin/correctness/panoramic/src/assertions/http_check.rs:121— `ClientBuilder::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
SQLTokenizer::scan (cyclomatic 55) lib/saluki-components/src/transforms/trace_obfuscation/sql_tokenizer.rs:102— SQLTokenizer::scan has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SalukiOnly::seed (cyclomatic 43) lib/agent-data-plane-config-system/src/saluki_only.rs:536— SalukiOnly::seed has cyclomatic complexity 43 (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.
TraceEndpointEncoder::encode_tracer_payload (cyclomatic 36) lib/saluki-components/src/encoders/datadog/traces/mod.rs:595— TraceEndpointEncoder::encode_tracer_payload has cyclomatic complexity 36 (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.
FloatLiteral::read (cyclomatic 35) lib/datadog-agent/config/src/cast_de.rs:272— FloatLiteral::read 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.
agent_data_plane_config_system::corpus_replay::expectations::judge (cyclomatic 31) lib/agent-data-plane-config-system/src/corpus_replay/expectations.rs:983— agent_data_plane_config_system::corpus_replay::expectations::judge 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.
saluki_core::observability::metrics::flush_once (cyclomatic 30) lib/saluki-core/src/observability/metrics/mod.rs:557— saluki_core::observability::metrics::flush_once 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.
TracesAnalyzer::run_analysis (cyclomatic 29) bin/correctness/panoramic/src/correctness/analysis/traces/mod.rs:132— TracesAnalyzer::run_analysis 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.
TraceSampler::run_samplers_inner (cyclomatic 27) lib/saluki-components/src/transforms/trace_sampler/mod.rs:487— TraceSampler::run_samplers_inner 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.
Supervisor::supervise (cyclomatic 27) lib/saluki-core/src/runtime/supervisor.rs:1353— Supervisor::supervise 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.
record.decodeTypedValue (cyclomatic 27) lib/datadog-agent/config-recorder/go/record/values.go:34— record.decodeTypedValue 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.
main.generateMain (cyclomatic 25) lib/datadog-agent/config-recorder/go/generate.go:22— main.generateMain has cyclomatic complexity 25 (threshold 15). Of this number, 20 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
rawCase.validate (cyclomatic 25) lib/datadog-agent/config-recorder/go/record/case.go:232— rawCase.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.
CaseLine.Validate (cyclomatic 25) lib/datadog-agent/config-recorder/go/record/records.go:230— CaseLine.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.
go_duration::parse_duration (cyclomatic 24) lib/go-duration/src/lib.rs:74— go_duration::parse_duration 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.
rootRun.explore (cyclomatic 24) lib/datadog-agent/config-recorder/go/driver/driver.go:246— rootRun.explore 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.
record.writeCanonical (cyclomatic 24) lib/datadog-agent/config-recorder/go/record/jsonline.go:58— record.writeCanonical 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.
Repository::apply (cyclomatic 23) lib/datadog-agent/remote-config/src/repository.rs:199— Repository::apply 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.
IntegrationRunner::run (cyclomatic 22) bin/correctness/panoramic/src/runner.rs:604— IntegrationRunner::run 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.
generator.unknownGroup (cyclomatic 22) lib/datadog-agent/config-recorder/go/gen/generate.go:416— generator.unknownGroup 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.
main.runCase (cyclomatic 21) lib/datadog-agent/config-recorder/go/runcase.go:135— main.runCase has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 137). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
gen.generate (cyclomatic 21) lib/datadog-agent/config-recorder/go/gen/generate.go:330— gen.generate 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.
Parser::string (cyclomatic 19) lib/datadog-agent/config-corpus/src/json.rs:213— Parser::string 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.
datadog_agent_config_overlay_model::resolve_otel_refs (cyclomatic 19) lib/datadog-agent/config-overlay-model/src/lib.rs:568— datadog_agent_config_overlay_model::resolve_otel_refs 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.
Aggregate::run (cyclomatic 19) lib/saluki-components/src/transforms/aggregate/mod.rs:461— Aggregate::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.
record.readKey (cyclomatic 19) lib/datadog-agent/config-recorder/go/record/reader.go:352— record.readKey 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.
ottl::parser::arena::convert_bool_expr (cyclomatic 18) lib/ottl/src/parser/arena.rs:196— ottl::parser::arena::convert_bool_expr 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.
OtlpDecoder::run (cyclomatic 18) lib/saluki-components/src/decoders/otlp/mod.rs:133— OtlpDecoder::run 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.
AggregationState::flush (cyclomatic 18) lib/saluki-components/src/transforms/aggregate/mod.rs:710— AggregationState::flush 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.
WorkerState::shutdown_workers_inner (cyclomatic 18) lib/saluki-core/src/runtime/worker_state.rs:320— WorkerState::shutdown_workers_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.
main.probeMain (cyclomatic 18) lib/datadog-agent/config-recorder/go/probe.go:23— main.probeMain has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, 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.
generator.envAndYAML (cyclomatic 18) lib/datadog-agent/config-recorder/go/gen/generate.go:248— generator.envAndYAML 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.
record.ReadCorpus (cyclomatic 18) lib/datadog-agent/config-recorder/go/record/reader.go:148— record.ReadCorpus has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FileContainsAssertion::check (cyclomatic 17) bin/correctness/panoramic/src/assertions/file_contains.rs:71— FileContainsAssertion::check 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.
Metric::try_from_v3 (cyclomatic 17) bin/correctness/stele/src/metrics.rs:398— Metric::try_from_v3 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.
SynchronousCgroupsManager::poll (cyclomatic 17) lib/saluki-env/src/workload/collectors/cgroups.rs:146— SynchronousCgroupsManager::poll 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.
gen.EnvText (cyclomatic 17) lib/datadog-agent/config-recorder/go/gen/values.go:172— gen.EnvText has cyclomatic complexity 17 (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.
record.encodeValue (cyclomatic 17) lib/datadog-agent/config-recorder/go/record/results.go:33— record.encodeValue 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.
PortListeningAssertion::check (cyclomatic 16) bin/correctness/panoramic/src/assertions/port_listening.rs:40— PortListeningAssertion::check 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.
datadog_agent_config_docs::build::doc_gen::generate (cyclomatic 16) lib/datadog-agent/config-docs/build/doc_gen.rs:117— datadog_agent_config_docs::build::doc_gen::generate 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.
RemoteAgentTaggerMetadataCollector::watch (cyclomatic 16) lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:155— RemoteAgentTaggerMetadataCollector::watch 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.
OtlpTracesTranslator::translate_spans (cyclomatic 16) lib/saluki-components/src/common/otlp/traces/translator.rs:313— OtlpTracesTranslator::translate_spans 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.
DogStatsDDecoder::decode_buffer_contents (cyclomatic 16) lib/saluki-components/src/sources/dogstatsd/mod.rs:1642— DogStatsDDecoder::decode_buffer_contents 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.
GroupingFilter::filter (cyclomatic 16) lib/saluki-components/src/transforms/trace_obfuscation/sql_filters.rs:231— GroupingFilter::filter has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
gen.ValuesFor (cyclomatic 16) lib/datadog-agent/config-recorder/go/gen/values.go:47— gen.ValuesFor 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.
generator.depthGroup (cyclomatic 16) lib/datadog-agent/config-recorder/go/gen/depth.go:384— generator.depthGroup 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.
record.caseNode (cyclomatic 16) lib/datadog-agent/config-recorder/go/record/casewrite.go:116— record.caseNode 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.
record.encodeTypedValueInto (cyclomatic 16) lib/datadog-agent/config-recorder/go/record/values.go:195— record.encodeTypedValueInto 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.
Supervisor::supervise (cognitive 76) lib/saluki-core/src/runtime/supervisor.rs:1353— Supervisor::supervise has cognitive complexity 76 (threshold 15). Drivers by points: if/else 12 (40 pts), match/switch 8 (30 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TracesAnalyzer::run_analysis (cognitive 72) bin/correctness/panoramic/src/correctness/analysis/traces/mod.rs:132— TracesAnalyzer::run_analysis has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 8 (24 pts), match/switch 2 (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.
RemoteAgentTaggerMetadataCollector::watch (cognitive 69) lib/datadog-agent/runtime/src/env/workload/collectors/tagger.rs:155— RemoteAgentTaggerMetadataCollector::watch has cognitive complexity 69 (threshold 15). Drivers by points: match/switch 7 (33 pts), if/else 5 (25 pts), loops 3 (11 pts) (nesting depth added 54). 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.
rootRun.explore (cognitive 57) lib/datadog-agent/config-recorder/go/driver/driver.go:246— rootRun.explore has cognitive complexity 57 (threshold 15). Drivers by points: if/else 17 (46 pts), loops 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (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.
FloatLiteral::read (cognitive 53) lib/datadog-agent/config/src/cast_de.rs:272— FloatLiteral::read has cognitive complexity 53 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 6, match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Aggregate::run (cognitive 53) lib/saluki-components/src/transforms/aggregate/mod.rs:461— Aggregate::run has cognitive complexity 53 (threshold 15). Drivers by points: if/else 6 (25 pts), match/switch 5 (17 pts), loops 3 (9 pts), boolean chains 2 (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.
TraceSampler::run_samplers_inner (cognitive 51) lib/saluki-components/src/transforms/trace_sampler/mod.rs:487— TraceSampler::run_samplers_inner has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (49 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.
TraceEndpointEncoder::encode_tracer_payload (cognitive 49) lib/saluki-components/src/encoders/datadog/traces/mod.rs:595— TraceEndpointEncoder::encode_tracer_payload has cognitive complexity 49 (threshold 15). Drivers by points: if/else 30 (33 pts), loops 6 (13 pts), boolean chains 2, match/switch 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.
OtlpDecoder::run (cognitive 48) lib/saluki-components/src/decoders/otlp/mod.rs:133— OtlpDecoder::run has cognitive complexity 48 (threshold 15). Drivers by points: if/else 6 (23 pts), match/switch 5 (15 pts), loops 3 (10 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.
DogStatsDNoAggSplit::run (cognitive 43) bin/agent-data-plane/src/components/dogstatsd_no_agg_split/mod.rs:289— DogStatsDNoAggSplit::run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 7 (33 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SalukiOnly::seed (cognitive 42) lib/agent-data-plane-config-system/src/saluki_only.rs:536— SalukiOnly::seed has cognitive complexity 42 (threshold 15). Drivers by points: if/else 42. 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.
TagFilterlist::run (cognitive 41) bin/agent-data-plane/src/components/tag_filterlist/mod.rs:379— TagFilterlist::run has cognitive complexity 41 (threshold 15). Drivers by points: match/switch 4 (19 pts), if/else 4 (16 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 30). 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.
SynchronousCgroupsManager::poll (cognitive 40) lib/saluki-env/src/workload/collectors/cgroups.rs:146— SynchronousCgroupsManager::poll has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 5 (10 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.
generator.depthGroup (cognitive 40) lib/datadog-agent/config-recorder/go/gen/depth.go:384— generator.depthGroup has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 3 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
analyze-binary-size.demangle_symbol (cognitive 37) ci/tooling/analyze-binary-size.py:203— analyze-binary-size.demangle_symbol has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (35 pts), loops 1 (2 pts) (nesting depth added 25). 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.
record.decodeTypedValue (cognitive 37) lib/datadog-agent/config-recorder/go/record/values.go:34— record.decodeTypedValue has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), boolean chains 4, loops 2 (4 pts), match/switch 2 (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.
WorkerState::shutdown_workers_inner (cognitive 36) lib/saluki-core/src/runtime/worker_state.rs:320— WorkerState::shutdown_workers_inner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 5 (10 pts), match/switch 3 (7 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.
OtlpTracesTranslator::translate_spans (cognitive 35) lib/saluki-components/src/common/otlp/traces/translator.rs:313— OtlpTracesTranslator::translate_spans has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DogStatsDOriginTagResolver::collect_origin_tags_with_process_entity (cognitive 35) lib/saluki-components/src/sources/dogstatsd/origin.rs:128— DogStatsDOriginTagResolver::collect_origin_tags_with_process_entity has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 2, loops 1 (2 pts) (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.
generator.envAndYAML (cognitive 35) lib/datadog-agent/config-recorder/go/gen/generate.go:248— generator.envAndYAML has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (28 pts), loops 5 (7 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.
record.writeCanonical (cognitive 34) lib/datadog-agent/config-recorder/go/record/jsonline.go:58— record.writeCanonical has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 4 (8 pts), match/switch 1 (nesting depth added 20). 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.
generator.unknownGroup (cognitive 33) lib/datadog-agent/config-recorder/go/gen/generate.go:416— generator.unknownGroup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 9 (12 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.
rawCase.validate (cognitive 33) lib/datadog-agent/config-recorder/go/record/case.go:232— rawCase.validate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (28 pts), loops 4, 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.
AggregationState::flush (cognitive 32) lib/saluki-components/src/transforms/aggregate/mod.rs:710— AggregationState::flush has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 4 (7 pts), boolean chains 3, match/switch 1 (2 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.
Repository::apply (cognitive 31) lib/datadog-agent/remote-config/src/repository.rs:199— Repository::apply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 4 (7 pts), boolean chains 5, loops 3 (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.
RemoteAgentWorkloadMetadataCollector::watch (cognitive 31) lib/datadog-agent/runtime/src/env/workload/collectors/workloadmeta.rs:217— RemoteAgentWorkloadMetadataCollector::watch has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 4 (16 pts), if/else 2 (10 pts), loops 2 (5 pts) (nesting depth added 23). 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.
go_duration::parse_duration (cognitive 29) lib/go-duration/src/lib.rs:74— go_duration::parse_duration has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, loops 2 (4 pts), match/switch 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.
ottl::parser::arena::convert_bool_expr (cognitive 28) lib/ottl/src/parser/arena.rs:196— ottl::parser::arena::convert_bool_expr has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
main.runCase (cognitive 28) lib/datadog-agent/config-recorder/go/runcase.go:135— main.runCase has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 4 (nesting depth added 8). Most of this is not in the body itself: 4 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 137). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
record.caseNode (cognitive 28) lib/datadog-agent/config-recorder/go/record/casewrite.go:116— record.caseNode has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4 (7 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.
CaseLine.Validate (cognitive 28) lib/datadog-agent/config-recorder/go/record/records.go:230— CaseLine.Validate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, loops 4 (5 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.
FileContainsAssertion::check (cognitive 27) bin/correctness/panoramic/src/assertions/file_contains.rs:71— FileContainsAssertion::check has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 5 (12 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gen.generate (cognitive 27) lib/datadog-agent/config-recorder/go/gen/generate.go:330— gen.generate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 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.
gen.EnvText (cognitive 27) lib/datadog-agent/config-recorder/go/gen/values.go:172— gen.EnvText has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (8 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Prometheus::run (cognitive 26) lib/saluki-components/src/destinations/prometheus/mod.rs:171— Prometheus::run has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 4 (15 pts), if/else 1 (6 pts), loops 2 (5 pts) (nesting depth added 19). 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.
DogStatsDDecoder::decode_buffer_contents (cognitive 26) lib/saluki-components/src/sources/dogstatsd/mod.rs:1642— DogStatsDDecoder::decode_buffer_contents has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
main.probeMain (cognitive 26) lib/datadog-agent/config-recorder/go/probe.go:23— main.probeMain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 2, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 49). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
record.ReadCorpus (cognitive 26) lib/datadog-agent/config-recorder/go/record/reader.go:148— record.ReadCorpus has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
record.inputsObject (cognitive 26) lib/datadog-agent/config-recorder/go/record/records.go:325— record.inputsObject has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 4 (7 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.
rawKey.UnmarshalYAML (cognitive 26) lib/datadog-agent/config-recorder/go/record/case.go:144— rawKey.UnmarshalYAML has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), match/switch 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.
DogStatsDStats::run (cognitive 25) lib/saluki-components/src/destinations/dsd_stats/mod.rs:117— DogStatsDStats::run has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 3 (8 pts), loops 2 (6 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.
MetricMapper::try_map (cognitive 25) lib/saluki-components/src/transforms/dogstatsd_mapper/mod.rs:247— MetricMapper::try_map has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 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.
datadog_agent_remote_config::worker::poll_loop (cognitive 24) lib/datadog-agent/remote-config/src/worker.rs:96— datadog_agent_remote_config::worker::poll_loop has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 5 (11 pts), loops 1 (nesting depth added 12). 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.
main.generateMain (cognitive 24) lib/datadog-agent/config-recorder/go/generate.go:22— main.generateMain has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), loops 4, boolean chains 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 7 belong to one function literal inside it that branches. 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.
SchemaOverlay::validate_entries (cognitive 23) lib/datadog-agent/config-overlay-model/src/lib.rs:366— SchemaOverlay::validate_entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 1 (2 pts), boolean chains 1, 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.
CategorizedError::extract_nested (cognitive 23) lib/saluki-io/src/net/util/retry/lifecycle/http.rs:119— CategorizedError::extract_nested has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 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.
DogstatsdReplayAction::execute (cognitive 22) bin/correctness/panoramic/src/actions/dogstatsd_replay.rs:68— DogstatsdReplayAction::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (7 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.
ScopeRuntime::on_exit (cognitive 22) lib/saluki-core/src/runtime/scope/drive.rs:489— ScopeRuntime::on_exit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (7 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
record.encodeTypedValueInto (cognitive 22) lib/datadog-agent/config-recorder/go/record/values.go:195— record.encodeTypedValueInto has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IntakeHasMetricAssertion::check (cognitive 21) bin/correctness/panoramic/src/assertions/intake_has_metric.rs:391— IntakeHasMetricAssertion::check has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (4 pts), boolean chains 1, loops 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.
datadog_agent_runtime::remote_agent::run_remote_agent_registration_loop (cognitive 21) lib/datadog-agent/runtime/src/remote_agent/mod.rs:260— datadog_agent_runtime::remote_agent::run_remote_agent_registration_loop has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 3 (9 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.
CreditCardObfuscator::is_card_number (cognitive 21) lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:87— CreditCardObfuscator::is_card_number has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, 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.
saluki_config::dynamic::diff::diff_recursive (cognitive 21) lib/saluki-config/src/dynamic/diff.rs:15— saluki_config::dynamic::diff::diff_recursive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (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.
rootRun.culprits (cognitive 21) lib/datadog-agent/config-recorder/go/driver/driver.go:325— rootRun.culprits has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 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.
record.readCase (cognitive 21) lib/datadog-agent/config-recorder/go/record/reader.go:235— record.readCase has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 5 (6 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.
record.readKey (cognitive 21) lib/datadog-agent/config-recorder/go/record/reader.go:352— record.readKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, match/switch 1 (2 pts), 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.
Reporter::report_suite_result (cognitive 20) bin/correctness/panoramic/src/reporter.rs:639— Reporter::report_suite_result has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (6 pts), match/switch 1 (nesting depth added 11). 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.
DatadogMetrics::run (cognitive 20) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:634— DatadogMetrics::run has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (14 pts), loops 3 (6 pts) (nesting depth added 12). 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.
ApmStats::run (cognitive 20) lib/saluki-components/src/transforms/apm_stats/mod.rs:480— ApmStats::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (5 pts), match/switch 2 (5 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.
Sampler::update_rates (cognitive 20) lib/saluki-components/src/transforms/trace_sampler/core_sampler.rs:136— Sampler::update_rates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 3 (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.
RemapperRule::build_remapped_tags (cognitive 20) lib/saluki-core/src/observability/metrics/remapper.rs:239— RemapperRule::build_remapped_tags has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), match/switch 1 (4 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.
ListenAddress::try_from (cognitive 20) lib/saluki-io/src/net/addr.rs:193— ListenAddress::try_from has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 3 (4 pts) (nesting depth added 8). 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.
EndpointTelemetryFuture::poll (cognitive 20) lib/saluki-io/src/net/client/http/telemetry.rs:381— EndpointTelemetryFuture::poll has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, 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.
gen.batch (cognitive 20) lib/datadog-agent/config-recorder/go/gen/generate.go:101— gen.batch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (6 pts), boolean chains 4 (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.
PortListeningAssertion::check (cognitive 19) bin/correctness/panoramic/src/assertions/port_listening.rs:40— PortListeningAssertion::check has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 5 (8 pts), loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
SpanConcentrator::flush (cognitive 19) lib/saluki-components/src/transforms/apm_stats/span_concentrator.rs:155— SpanConcentrator::flush has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 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.
MetadataFinderFilter::filter (cognitive 19) lib/saluki-components/src/transforms/trace_obfuscation/sql_filters.rs:64— MetadataFinderFilter::filter has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 1 (2 pts) (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.
CaseLine.object (cognitive 19) lib/datadog-agent/config-recorder/go/record/records.go:269— CaseLine.object has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (4 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.
AdpConfigKeyEqualsAssertion::check (cognitive 18) bin/correctness/panoramic/src/assertions/adp_config_key_equals.rs:123— AdpConfigKeyEqualsAssertion::check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdpExitsWithAssertion::check_docker_via_supervisor_log (cognitive 18) bin/correctness/panoramic/src/assertions/adp_exits.rs:119— AdpExitsWithAssertion::check_docker_via_supervisor_log has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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.
datadog_agent_config_docs::build::doc_gen::generate (cognitive 18) lib/datadog-agent/config-docs/build/doc_gen.rs:117— datadog_agent_config_docs::build::doc_gen::generate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 6, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RedisTokenizer::scan_arg (cognitive 18) lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:413— RedisTokenizer::scan_arg has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 1 (2 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.
saluki_metrics_macros::expand (cognitive 18) lib/saluki-metrics-macros/src/lib.rs:277— saluki_metrics_macros::expand has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), match/switch 2 (3 pts) (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.
driver.newSplitter (cognitive 18) lib/datadog-agent/config-recorder/go/driver/bisect.go:119— driver.newSplitter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (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.
record.finishCase (cognitive 18) lib/datadog-agent/config-recorder/go/record/reader.go:290— record.finishCase has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
record.typedFromJSON (cognitive 18) lib/datadog-agent/config-recorder/go/record/values.go:142— record.typedFromJSON has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HttpCheckAssertion::check (cognitive 17) bin/correctness/panoramic/src/assertions/http_check.rs:107— HttpCheckAssertion::check has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (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.
ResourceLedger::reclaim (cognitive 17) bin/correctness/panoramic/src/ledger.rs:257— ResourceLedger::reclaim has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 2 (4 pts), loops 2 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Scrubber::scrub (cognitive 17) lib/saluki-common/src/scrubber.rs:270— Scrubber::scrub has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 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.
NoProxyEntry::matches (cognitive 17) lib/saluki-components/src/common/datadog/proxy.rs:137— NoProxyEntry::matches has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
analyze-binary-size.main (cognitive 17) ci/tooling/analyze-binary-size.py:431— analyze-binary-size.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, loops 1, ternaries 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.
main.applyUpdates (cognitive 17) lib/datadog-agent/config-recorder/go/runcase.go:235— main.applyUpdates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), 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.
driver.ExpectedSources (cognitive 17) lib/datadog-agent/config-recorder/go/driver/bisect.go:28— driver.ExpectedSources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
record.encodeValue (cognitive 17) lib/datadog-agent/config-recorder/go/record/results.go:33— record.encodeValue has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (2 pts), boolean chains 1, 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.
record.CheckCaseRecord (cognitive 17) lib/datadog-agent/config-recorder/go/record/runresult.go:93— record.CheckCaseRecord has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 pts), 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.
panoramic_courier::follow::follow (cognitive 16) bin/correctness/courier/src/follow.rs:24— panoramic_courier::follow::follow has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 3 (7 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.
TargetAddress::try_from (cognitive 16) bin/correctness/millstone/src/config.rs:58— TargetAddress::try_from has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), 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.
LogNotContainsAssertion::check (cognitive 16) bin/correctness/panoramic/src/assertions/log_contains.rs:149— LogNotContainsAssertion::check has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), 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.
Scanner::next_matching_line (cognitive 16) lib/process-memory/src/linux.rs:227— Scanner::next_matching_line has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatadogMetricsConfiguration::any_series_endpoint_matches (cognitive 16) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:345— DatadogMetricsConfiguration::any_series_endpoint_matches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 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.
DatadogStats::run (cognitive 16) lib/saluki-components/src/encoders/datadog/stats/mod.rs:204— DatadogStats::run has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 2 (6 pts), loops 2 (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.
DatadogTrace::run (cognitive 16) lib/saluki-components/src/encoders/datadog/traces/mod.rs:328— DatadogTrace::run has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 2 (6 pts), loops 2 (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.
DogStatsDMapperConfiguration::compile_profiles (cognitive 16) lib/saluki-components/src/transforms/dogstatsd_mapper/mod.rs:95— DogStatsDMapperConfiguration::compile_profiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (3 pts), match/switch 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.
TraceObfuscation::obfuscate_redis_span (cognitive 16) lib/saluki-components/src/transforms/trace_obfuscation/mod.rs:157— TraceObfuscation::obfuscate_redis_span has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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.
GroupingFilter::filter (cognitive 16) lib/saluki-components/src/transforms/trace_obfuscation/sql_filters.rs:231— GroupingFilter::filter has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RawOrigin::fmt (cognitive 16) lib/saluki-core/src/data_model/origin.rs:202— RawOrigin::fmt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElasticAcquireFuture::poll (cognitive 16) lib/saluki-core/src/pooling/elastic.rs:293— ElasticAcquireFuture::poll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (4 pts), 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.
Graph::check_for_cycles (cognitive 16) lib/saluki-core/src/topology/graph.rs:529— Graph::check_for_cycles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), 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.
NamespaceWatcher::build_initial_metadata_operations (cognitive 16) lib/saluki-env/src/workload/collectors/containerd.rs:148— NamespaceWatcher::build_initial_metadata_operations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), match/switch 3 (6 pts), 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.
ResponseFuture::poll (cognitive 16) lib/saluki-io/src/net/util/middleware/retry_circuit_breaker.rs:95— ResponseFuture::poll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
record.typedNode (cognitive 16) lib/datadog-agent/config-recorder/go/record/casewrite.go:228— record.typedNode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). 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.
D22 · Internal API Consistency· `driver.ExpectedSources` returns a map (`map[K]V`) where its 3 siblings return a slice (`[]T`) · ×1
`driver.ExpectedSources` returns a map (`map[K]V`) where its 3 siblings return a slice (`[]T`) lib/datadog-agent/config-recorder/go/driver/bisect.go:28— 3 of 4 collection-returning members of `package driver` return a slice (`[]T`) (3 of 4). Siblings: driver.DirtyKeys (lib/datadog-agent/config-recorder/go/driver/bisect.go:76); driver.SideEffects (lib/datadog-agent/config-recorder/go/driver/bisect.go:349); driver.LoadCases (lib/datadog-agent/config-recorder/go/driver/driver.go:469). Return a slice (`[]T`). [rule A4]
Change-coupling hub: mod.rs → mod.rs, mod.rs, mod.rs, mod.rs lib/saluki-components/src/encoders/datadog/service_checks/mod.rs— `lib/saluki-components/src/encoders/datadog/service_checks/mod.rs` changes together with 4 other files — `lib/saluki-components/src/encoders/datadog/events/mod.rs`, `lib/saluki-components/src/encoders/datadog/logs/mod.rs`, `lib/saluki-components/src/encoders/datadog/metrics/mod.rs`, `lib/saluki-components/src/encoders/datadog/traces/mod.rs` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication· Edited copy of a member (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) lib/saluki-components/src/encoders/datadog/stats/mod.rs:204— lib/saluki-components/src/encoders/datadog/stats/mod.rs:204-272 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:328-398 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) lib/ddsketch/src/agent/sketch.rs:258— lib/ddsketch/src/agent/sketch.rs:258-309 | lib/ddsketch/src/agent/sketch.rs:311-373 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 46+ corresponding lines) · ×1
Edited copies of one member (3 members, 46+ corresponding lines) lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:13— lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:13-65 | lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:69-117 | lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:121-166 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 46 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (222 corresponding lines) · ×1
Edited copy of a member (222 corresponding lines) lib/saluki-components/src/sources/otlp/metrics/runtime_metrics.rs:207— lib/saluki-components/src/sources/otlp/metrics/runtime_metrics.rs:207-428 | lib/saluki-components/src/sources/otlp/metrics/runtime_metrics.rs:430-651 — These two members are one piece of code written twice and then edited apart: 222 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 30+ corresponding lines) · ×1
Edited copies of one member (3 members, 30+ corresponding lines) lib/saluki-components/src/encoders/datadog/events/mod.rs:168— lib/saluki-components/src/encoders/datadog/events/mod.rs:168-198 | lib/saluki-components/src/encoders/datadog/logs/mod.rs:201-230 | lib/saluki-components/src/encoders/datadog/service_checks/mod.rs:167-197 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) lib/saluki-components/src/destinations/prometheus/mod.rs:529— lib/saluki-components/src/destinations/prometheus/mod.rs:529-559 | lib/saluki-core/src/observability/metrics/histogram.rs:111-134 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) lib/saluki-core/src/accounting/api.rs:31— lib/saluki-core/src/accounting/api.rs:31-79 | lib/saluki-core/src/accounting/registry.rs:243-276 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) lib/ddsketch/src/canonical/sketch.rs:223— lib/ddsketch/src/canonical/sketch.rs:223-253 | lib/ddsketch/src/canonical/sketch.rs:465-491 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 34+ corresponding lines) · ×1
Edited copies of one member (3 members, 34+ corresponding lines) lib/saluki-components/src/forwarders/otlp/mod.rs:148— lib/saluki-components/src/forwarders/otlp/mod.rs:148-181 | lib/saluki-components/src/forwarders/otlp/mod.rs:186-220 | lib/saluki-components/src/forwarders/otlp/mod.rs:225-259 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) lib/datadog-agent/commons/src/ipc/tls.rs:129— lib/datadog-agent/commons/src/ipc/tls.rs:129-161 | lib/datadog-agent/commons/src/ipc/tls.rs:174-204 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) lib/saluki-core/src/runtime/state/dataspace.rs:306— lib/saluki-core/src/runtime/state/dataspace.rs:306-339 | lib/saluki-core/src/runtime/state/dataspace.rs:347-378 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) lib/saluki-components/src/encoders/datadog/events/mod.rs:140— lib/saluki-components/src/encoders/datadog/events/mod.rs:140-166 | lib/saluki-components/src/encoders/datadog/logs/mod.rs:179-199 | lib/saluki-components/src/encoders/datadog/service_checks/mod.rs:139-165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) lib/datadog-agent/runtime/src/env/workload/api.rs:211— lib/datadog-agent/runtime/src/env/workload/api.rs:211-231 | lib/saluki-app/src/config.rs:89-109 | lib/saluki-core/src/health/worker.rs:34-65 | lib/saluki-core/src/runtime/tree/worker.rs:39-60 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×1
Edited copies of one member (3 members, 14+ corresponding lines) lib/saluki-components/src/common/otlp/mod.rs:664— lib/saluki-components/src/common/otlp/mod.rs:664-677 | lib/saluki-components/src/common/otlp/mod.rs:684-697 | lib/saluki-components/src/common/otlp/mod.rs:704-717 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) lib/saluki-config/src/provider.rs:30— lib/saluki-config/src/provider.rs:30-50 | lib/saluki-config/src/provider.rs:55-75 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 18+ corresponding lines) · ×1
Edited copies of one member (5 members, 18+ corresponding lines) lib/saluki-core/src/data_model/event/metric/context/mod.rs:89— lib/saluki-core/src/data_model/event/metric/context/mod.rs:89-107 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:112-129 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:134-151 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:157-174 | lib/saluki-core/src/data_model/event/metric/context/mod.rs:196-213 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 20+ corresponding lines) · ×1
Edited copies of one member (4 members, 20+ corresponding lines) lib/saluki-core/src/data_model/event/metric/value/histogram.rs:233— lib/saluki-core/src/data_model/event/metric/value/histogram.rs:233-252 | lib/saluki-core/src/data_model/event/metric/value/scalar.rs:63-83 | lib/saluki-core/src/data_model/event/metric/value/set.rs:49-68 | lib/saluki-core/src/data_model/event/metric/value/sketch.rs:45-64 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 15+ corresponding lines) · ×1
Edited copies of one member (7 members, 15+ corresponding lines) lib/saluki-core/src/topology/blueprint.rs:595— lib/saluki-core/src/topology/blueprint.rs:595-609 | lib/saluki-core/src/topology/blueprint.rs:615-629 | lib/saluki-core/src/topology/blueprint.rs:635-649 | lib/saluki-core/src/topology/blueprint.rs:655-669 | lib/saluki-core/src/topology/blueprint.rs:675-689 | lib/saluki-core/src/topology/blueprint.rs:695-709 | lib/saluki-core/src/topology/blueprint.rs:715-729 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×1
Edited copies of one member (5 members, 9+ corresponding lines) lib/saluki-io/src/net/client/http/conn.rs:86— lib/saluki-io/src/net/client/http/conn.rs:86-94 | lib/saluki-io/src/net/client/http/conn.rs:98-106 | lib/saluki-io/src/net/client/http/conn.rs:108-116 | lib/saluki-io/src/net/client/http/conn.rs:118-126 | lib/saluki-io/src/net/client/http/conn.rs:140-148 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 14+ corresponding lines) · ×1
Edited copies of one member (4 members, 14+ corresponding lines) lib/saluki-core/src/topology/built.rs:542— lib/saluki-core/src/topology/built.rs:542-555 | lib/saluki-core/src/topology/built.rs:557-571 | lib/saluki-core/src/topology/built.rs:573-586 | lib/saluki-core/src/topology/built.rs:588-602 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) lib/saluki-core/src/data_model/event/metric/value/mod.rs:326— lib/saluki-core/src/data_model/event/metric/value/mod.rs:326-333 | lib/saluki-core/src/data_model/event/metric/value/mod.rs:336-343 | lib/saluki-core/src/data_model/event/metric/value/mod.rs:346-353 | lib/saluki-core/src/data_model/event/metric/value/mod.rs:356-363 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 29+ corresponding lines) · ×1
Edited copies of one member (3 members, 29+ corresponding lines) lib/saluki-components/src/common/otlp/traces/transform.rs:2518— lib/saluki-components/src/common/otlp/traces/transform.rs:2518-2546 | lib/saluki-components/src/common/otlp/traces/transform.rs:2552-2580 | lib/saluki-components/src/common/otlp/traces/transform.rs:2585-2624 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 15+ corresponding lines) · ×1
Edited copies of one member (5 members, 15+ corresponding lines) lib/saluki-core/src/topology/graph.rs:202— lib/saluki-core/src/topology/graph.rs:202-217 | lib/saluki-core/src/topology/graph.rs:230-246 | lib/saluki-core/src/topology/graph.rs:256-271 | lib/saluki-core/src/topology/graph.rs:283-297 | lib/saluki-core/src/topology/graph.rs:309-323 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) lib/saluki-core/src/data_model/event/metric/context/resolver.rs:84— lib/saluki-core/src/data_model/event/metric/context/resolver.rs:84-102 | lib/saluki-core/src/data_model/event/metric/context/resolver.rs:665-681 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) lib/saluki-components/src/encoders/datadog/metrics/endpoint.rs:28— lib/saluki-components/src/encoders/datadog/metrics/endpoint.rs:28-35 | lib/saluki-components/src/encoders/datadog/metrics/mod.rs:765-774 | lib/saluki-components/src/encoders/datadog/metrics/v2/mod.rs:232-237 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) lib/saluki-common/src/collections/bitset.rs:59— lib/saluki-common/src/collections/bitset.rs:59-63 | lib/saluki-components/src/common/datadog/routing.rs:66-69 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) lib/datadog-agent/config-recorder/go/record/names.go:55— lib/datadog-agent/config-recorder/go/record/names.go:55-61 | lib/datadog-agent/config-recorder/go/record/results.go:25-31 | lib/datadog-agent/config-recorder/go/record/values.go:187-193 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) lib/saluki-components/src/relays/apm/mod.rs:200— lib/saluki-components/src/relays/apm/mod.rs:200-204 | lib/saluki-components/src/relays/otlp/mod.rs:59-68 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (50 lines × 2) lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:76— lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:76-125 | lib/saluki-components/src/transforms/trace_obfuscation/redis.rs:130-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `config` to `&RedisObfuscationConfig` in one and `&ValkeyObfuscationConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (29–31 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:237— lib/saluki-components/src/encoders/datadog/stats/mod.rs:237-265 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:361-391 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (30 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:205— lib/saluki-components/src/encoders/datadog/stats/mod.rs:205-234 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:329-358 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (17–27 lines × 2) lib/saluki-components/src/forwarders/cluster_agent/mod.rs:106— lib/saluki-components/src/forwarders/cluster_agent/mod.rs:106-122 | lib/saluki-components/src/forwarders/datadog/mod.rs:139-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/forwarders/cluster_agent/mod.rs:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (27 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:162— lib/saluki-io/src/deser/codec/dogstatsd/event.rs:162-188 | lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:111-137 — before extracting anything, compare `lib/saluki-io/src/deser/codec/dogstatsd/event.rs` and `lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/event.rs:162` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (23 lines × 2) lib/saluki-components/src/destinations/prometheus/mod.rs:537— lib/saluki-components/src/destinations/prometheus/mod.rs:537-559 | lib/saluki-core/src/observability/metrics/histogram.rs:112-134 — before extracting anything, compare `lib/saluki-components/src/destinations/prometheus/mod.rs` and `lib/saluki-core/src/observability/metrics/histogram.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (22 lines × 3) lib/saluki-components/src/encoders/datadog/metrics/mod.rs:641— lib/saluki-components/src/encoders/datadog/metrics/mod.rs:641-662 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:206-227 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:330-351 — `lib/saluki-components/src/encoders/datadog/metrics/mod.rs` and `lib/saluki-components/src/encoders/datadog/stats/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/metrics/mod.rs:641` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (22 lines × 2) lib/saluki-components/src/transforms/trace_obfuscation/sql.rs:46— lib/saluki-components/src/transforms/trace_obfuscation/sql.rs:46-67 | lib/saluki-components/src/transforms/trace_obfuscation/sql.rs:69-90 — both copies are in the same file, so extract the 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–21 lines × 2) lib/saluki-components/src/encoders/datadog/stats/mod.rs:364— lib/saluki-components/src/encoders/datadog/stats/mod.rs:364-383 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:493-513 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/stats/mod.rs:364` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:341— lib/stringtheory/src/interning/fixed_size.rs:341-361 | lib/stringtheory/src/interning/map.rs:299-319 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 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–20 lines × 2) lib/ddsketch/src/canonical/store/collapsing_highest.rs:230— lib/ddsketch/src/canonical/store/collapsing_highest.rs:230-245 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:239-258 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18–19 lines × 4) lib/ddsketch/src/canonical/store/collapsing_highest.rs:259— lib/ddsketch/src/canonical/store/collapsing_highest.rs:259-276 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:273-291 | lib/ddsketch/src/canonical/store/dense.rs:169-187 | lib/ddsketch/src/canonical/store/sparse.rs:93-111 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) lib/stringtheory/src/interning/fixed_size.rs:258— lib/stringtheory/src/interning/fixed_size.rs:258-275 | lib/stringtheory/src/interning/map.rs:248-265 — before extracting anything, compare `lib/stringtheory/src/interning/fixed_size.rs` and `lib/stringtheory/src/interning/map.rs` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/stringtheory/src/interning/fixed_size.rs:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 3) lib/saluki-components/src/encoders/datadog/events/mod.rs:169— lib/saluki-components/src/encoders/datadog/events/mod.rs:169-185 | lib/saluki-components/src/encoders/datadog/logs/mod.rs:202-217 | lib/saluki-components/src/encoders/datadog/service_checks/mod.rs:168-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/events/mod.rs:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) lib/saluki-core/src/accounting/api.rs:61— lib/saluki-core/src/accounting/api.rs:61-76 | lib/saluki-core/src/accounting/registry.rs:259-273 — 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 (14–15 lines × 4) lib/saluki-components/src/encoders/datadog/stats/mod.rs:314— lib/saluki-components/src/encoders/datadog/stats/mod.rs:314-327 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:360-373 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:439-453 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:489-502 — `lib/saluki-components/src/encoders/datadog/stats/mod.rs` and `lib/saluki-components/src/encoders/datadog/traces/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 11 separate duplicated blocks between them, totalling at least 189 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/stats/mod.rs:314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14–15 lines × 2) lib/saluki-components/src/relays/otlp/mod.rs:130— lib/saluki-components/src/relays/otlp/mod.rs:130-144 | lib/saluki-components/src/sources/otlp/mod.rs:293-306 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/relays/otlp/mod.rs:130` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–14 lines × 3) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:167— lib/saluki-io/src/deser/codec/dogstatsd/event.rs:167-179 | lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:92-105 | lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs:116-128 — before extracting anything, compare `lib/saluki-io/src/deser/codec/dogstatsd/event.rs` and `lib/saluki-io/src/deser/codec/dogstatsd/service_check.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/event.rs:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) lib/ddsketch/src/canonical/store/collapsing_highest.rs:215— lib/ddsketch/src/canonical/store/collapsing_highest.rs:215-227 | lib/ddsketch/src/canonical/store/collapsing_lowest.rs:224-236 | lib/ddsketch/src/canonical/store/dense.rs:120-132 — before extracting anything, compare `lib/ddsketch/src/canonical/store/collapsing_highest.rs` and `lib/ddsketch/src/canonical/store/collapsing_lowest.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 109 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 7) lib/saluki-core/src/topology/blueprint.rs:860— lib/saluki-core/src/topology/blueprint.rs:860-871 | lib/saluki-core/src/topology/blueprint.rs:881-892 | lib/saluki-core/src/topology/blueprint.rs:902-913 | lib/saluki-core/src/topology/blueprint.rs:923-934 | lib/saluki-core/src/topology/blueprint.rs:944-955 | lib/saluki-core/src/topology/blueprint.rs:965-976 | lib/saluki-core/src/topology/blueprint.rs:986-997 — all 7 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–12 lines × 2) lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:46— lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:46-55 | lib/saluki-components/src/encoders/datadog/metrics/v2/mod.rs:336-347 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/datadog/metrics/v1/mod.rs:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10–11 lines × 3) lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:185— lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:185-194 | lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:202-211 | lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:216-226 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:201` calls `contains` and `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:184` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–10 lines × 3) lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:202— lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:202-209 | lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:216-223 | lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:227-236 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:201` calls `contains` and `lib/saluki-components/src/transforms/trace_obfuscation/credit_cards.rs:215` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 3) lib/saluki-components/src/sources/dogstatsd/origin.rs:286— lib/saluki-components/src/sources/dogstatsd/origin.rs:286-294 | lib/saluki-components/src/sources/dogstatsd/origin.rs:303-311 | lib/saluki-components/src/sources/dogstatsd/origin.rs:320-328 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8–9 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/event.rs:103— lib/saluki-io/src/deser/codec/dogstatsd/event.rs:103-111 | lib/saluki-io/src/deser/codec/dogstatsd/event.rs:115-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/event.rs:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–8 lines × 3) lib/saluki-core/src/topology/graph.rs:161— lib/saluki-core/src/topology/graph.rs:161-166 | lib/saluki-core/src/topology/graph.rs:182-187 | lib/saluki-core/src/topology/graph.rs:231-238 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/topology/graph.rs:231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) lib/saluki-core/src/data_model/event/metric/value/histogram.rs:374— lib/saluki-core/src/data_model/event/metric/value/histogram.rs:374-380 | lib/saluki-core/src/data_model/event/metric/value/set.rs:143-149 | lib/saluki-core/src/data_model/event/metric/value/sketch.rs:209-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/data_model/event/metric/value/histogram.rs:374` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–5 lines × 3) lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:51— lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:51-55 | lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:103-107 | lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:154-157 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:154` calls `iter`, `collect` and `lib/saluki-components/src/sources/otlp/metrics/translator/runtime.rs:51` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (44 lines × 3) lib/saluki-core/src/components/decoders/context.rs:24— lib/saluki-core/src/components/decoders/context.rs:24-67 | lib/saluki-core/src/components/encoders/context.rs:24-67 | lib/saluki-core/src/components/transforms/context.rs:24-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/components/decoders/context.rs:24` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `consumer` to `PayloadsConsumer` in one and `EventsConsumer` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (38 lines × 2) lib/saluki-core/src/components/destinations/context.rs:22— lib/saluki-core/src/components/destinations/context.rs:22-59 | lib/saluki-core/src/components/forwarders/context.rs:22-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/components/destinations/context.rs:22` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `consumer` to `EventsConsumer` in one and `PayloadsConsumer` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 4) lib/saluki-components/src/sources/checks_ipc/mod.rs:61— lib/saluki-components/src/sources/checks_ipc/mod.rs:61-72 | lib/saluki-components/src/sources/dogstatsd/mod.rs:873-882 | lib/saluki-components/src/sources/otlp/mod.rs:141-151 | lib/saluki-components/src/transforms/trace_sampler/mod.rs:185-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/saluki-components/src/transforms/trace_sampler/mod.rs:181` calls `input_event_type` and `lib/saluki-components/src/sources/checks_ipc/mod.rs:60` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 4) lib/saluki-components/src/encoders/buffered_incremental/mod.rs:216— lib/saluki-components/src/encoders/buffered_incremental/mod.rs:216-227 | lib/saluki-components/src/encoders/datadog/metrics/mod.rs:920-931 | lib/saluki-components/src/encoders/datadog/stats/mod.rs:342-353 | lib/saluki-components/src/encoders/datadog/traces/mod.rs:469-480 — `lib/saluki-components/src/encoders/datadog/metrics/mod.rs` and `lib/saluki-components/src/encoders/datadog/stats/mod.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-components/src/encoders/buffered_incremental/mod.rs:216` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (16–19 lines × 2) lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:131— lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:131-146 | lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:157-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:131` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 6) lib/saluki-core/src/topology/blueprint.rs:872— lib/saluki-core/src/topology/blueprint.rs:872-878 | lib/saluki-core/src/topology/blueprint.rs:893-899 | lib/saluki-core/src/topology/blueprint.rs:914-920 | lib/saluki-core/src/topology/blueprint.rs:935-941 | lib/saluki-core/src/topology/blueprint.rs:956-962 | lib/saluki-core/src/topology/blueprint.rs:977-983 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/saluki-core/src/topology/blueprint.rs:872` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) lib/saluki-core/src/components/test_util/driver.rs:307— lib/saluki-core/src/components/test_util/driver.rs:307-326 | lib/saluki-core/src/components/test_util/driver.rs:343-362 | lib/saluki-core/src/components/test_util/driver.rs:412-435 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 20+ corresponding lines) · ×1
Edited copies of one member (5 members, 20+ corresponding lines) lib/saluki-core/src/components/test_util/driver.rs:377— lib/saluki-core/src/components/test_util/driver.rs:377-397 | lib/saluki-core/src/components/test_util/driver.rs:453-476 | lib/saluki-core/src/components/test_util/driver.rs:491-511 | lib/saluki-core/src/components/test_util/driver.rs:524-543 | lib/saluki-core/src/components/test_util/driver.rs:556-575 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) lib/saluki-core/src/components/test_util/context.rs:137— lib/saluki-core/src/components/test_util/context.rs:137-151 | lib/saluki-core/src/components/test_util/context.rs:178-192 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) lib/saluki-metrics/src/test.rs:142— lib/saluki-metrics/src/test.rs:142-151 | lib/saluki-metrics/src/test.rs:153-162 | lib/saluki-metrics/src/test.rs:164-173 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (6 lines × 3) lib/saluki-core/src/components/test_util/driver.rs:380— lib/saluki-core/src/components/test_util/driver.rs:380-385 | lib/saluki-core/src/components/test_util/driver.rs:456-461 | lib/saluki-core/src/components/test_util/driver.rs:494-499 — 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) lib/saluki-core/src/components/test_util/driver.rs:309— lib/saluki-core/src/components/test_util/driver.rs:309-313 | lib/saluki-core/src/components/test_util/driver.rs:345-349 | lib/saluki-core/src/components/test_util/driver.rs:414-418 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/saluki-core/src/components/test_util/driver.rs:420` calls `input` and `lib/saluki-core/src/components/test_util/driver.rs:315` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
End-of-life runtime: Rust 1.96 rust-toolchain.toml:1— rust-toolchain.toml declares Rust 1.96 as this project's toolchain file, and Rust 1.96, superseded by 1.97 on 2026-07-09 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-07-09 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
P3 · Security & performance tooling· SAST runs, but gates no merge · ×1
SAST runs, but gates no merge — `check-aws-lc-fips-certification.yml` run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) — the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it.
X18 · Disposal-pattern correctness· Raw handle taken from an owned value and never reclaimed · ×1
Raw handle taken from an owned value and never reclaimed lib/stringtheory/src/lib.rs:458— `Arc::into_raw(value)` (line 458) gives up ownership in exchange for a raw handle — the value's `Drop` will no longer run — and nothing in the crate's code ever reclaims a `Arc` from a raw pointer (`Arc::from_raw`). The memory or descriptor stays allocated until the process ends, once per call. Pair the hand-out with its reclaim (a `free` function that rebuilds the owner with `from_raw` and drops it), or keep the owning value.
X18 · Disposal-pattern correctness· Explicit release owed and not made on every path · ×1
Explicit release owed and not made on every path lib/saluki-components/src/sources/dogstatsd/replay/writer.rs:271— `writer` (line 271) is a `BufWriter` this function owns and never releases: no `flush()` (or `into_inner()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a buffered writer that is dropped flushes and throws the error away, so a failed write reports success. Release it where the work ends.
Interpolated log message defeats structured logging lib/saluki-tls/src/lib.rs:781— `debug!` at line 781 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 lib/saluki-tls/src/lib.rs:786— `debug!` at line 786 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 lib/saluki-io/src/net/util/retry/queue/persisted.rs:160— `info!` at line 160 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 lib/saluki-io/src/net/util/retry/queue/persisted.rs:318— `warn!` at line 318 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 lib/saluki-io/src/net/util/retry/lifecycle/http.rs:49— `warn!` at line 49 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 lib/saluki-io/src/net/util/retry/lifecycle/mod.rs:26— `debug!` at line 26 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 lib/saluki-io/src/net/server/http.rs:766— `warn!` at line 766 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 lib/saluki-io/src/net/client/http/conn.rs:166— `debug!` at line 166 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 lib/saluki-io/src/deser/codec/dogstatsd/metric.rs:261— `warn!` at line 261 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 lib/saluki-env/src/workload/on_demand_pid/linux.rs:94— `trace!` at line 94 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: `trace!(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 lib/saluki-env/src/workload/on_demand_pid/linux.rs:100— `trace!` at line 100 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: `trace!(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 lib/saluki-env/src/workload/on_demand_pid/linux.rs:110— `debug!` at line 110 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 lib/saluki-env/src/workload/on_demand_pid/linux.rs:116— `debug!` at line 116 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 lib/saluki-env/src/autodiscovery/providers/local.rs:36— `warn!` at line 36 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 lib/saluki-env/src/autodiscovery/providers/local.rs:40— `warn!` at line 40 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 lib/saluki-env/src/autodiscovery/providers/local.rs:60— `info!` at line 60 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 lib/saluki-env/src/autodiscovery/providers/local.rs:75— `warn!` at line 75 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 lib/saluki-env/src/autodiscovery/providers/local.rs:174— `debug!` at line 174 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 lib/saluki-env/src/autodiscovery/providers/local.rs:184— `debug!` at line 184 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 lib/saluki-env/src/autodiscovery/providers/local.rs:191— `warn!` at line 191 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 lib/saluki-env/src/autodiscovery/providers/local.rs:235— `warn!` at line 235 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 lib/saluki-env/src/autodiscovery/providers/local.rs:265— `debug!` at line 265 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 lib/saluki-core/src/runtime/restart.rs:179— `debug!` at line 179 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 lib/saluki-core/src/runtime/supervisor.rs:1218— `debug!` at line 1218 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 lib/saluki-core/src/runtime/supervisor.rs:1421— `error!` at line 1421 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`.
Orphaned file lib/ottl/src/parser/arena.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/parser/grammar.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/saluki-antithesis/src/lib.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/mod.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/parser/ast.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/parser/eval.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file ci/tooling/fuzz_infra.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/parser/mod.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/parser/ops.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file lib/ottl/src/lexer.rs:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate lib/stringtheory/src/interning/fixed_size.rs:1066— `(a_start <= b_start && b_start <= a_end) || (a_start <= b_end && b_end <= a_end)` appears character-identically in 2 files — lib/stringtheory/src/interning/fixed_size.rs, lib/stringtheory/src/interning/map.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 lib/stringtheory/src/interning/fixed_size.rs:1112— `(is_t1_entry || is_t2_entry) && !(is_t1_entry && is_t2_entry)` appears character-identically in 2 files — lib/stringtheory/src/interning/fixed_size.rs, lib/stringtheory/src/interning/map.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 lib/agent-data-plane-config-system/src/corpus_replay/platform_defaults.rs:327— `inputs.fleet_policy.is_some() || !inputs.cli.is_empty()` appears character-identically in 2 files — lib/agent-data-plane-config-system/src/corpus_replay/platform_defaults.rs, lib/datadog-agent/config-corpus/src/corpus_checks.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 lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs:152— `self.config.infer_delta_interval && delta` appears character-identically in 2 files — lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs, lib/saluki-components/src/sources/otlp/metrics/translator/histogram.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 lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs:74— `self.config.send_histogram_aggregations && hist_info.ok` appears character-identically in 2 files — lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs, lib/saluki-components/src/sources/otlp/metrics/translator/histogram.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 lib/saluki-components/src/common/otlp/traces/normalize.rs:847— `start <= now && now - start < 5_000_000_000` appears character-identically in 2 files — lib/saluki-components/src/common/otlp/traces/normalize.rs, lib/saluki-components/src/common/otlp/traces/transform.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 lib/saluki-io/src/net/client/http/telemetry.rs:387— `status.is_client_error() || status.is_server_error()` appears character-identically in 2 files — lib/saluki-io/src/net/client/http/telemetry.rs, lib/saluki-io/src/net/util/retry/classifier/http.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.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×5
Projects may be oversized for their cohesion lib/saluki-components/Cargo.toml:1— `lib/saluki-components` (79542 LoC, 319 module-visible types across 48 directories) overshoots its size bounds. 5 of 42 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 7.6/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion lib/saluki-core/Cargo.toml:1— `lib/saluki-core` (42940 LoC, 292 module-visible types across 39 directories) overshoots its size bounds. 5 of 42 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 7.6/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion bin/correctness/panoramic/Cargo.toml:1— `bin/correctness/panoramic` (24209 LoC, 140 module-visible types across 11 directories) overshoots its size bounds. 5 of 42 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 7.6/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion bin/agent-data-plane/Cargo.toml:1— `bin/agent-data-plane` (18573 LoC, 104 module-visible types across 20 directories) overshoots its size bounds. 5 of 42 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 7.6/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Projects may be oversized for their cohesion lib/saluki-io/Cargo.toml:1— `lib/saluki-io` (15342 LoC, 107 module-visible types across 17 directories) overshoots its size bounds. 5 of 42 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 7.6/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
Silent fallback default on Err bin/correctness/panoramic/src/traffic.rs:457— `missing_input_reason` turns every `Err` into `"No input capture was written for this test.".to_string()` — 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 lib/datadog-agent/runtime/src/remote_agent/mod.rs:516— `fd_count` turns every `Err` into `"unavailable".to_string()` — 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 lib/saluki-components/src/sources/otlp/logs/transform.rs:60— `any_value_to_message_string` 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 lib/saluki-env/src/features/mod.rs:57— `get_env_var_or_empty` 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 59 significant file(s) lose their only recent owner: lib/saluki-core/src/topology/blueprint.rs, lib/saluki-core/src/runtime/scope/tests.rs, lib/saluki-core/src/topology/graph.rs, lib/saluki-core/src/runtime/tree/mod.rs, lib/saluki-core/src/runtime/builder.rs, lib/ddsketch/src/canonical/sketch.rs, lib/saluki-core/src/runtime/state/resources/mod.rs, lib/saluki-app/src/api.rs (+51 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 12 significant file(s) lose their only recent owner: lib/datadog-agent/apm/src/semantics/registry.rs, lib/saluki-components/src/sources/otlp/metrics/translator/histogram.rs, lib/datadog-agent/apm/src/semantics/remote_config.rs, lib/datadog-agent/remote-config/src/decoder.rs, lib/datadog-agent/apm/src/semantics/mod.rs, lib/saluki-components/src/sources/otlp/metrics/translator/exponential_histogram.rs, lib/datadog-agent/apm/src/semantics/provider.rs, lib/datadog-agent/remote-config/src/subscription.rs (+4 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: lib/saluki-components/src/transforms/apm_stats/peer_ip_quantize.rs, lib/saluki-components/src/common/datadog/retry_capacity.rs, lib/saluki-components/src/sources/otlp/metrics/telemetry.rs. Pair on, review, or document these before any departure.
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.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (76 single-owned of 498 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 498 of the 653 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: lib/saluki-components/src/sources/otlp/logs/transform.rs, lib/process-memory/src/aix.rs.
Documentation: no build, run or usage example README.md:1— the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×1
REDACTED
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 10 of 498 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 498 of the 653 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: lib/ottl/src/parser/arena.rs, lib/ottl/src/parser/grammar.rs, lib/saluki-antithesis/src/lib.rs, lib/ottl/src/mod.rs, lib/ottl/src/parser/ast.rs, lib/ottl/src/parser/eval.rs, ci/tooling/fuzz_infra.py, lib/ottl/src/parser/mod.rs (and 2 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Logging is not universal — Only 20/23 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `bin/correctness/courier`, `bin/correctness/otlp-fixtures`, `lib/saluki-api`.
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: `.serve_connection(` (lib/saluki-io/src/net/server/http.rs:731).
Silent fallback default on parse failure test/integration/cases/dogstatsd-forwarding/run_forwarding_test.py:194— `metric_line_value` returns `0.0` when `(IndexError, ValueError)` is raised, with no log or raise — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Outdated: arc-swap — `arc-swap` is locked at 1.9.4 but 1.9.5 is the current stable release on crates.io, and it already satisfies the `"1.9.1"` requirement declared in lib/saluki-app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arc-swap` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.6.7 but 4.6.8 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in bin/correctness/courier/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: kube — `kube` is locked at 5.0.0 but 5.1.0 is the current stable release on crates.io, and it already satisfies the `"5.0"` requirement declared in bin/correctness/panoramic/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p kube` and commit the updated REDACTED.
Outdated: prost — `prost` is locked at 0.14.4 but 0.14.6 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in bin/agent-data-plane/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p prost` and commit the updated REDACTED.
Outdated: prost-types — `prost-types` is locked at 0.14.4 but 0.14.6 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in bin/agent-data-plane/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p prost-types` and commit the updated REDACTED.
Outdated: rand — `rand` is locked at 0.10.3 but 0.10.4 is the current stable release on crates.io, and it already satisfies the `"0.10"` requirement declared in lib/saluki-components/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rand` and commit the updated REDACTED.
Outdated: rcgen — `rcgen` is locked at 0.14.9 but 0.14.10 is the current stable release on crates.io, and it already satisfies the `"0.14"` requirement declared in lib/saluki-app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rcgen` and commit the updated REDACTED.
Outdated: rustls — `rustls` is locked at 0.23.43 but 0.23.46 is the current stable release on crates.io, and it already satisfies the `"0.23"` requirement declared in lib/saluki-app/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls` and commit the updated REDACTED.
Outdated: rustls-pki-types — `rustls-pki-types` is locked at 1.15.1 but 1.16.0 is the current stable release on crates.io, and it already satisfies the `"1.14"` requirement declared in lib/saluki-app/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: rustls-webpki — `rustls-webpki` is locked at 0.103.13 but 0.103.17 is the current stable release on crates.io, and it already satisfies the `"0.103"` requirement declared in lib/saluki-tls/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls-webpki` and commit the updated REDACTED.
Outdated: uuid — `uuid` is locked at 1.29.2 but 1.29.3 is the current stable release on crates.io, and it already satisfies the `"1.23"` requirement declared in bin/agent-data-plane/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
Outdated: zstd — `zstd` is locked at 0.14.3 but 0.14.4 is the current stable release on crates.io, and it already satisfies the `"0.14.3"` requirement declared in bin/agent-data-plane/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zstd` and commit the updated REDACTED.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1ea97-1986-7c0c-9da9-86f0fc438473 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 69 · Warnings: 866 · Recommendations: 87 · Info: 12 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 17:38 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.