Public report — samply, published 30 Sep 2026. Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches, dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase survey Measured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this survey Filed cd_0b5efd6a09ce4565aa957ce0b0ee0c95 Filed 30 September 2026, 13:58 UTC Public

Mstange/samply

Measured 30 September 2026, 13:53 UTC

67% Strong
CriticalWeakAdequateStrongExemplary

Medium · 63,396 LoC · 14 projects · rebuild ~0.6 person-years · weakest lens: Maturity (59%)

Findings by grade

34 critical 347 serious 12 minor 40 could not be resolved — could be critical — see Limitations

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 September 2026, 13:53 UTC

A measurement, not a certificate. The Code Assurance Index does not certify, approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said here so the number is checked rather than believed.

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

33/37dimensions tool-verifieddeterministic · confidence 1.0 · 4 LLM-assisted, advisory
372findings with an exact file:lineof 393 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
37/119dimensions across the health lenses63396 LoC · 14 projects — wide & deep
Chapters

Executive summary

Preview (pre-1.0). This repo hasn't declared a stable release, so it's judged against a relaxed, pre-production bar.

This system holds a strong overall standing with a health score of 67%, indicating a robust foundation that is largely reliable and performant. However, the assessment reveals a critical vulnerability in how knowledge is retained and transferred, which poses a medium-level risk to long-term stability. While the code itself is clean and the architecture is sound, the lack of documented decision-making processes creates a fragile dependency on tribal knowledge rather than institutional memory.

The asset is of medium size, comprising over sixty thousand lines of production code with a modest test suite. Rebuilding this system from scratch would require approximately six months of effort by one or two engineers, costing around eighty-one thousand euros. This significant investment underscores the value tied up in the current codebase. The composition is entirely logic-driven with no boilerplate, suggesting a focused and efficient implementation. However, the cost of change is non-trivial, making the preservation of institutional knowledge through proper documentation a high-leverage activity to protect that investment.

The primary risk lies in Maturity, where the score drops to 59%. This lens measures whether a new team could effectively pick up and operate the system. Without adequate documentation, specifically regarding architectural decisions, the system becomes a black box. This lack of clarity increases the likelihood of costly errors during future modifications and slows down onboarding, directly impacting delivery speed and increasing operational risk. The absence of Architecture Decision Records means there is no clear trail of why key choices were made, leaving the business exposed to repeated mistakes or inefficient workarounds.

Conversely, the system excels in Performance and Architecture, both scoring near perfection. The code is maintainable, and the structural design is solid, ensuring that changes do not ripple unpredictably through the system. These strengths provide a stable platform for growth. The immediate focus should be on resolving the lack of Architecture Decision Records. By documenting key decisions in a standardized format, the team can significantly reduce future risk and improve operational resilience with minimal effort, securing the system’s long-term viability.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Maturity 59% · 46% weightReadiness 66% · 25% weightSecurity 69% · 14% weightCode Health 85% · 8% weightArchitecture 95% · 4% weightPerformance 100% · 2% weight

Raise Maturity 59 → 70 (the Healthy floor) ⇒ headline 67 → ~71.

Code composition — where the lines go
Tests 100%
New since the last scan (11+)

11 finding(s) are new versus the previous scan (2026-09-14) — surfaced by this scheduled scan itself, no pull request required.

  • D1 · SymbolList::new (cyclomatic 16) samply-symbols/src/symbol_map_object.rs
  • D4 · Duplicated block (6 lines × 2) fxprof-processed-profile/src/native_symbols.rs
  • D5 · Off the main sequence: samply-quota-manager
  • D5 · Off the main sequence: fxprof-processed-profile
  • D6 · Low cohesion: SymbolManagerConfig (LCOM4 13) wholesym/src/config.rs
  • D15 · Hotspot: samply-symbols/src/symbol_map_object.rs samply-symbols/src/symbol_map_object.rs
  • D22 · Inconsistent naming for property retrieval/access. `TraceEventInfoRaw` exposes a raw pointer accessor with a generic name `info_as_ptr`, while the `Parser` component uses `find_property` to locate specific data. More critically, `TypedEvent` and `EventSchema` both expose `property(index: u32): Property`, but `Parser` uses `find_property(name: str)`. This forces consumers to use different methods (`find_property` vs `property`) depending on whether they are using the low-level `Parser` or the higher-level `TypedEvent`/`EventSchema` abstractions, despite both ultimately accessing event properties.
  • D22 · Redundant API surface for schema registration. `SchemaLocator` has an instance method `add_custom_schema`, but the module-level function `etw_reader.add_custom_schemas` takes a `SchemaLocator` as an argument. It is unclear if the module function performs a different operation (e.g., global registration) or if it is a redundant wrapper. If it just calls the instance method, the module function is unnecessary noise. If it does something else, the naming is ambiguous.
  • D22 · Inconsistent naming for handle creation. The `Profile` type uses `handle_for_` prefix for creating handles for categories, strings, frames, etc. However, `InternalCategory` uses `index_for_subcategory`. This mixes 'handle' and 'index' terminology for similar concepts (identifiers/lookups) within the same domain. Additionally, `handle_for_frame_with_label` and `handle_for_frame_with_address` are distinct methods for similar intents (getting a frame handle), which is acceptable, but the lack of a unified `handle_for_frame` with a discriminator or enum argument increases API complexity.
  • D22 · Confusing separation of concerns between `Api.build_query` and the specific `*ApiQueryState` constructors. `Api.build_query` takes a URL and JSON, while the specific query states (Source, Symbolicate) have `from_request_json` constructors. It is unclear how `Api.build_query` relates to these specific states. If `Api.build_query` is a factory, it should return the appropriate `ApiQueryState` or a generic builder. The existence of multiple `from_request_json` methods on different types suggests a lack of a unified entry point for query processing.
  • D30 · REDACTED

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €27,000–€140,000
Cost to rebuild€27,000–€140,000 (0.3–0.8 person-years (448–1,421 h), ~1–2 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.9× (at 67% quality) — the last 20% of quality is most of the work
Size & shapeMedium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~0.6 person-years of build effort (about ~€81,000 to rebuild). Its weakest lens is Maturity at 59% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.9× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
+7.3 pts · Low effort · ADR Quality
2
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with custom_schemas.rs.
+4.0 pts · Low effort · Knowledge Freshness
3
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
+7.3 pts · Medium effort · Architecture documentation

Diagnosis — what's actually going on

Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~0.6 person-years to rebuild), and its weakest lens is Maturity at 59%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Medium, ~0.6 person-years rebuild (63,396 LoC) · weakest lens: Maturity 59%
→ Direct remediation budget at Maturity first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 1 No ADRs found finding(s) in ADR Quality. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 1 No ADRs found finding(s) in ADR Quality.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch dump-table dump-table wholesym wholesym dump-table->wholesym etw-reader etw-reader fxprof-processed-profile fxprof-processed-profile gecko_profile gecko_profile query-api query-api query-api->wholesym samply samply samply->fxprof-processed-profile samply-debugid samply-debugid samply->samply-debugid samply-object samply-object samply->samply-object samply-quota-manager samply-quota-manager samply->samply-quota-manager samply->wholesym samply-api samply-api samply-api->samply-debugid samply-symbols samply-symbols samply-api->samply-symbols samply-mac-preload samply-mac-preload samply-object->samply-debugid samply-symbols->samply-debugid samply-symbols->samply-object wholesym->samply-api wholesym->samply-debugid wholesym->samply-symbols wholesym-addr2line wholesym-addr2line wholesym-addr2line->wholesym

Architecture — module dependency matrix

Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

216 modules, 609 dependencies. 4 dependency cycles across 43 modules, marked above the diagonal.

Showing the 40 most-connected modules; 176 more are not drawn.

Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
depends on →1 fxprof_processed_profile.writer2 samply.shared.prop_types3 samply_debugid.codeid4 etw_reader.tdh_types5 fxprof_processed_profile.library_info6 fxprof_processed_profile.markers.types7 fxprof_processed_profile.timestamp8 samply_symbols.symbol_map_string_interner9 etw_reader.schema10 fxprof_processed_profile.markers.dynamic_schema11 samply.shared.timestamp_converter12 samply_symbols.source_file_path13 etw_reader.etw_types14 fxprof_processed_profile.markers.static_schema15 samply_symbols.shared16 fxprof_processed_profile.string_table17 samply_symbols.symbol_map18 wholesym.file_resolver19 fxprof_processed_profile.global_lib_table20 fxprof_processed_profile.marker_table21 samply_symbols.symbol_map_object22 fxprof_processed_profile.frame_table23 fxprof_processed_profile.thread24 fxprof_processed_profile.process25 gecko_profile26 fxprof_processed_profile.profile27 fxprof_processed_profile.category28 samply.import.perf29 samply.shared.per_cpu30 samply.shared.unresolved_samples31 samply.shared.jit_category_manager32 samply_api33 samply.shared.lib_mappings34 wholesym.symbol_manager35 samply.linux_shared.converter36 samply.shared.jitdump_manager37 samply.shared.process_sample_data38 samply.linux_shared.process39 samply.mac.task_profiler40 samply.windows.profile_context
1 fxprof_processed_profile.writer
2 samply.shared.prop_types
3 samply_debugid.codeid
4 etw_reader.tdh_types1
5 fxprof_processed_profile.library_info1
6 fxprof_processed_profile.markers.types3
7 fxprof_processed_profile.timestamp2
8 samply_symbols.symbol_map_string_interner12
9 etw_reader.schema25
10 fxprof_processed_profile.markers.dynamic_schema262211
11 samply.shared.timestamp_converter1
12 samply_symbols.source_file_path1
13 etw_reader.etw_types21
14 fxprof_processed_profile.markers.static_schema22111
15 samply_symbols.shared1121
16 fxprof_processed_profile.string_table31
17 samply_symbols.symbol_map418
18 wholesym.file_resolver122
19 fxprof_processed_profile.global_lib_table122
20 fxprof_processed_profile.marker_table2311521
21 samply_symbols.symbol_map_object22264
22 fxprof_processed_profile.frame_table12332
23 fxprof_processed_profile.thread131211
24 fxprof_processed_profile.process1121
25 gecko_profile221833
26 fxprof_processed_profile.profile32411422223
27 fxprof_processed_profile.category25
28 samply.import.perf11
29 samply.shared.per_cpu1123125
30 samply.shared.unresolved_samples1222
31 samply.shared.jit_category_manager43
32 samply_api1
33 samply.shared.lib_mappings12111
34 wholesym.symbol_manager11210243
35 samply.linux_shared.converter22221111411311
36 samply.shared.jitdump_manager1212222
37 samply.shared.process_sample_data166117121
38 samply.linux_shared.process11112111131
39 samply.mac.task_profiler11121122111
40 samply.windows.profile_context1111115245113121
Dependency, pointing down the layeringAbove the diagonal — part of a cycleThe module itself
…cessed_profile.writer…ply.shared.prop_typessamply_debugid.codeidetw_reader.tdh_types…_profile.library_info…profile.markers.types…sed_profile.timestamp…l_map_string_interneretw_reader.schema…arkers.dynamic_schema…d.timestamp_converter…bols.source_file_pathetw_reader.etw_types…markers.static_schemasamply_symbols.shared…_profile.string_table…ly_symbols.symbol_mapwholesym.file_resolver…file.global_lib_table…_profile.marker_table…ols.symbol_map_object…d_profile.frame_table…cessed_profile.thread…essed_profile.processgecko_profile…essed_profile.profile…ssed_profile.categorysamply.import.perfsamply.shared.per_cpu…ed.unresolved_samples….jit_category_managersamply_api…y.shared.lib_mappings…olesym.symbol_manager…inux_shared.converter…hared.jitdump_manager…d.process_sample_data….linux_shared.process…ply.mac.task_profiler…ndows.profile_context…cessed_profile.writer1…ply.shared.prop_types2samply_debugid.codeid3etw_reader.tdh_types4…_profile.library_info5…profile.markers.types6…sed_profile.timestamp7…l_map_string_interner8etw_reader.schema9…arkers.dynamic_schema10…d.timestamp_converter11…bols.source_file_path12etw_reader.etw_types13…markers.static_schema14samply_symbols.shared15…_profile.string_table16…ly_symbols.symbol_map17wholesym.file_resolver18…file.global_lib_table19…_profile.marker_table20…ols.symbol_map_object21…d_profile.frame_table22…cessed_profile.thread23…essed_profile.process24gecko_profile25…essed_profile.profile26…ssed_profile.category27samply.import.perf28samply.shared.per_cpu29…ed.unresolved_samples30….jit_category_manager31samply_api32…y.shared.lib_mappings33…olesym.symbol_manager34…inux_shared.converter35…hared.jitdump_manager36…d.process_sample_data37….linux_shared.process38…ply.mac.task_profiler39…ndows.profile_context401132122526221111212211111213141812212223115212226412332131211112122183332411422223251111231251222431121111121024322221111411311121222216611712111112111131111211221111111115245113121+176 more modules (most-connected shown)

At a glance — Code Health · 85% · Strong ·

At a glance — Architecture · 95% · Exemplary ·

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

At a glance — Readiness · 66% · Strong ·

At a glance — Security · 69% · Adequate · gated by D36 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection32High / Critical
A06:2021 — Vulnerable & Outdated Components2Medium

Roadmap

First, resolve the missing architectural decision records by documenting significant choices with their context and consequences in a centralized location. Next, enhance project onboarding by adding a testing section to the root README to clarify how to run the test suite. Then, extend structured logging across all runnable modules to ensure full observability and diagnosability in production. Finally, implement a draft release or approval gate to prevent bad builds from reaching users, ensuring safe deployment and rollback capabilities.

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

Do thisHelpsEffortDimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.+7.3 ptsLowADR Quality
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with custom_schemas.rs.+4.0 ptsLowKnowledge Freshness
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).+7.3 ptsMediumArchitecture documentation
Add a 'Testing' section to the root README — how to run the test suite.+6.7 ptsMediumDocumentation (README)
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+4.0 ptsMediumObservability
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.+4.0 ptsMediumDeployment & Rollback
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.+4.0 ptsMediumRelease Hygiene
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+0.7 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
samply-symbols/src/elf.rs4.9MixedCognitive Complexity: samply_symbols::elf::compute_function_addresses_elf (cognitive 29)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
samply/src/windows/coreclr.rs6.0MixedExplicit Debt: TodoComment
wholesym/src/file_resolver.rs6.0MixedExplicit Debt: TodoComment
samply/src/import/perf.rs6.0MixedExplicit Debt: TodoComment
etw-reader/src/lib.rs6.0MixedExplicit Debt: TodoComment
samply/src/windows/etw_reader/mod.rs6.0MixedExplicit Debt: TodoComment
samply/src/linux/profiler.rs6.0MixedExplicit Debt: TodoComment
samply/src/linux_shared/converter.rs6.0MixedExplicit Debt: TodoComment
samply/src/mac/profiler.rs6.0MixedExplicit Debt: TodoComment
etw-reader/src/parser.rs6.0MixedExplicit Debt: TodoComment
samply/src/windows/etw_reader/parser.rs6.0MixedExplicit Debt: TodoComment
samply/src/mac/task_profiler.rs6.0MixedExplicit Debt: TodoComment
etw-reader/src/etw_types.rs6.0MixedExplicit Debt: TodoComment
samply/src/shared/jitdump_manager.rs6.0MixedExplicit Debt: TodoComment
samply/src/windows/profile_context.rs6.0MixedExplicit Debt: TodoComment
fxprof-processed-profile/src/profile.rs6.0MixedExplicit Debt: TodoComment
samply/src/mac/mach_ipc.rs6.0MixedExplicit Debt: FixmeComment

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 34

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

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

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

Could not be resolved — 40

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 33 of 37 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 37 dimensions across the health lenses
D1D2D3D4D5D6D9D11D13D15D17D20D21D22D26D28D29D30D34D35D36D43AX10AX3AX4AX9M1M2M3M4P1P10P2P3P4P6PF3

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 372 of 393 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a0f297-805a-77ec-bf33-5edfbb26da29.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene couldn't be assessed within its 5-minute budget on a solution this large — not included in this run.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (49 contributor(s) across 2750 commit(s) sampled, automation and bot accounts excluded). One of them holds 82% of the history; the other 48 hold 0.4% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript source only, and no C# was loaded and no JavaScript/TypeScript was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • 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").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • 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.
  • 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.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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.

The LLM boundary

LLM-set scores this run (4): D21, D22, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.9 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

18 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was samply::windows::etw_gecko::process_trace at 72. A further 6 function(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 KernelError::from at 89 — they are counted neither in the figure above nor in this dimension's score. 5 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: samply/src/mac/kernel_error.rs (KernelError::from at 89), samply/src/mac/mach_ipc.rs (Error::from at 49), samply-symbols/src/error.rs (Error::enum_as_string at 48), samply-mac-preload/src/mach_ipc.rs (MachError::from at 40), samply-symbols/src/macho.rs (samply_symbols::macho::macho_arch_name_for_cpu_type at 21). 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.

samply::windows::etw_gecko::process_trace (cyclomatic 72) · ×8samply/src/windows/etw_gecko.rs:69
Converter::add_module_to_process (cyclomatic 24) · ×2samply/src/linux_shared/converter.rs:1317
Parser::find_property_size (cyclomatic 16) · ×2etw-reader/src/parser.rs:175
FileResolver::get_candidate_paths_for_debug_file (cyclomatic 37)wholesym/src/file_resolver.rs:481
etw_reader::write_property (cyclomatic 32)etw-reader/src/lib.rs:337

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

What to do

  1. Resolve the 8 samply finding(s) in Cyclomatic Complexity — start with profiler.rs (4), etw_gecko.rs, coreclr.rs. — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 2 Converter finding(s) in Cyclomatic Complexity — start with converter.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Parser finding(s) in Cyclomatic Complexity — start with parser.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity6.0 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

47 function(s) exceeded the cognitive complexity threshold of 15; the worst was wholesym_addr2line::main at 99.

samply::windows::etw_gecko::process_trace (cognitive 93) · ×9samply/src/windows/etw_gecko.rs:69
Parser::find_property_size (cognitive 19) · ×6etw-reader/src/parser.rs:175
Converter::add_module_to_process (cognitive 42) · ×4samply/src/linux_shared/converter.rs:1317
FileResolver::get_candidate_paths_for_debug_file (cognitive 66) · ×2wholesym/src/file_resolver.rs:481
etw_reader::write_property (cognitive 37) · ×2etw-reader/src/lib.rs:337

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

What to do

  1. Resolve the 9 samply finding(s) in Cognitive Complexity — start with profiler.rs (4), mod.rs (2), etw_gecko.rs. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 6 Parser finding(s) in Cognitive Complexity — start with parser.rs (6). — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 4 Converter finding(s) in Cognitive Complexity — start with converter.rs (4). — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.4 / 10Strong✓ Tool-verified

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

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

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

39 over-large unit(s) detected — types, modules or files that carry too much.

FileTooLong: src/mach_sys.rs · ×15samply-mac-preload/src/mach_sys.rs
TooManyFields: __darwin_x86_avx512_state64 · ×7samply-mac-preload/src/mach_sys.rs:2670
MethodTooLong: Converter.add_module_to_process · ×7samply/src/linux_shared/converter.rs:1317
FunctionTooLong: samply::windows::etw_gecko::process_trace · ×4samply/src/windows/etw_gecko.rs:69
ClassTooLong: Converter · ×4samply/src/linux_shared/converter.rs:64

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

What to do

  1. Resolve the 15 FileTooLong finding(s) in God Classes — start with custom_schemas.rs (2), mach_sys.rs, profile_context.rs. — One of this dimension's main actionable groups (15 warning-level).
  2. Resolve the 7 TooManyFields finding(s) in God Classes — start with mach_sys.rs (7). — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 7 MethodTooLong finding(s) in God Classes — start with converter.rs, task_profiler.rs, sampler.rs. — One of this dimension's main actionable groups (7 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.1 / 10Stronggated by 123 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

114 duplicated block group(s) detected. A further 9 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (10 lines × 2) · ×10etw-reader/src/etw_types.rs:150
Duplicated block (13 lines × 2) · ×8etw-reader/src/etw_types.rs:269
Duplicated block (12 lines × 2) · ×8etw-reader/src/lib.rs:156
Duplicated block (6 lines × 2) · ×8etw-reader/src/lib.rs:76
Duplicated block (9 lines × 2) · ×7etw-reader/src/schema.rs:160

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

What to do

  1. Resolve the 10 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with etw_types.rs (2), string_table.rs, mod.rs. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 8 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with parser.rs (3), lib.rs (2), etw_types.rs. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 8 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with lib.rs (2), file_resolver.rs (2), perf.rs. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

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

14 production modules (Cargo), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 12 of the 14 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).

Off the main sequence: samply-quota-manager · ×2

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

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

1 of 212 classes have LCOM4 above 3.

Low cohesion: SymbolManagerConfig (LCOM4 13)wholesym/src/config.rs:11

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with config.rs. — One of this dimension's main actionable groups (1 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

155 test methods: 109 unit, 46 integration, 0 BDD, 0 e2e. The Rust suite contributes 155 `#[test]` function(s) across 45 file(s) declaring at least one; its unit/integration split is Cargo's own — 5 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Rust (repository root, 45 test files): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

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

Top hotspots: samply-symbols/src/symbol_map_object.rs (6×16=96)

Hotspot: samply-symbols/src/symbol_map_object.rssamply-symbols/src/symbol_map_object.rs:194

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with symbol_map_object.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D17 · Explicit Debt9.7 / 10Stronggated by 95 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

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

95 deducted task-comment markers across 63396 LoC (0.1/KLoC) → score 9.7. 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 · ×87etw-reader/examples/log-stacks.rs:14
XxxComment · ×4etw-reader/src/lib.rs:409
FixmeComment · ×3etw-reader/src/lib.rs:284
HackCommentsamply/src/windows/xperf.rs:96

What to do

  1. Resolve the 87 TodoComment finding(s) in Explicit Debt — start with parser.rs (16), profiler.rs (8), coreclr.rs (7). — One of this dimension's main actionable groups (87 warning-level).
  2. Resolve the 4 XxxComment finding(s) in Explicit Debt — start with custom_schemas.rs (2), lib.rs, mod.rs. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 FixmeComment finding(s) in Explicit Debt — start with lib.rs, mod.rs, mach_ipc.rs. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

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

No architecture decision records were found.

No ADRs found

What to do

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

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyAdequate◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

4 API inconsistencies across a 400-member sample of 193 exposed types.

Inconsistent naming for property retrieval/access. `TraceEventInfoRaw` exposes a raw pointer accessor with a generic name `info_as_ptr`, while the `Parser` component uses `find_property` to locate specific data. More critically, `TypedEvent` and `EventSchema` both expose `property(index: u32): Property`, but `Parser` uses `find_property(name: str)`. This forces consumers to use different methods (`find_property` vs `property`) depending on whether they are using the low-level `Parser` or the higher-level `TypedEvent`/`EventSchema` abstractions, despite both ultimately accessing event properties.
Redundant API surface for schema registration. `SchemaLocator` has an instance method `add_custom_schema`, but the module-level function `etw_reader.add_custom_schemas` takes a `SchemaLocator` as an argument. It is unclear if the module function performs a different operation (e.g., global registration) or if it is a redundant wrapper. If it just calls the instance method, the module function is unnecessary noise. If it does something else, the naming is ambiguous.
Inconsistent naming for handle creation. The `Profile` type uses `handle_for_` prefix for creating handles for categories, strings, frames, etc. However, `InternalCategory` uses `index_for_subcategory`. This mixes 'handle' and 'index' terminology for similar concepts (identifiers/lookups) within the same domain. Additionally, `handle_for_frame_with_label` and `handle_for_frame_with_address` are distinct methods for similar intents (getting a frame handle), which is acceptable, but the lack of a unified `handle_for_frame` with a discriminator or enum argument increases API complexity.
Confusing separation of concerns between `Api.build_query` and the specific `*ApiQueryState` constructors. `Api.build_query` takes a URL and JSON, while the specific query states (Source, Symbolicate) have `from_request_json` constructors. It is unclear how `Api.build_query` relates to these specific states. If `Api.build_query` is a factory, it should return the appropriate `ApiQueryState` or a generic builder. The existence of multiple `from_request_json` methods on different types suggests a lack of a unified entry point for query processing.

What to do

  1. Resolve the 1 Inconsistent naming for property retrieval/access. `TraceEventInfoRaw`… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Redundant API surface for schema registration. `SchemaLocator` has an… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Inconsistent naming for handle creation. The `Profile` type uses… finding(s) in Internal API Consistency. — 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.

D26 · Project Cohesion6.1 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

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

3 of 14 build units (Cargo) flagged as possibly oversized/incoherent.

Split samply

What to do

  1. Resolve the 1 Split samply finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)5.0 / 10Adequate✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

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

32 finding(s): 0 critical, 32 high, 0 medium, 0 low. 28 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 2 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. No action in Static Analysis (SAST) — all 28 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (28 issue-level, 0 of them charged here).

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

D30 · Dependency Vulnerabilities9.6 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness9.6 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

6 of 162 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is etw-reader/src/custom_schemas.rs. Counted over 162 of the 229 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgeetw-reader/src/custom_schemas.rs
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with custom_schemas.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.2 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

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

Strongest change-coupling: jit_function_add_marker.rs↔process_sample_data.rs 80%; jit_function_add_marker.rs↔per_cpu.rs 80%; converter.rs↔jit_function_add_marker.rs 80%

Boundary-crossing change coupling: server.rs ↔ config.rssamply/src/server.rs
Change coupling: jit_function_add_marker.rs ↔ process_sample_data.rs · ×8samply/src/shared/jit_function_add_marker.rs
Change-coupling hub: converter.rs → process.rs, jit_function_add_marker.rs, stack_converter.rssamply/src/linux_shared/converter.rs

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with server.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 8 Change coupling finding(s) in Change Coupling — start with jit_function_add_marker.rs (2), elf.rs (2), mod.rs. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with converter.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.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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

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

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

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

M1 · Documentation (README)6.8 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

  • 103 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 3 of 15 project(s) that lack one — worth up to 0.4 pts.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

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

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

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

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `wholesym-addr2line`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Consider OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) and a health-check endpoint (a /health route on your axum/actix router) for operability.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

What to do

  • Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

Reference — by lens

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

LensScoreRatingImpact
Code Health85%StrongSolid.
Architecture95%ExemplarySolid.
Maturity59%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness66%StrongSolid.
Security69%Adequate — gated by D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 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.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 75 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.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~3155 lines of test source are present (.rs) 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.
  • D12 Dependency Hygiene — Dependency Hygiene not included (time budget)
  • D14 License Compliance — Not scored — this repository's 398 shipped crate(s) were read from its REDACTED, but crates.io could not be asked for the licence of 2 of them (TaskCanceledException: The operation was canceled.), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — LLM evaluation failed
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (116 value object(s))
  • 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 — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X29 Per-element action decided by a fixed element — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 34 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 3 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge etw-reader/src/custom_schemas.rs — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: server.rs ↔ config.rs samply/src/server.rs — `samply/src/server.rs` (context samply) and `wholesym/src/config.rs` (context wholesym) 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 `0b8c8a01` Rename SymbolManagerConfig methods from 'symbols_*' to 'symbol_*'.; `681ce871` Add command line arguments to specify symbol paths and symbol servers.; `429462a2` Move presymbolication info into helper — run `git show` on any of them.
Serious — 347 finding(s)
D17 · Explicit Debt · TodoComment · ×87
  • TodoComment etw-reader/examples/log-stacks.rs:14 — // TODO I don't know what the true cutoff 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 etw-reader/src/utils.rs:35 — // TODO: Make sure is aligned — 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 etw-reader/src/utils.rs:44 — // TODO: Make sure is aligned — 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 samply/src/windows/etw_reader/utils.rs:35 — // TODO: Make sure is aligned — 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 samply/src/windows/etw_reader/utils.rs:46 — // TODO: Make sure is aligned — 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 etw-reader/src/schema.rs:195 — // TODO: Cloning for now, should be a reference at some point... — 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 samply/src/windows/etw_reader/schema.rs:195 — // TODO: Cloning for now, should be a reference at some point... — 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 etw-reader/src/schema.rs:262 — // TODO: Not a big fan of this, think a better way.. — 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 samply/src/windows/etw_reader/schema.rs:262 — // TODO: Not a big fan of this, think a better way.. — 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 etw-reader/src/parser.rs:89 — // TODO: Find a way to use turbofish operator — 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 samply/src/windows/etw_reader/parser.rs:89 — // TODO: Find a way to use turbofish operator — 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 etw-reader/src/parser.rs:174 — // TODO: Find a cleaner way to do this, not very happy with it rn — 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 samply/src/windows/etw_reader/parser.rs:174 — // TODO: Find a cleaner way to do this, not very happy with it rn — 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 etw-reader/src/parser.rs:185 — // TODO: Study heuristic method used in krabsetw :) — 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 samply/src/windows/etw_reader/parser.rs:185 — // TODO: Study heuristic method used in krabsetw :) — 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 etw-reader/src/parser.rs:238 — // TODO: Find a way to do this with an iter, try_find looks promising but is not stable yet — 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 samply/src/windows/etw_reader/parser.rs:238 — // TODO: Find a way to do this with an iter, try_find looks promising but is not stable yet — 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 etw-reader/src/parser.rs:239 — // TODO: Clean this a bit, not a big fan of this loop — 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 samply/src/windows/etw_reader/parser.rs:239 — // TODO: Clean this a bit, not a big fan of this loop — 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 etw-reader/src/parser.rs:484 — // TODO: Handle errors and type checking 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 samply/src/windows/etw_reader/parser.rs:484 — // TODO: Handle errors and type checking 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 etw-reader/src/parser.rs:640 — // TODO: Implement SocketAddress — 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 samply/src/windows/etw_reader/parser.rs:640 — // TODO: Implement SocketAddress — 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 etw-reader/src/parser.rs:641 — // TODO: Study if we can use primitive types for HexInt64, HexInt32 and Pointer — 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 samply/src/windows/etw_reader/parser.rs:641 — // TODO: Study if we can use primitive types for HexInt64, HexInt32 and Pointer — 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.
  • + 62 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×15
  • FileTooLong: src/mach_sys.rs samply-mac-preload/src/mach_sys.rs — FileTooLong — 7198 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 6698 over it, 14.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: windows/profile_context.rs samply/src/windows/profile_context.rs — FileTooLong — 1519 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 72% of them inside a single declaration: ProfileContext (2 blocks, 440-2070). The bar is 500 significant lines; this is 1019 over it, 3.04× 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: linux_shared/converter.rs samply/src/linux_shared/converter.rs — FileTooLong — 1357 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: Converter (2 blocks, 64-1704). The bar is 500 significant lines; this is 857 over it, 2.71× 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/profile.rs fxprof-processed-profile/src/profile.rs — FileTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 88% of them inside a single declaration: Profile (2 blocks, 211-1603). The bar is 500 significant lines; this is 351 over it, 1.70× 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: breakpad/index.rs samply-symbols/src/breakpad/index.rs — FileTooLong — 814 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 314 over it, 1.63× 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/file_resolver.rs wholesym/src/file_resolver.rs — FileTooLong — 780 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 280 over it, 1.56× 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: mac/mach_ipc.rs samply/src/mac/mach_ipc.rs — FileTooLong — 754 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 254 over it, 1.51× 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/symbol_map_object.rs samply-symbols/src/symbol_map_object.rs — FileTooLong — 686 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 186 over it, 1.37× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/elf.rs samply-symbols/src/elf.rs — FileTooLong — 675 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 175 over it, 1.35× 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: mac/proc_maps.rs samply/src/mac/proc_maps.rs — FileTooLong — 622 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 122 over it, 1.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mac/task_profiler.rs samply/src/mac/task_profiler.rs — FileTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: TaskProfiler (2 blocks, 100-697). The bar is 500 significant lines; this is 96 over it, 1.19× 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/lib.rs gecko_profile/src/lib.rs — FileTooLong — 586 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 86 over it, 1.17× 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/custom_schemas.rs etw-reader/src/custom_schemas.rs — FileTooLong — 539 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 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: etw_reader/custom_schemas.rs samply/src/windows/etw_reader/custom_schemas.rs — FileTooLong — 539 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 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/macho.rs samply-symbols/src/macho.rs — FileTooLong — 509 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 9 over it, 1.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×10
  • Duplicated block (10 lines × 2) etw-reader/src/etw_types.rs:150 — etw-reader/src/etw_types.rs:150-159 | samply/src/windows/etw_reader/etw_types.rs:150-159 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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) fxprof-processed-profile/src/string_table.rs:23 — fxprof-processed-profile/src/string_table.rs:23-32 | gecko_profile/src/lib.rs:816-825 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) samply-api/src/source/mod.rs:128 — samply-api/src/source/mod.rs:128-137 | samply-api/src/symbolicate/mod.rs:198-207 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) samply-mac-preload/src/mach_sys.rs:1869 — samply-mac-preload/src/mach_sys.rs:1869-1878 | samply-mac-preload/src/mach_sys.rs:2086-2095 — both copies are in the same file, so extract the 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) etw-reader/src/etw_types.rs:304 — etw-reader/src/etw_types.rs:304-313 | samply/src/windows/etw_reader/etw_types.rs:304-313 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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) etw-reader/src/parser.rs:131 — etw-reader/src/parser.rs:131-140 | samply/src/windows/etw_reader/parser.rs:131-140 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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) etw-reader/src/schema.rs:235 — etw-reader/src/schema.rs:235-244 | samply/src/windows/etw_reader/schema.rs:235-244 — before extracting anything, compare `etw-reader/src/schema.rs` and `samply/src/windows/etw_reader/schema.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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) samply/src/linux_shared/vdso.rs:21 — samply/src/linux_shared/vdso.rs:21-30 | wholesym/src/vdso.rs:16-25 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) samply/src/windows/coreclr.rs:595 — samply/src/windows/coreclr.rs:595-604 | samply/src/windows/coreclr.rs:648-659 — both copies are in the same file, so extract the 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) etw-reader/src/lib.rs:492 — etw-reader/src/lib.rs:492-501 | samply/src/windows/etw_reader/mod.rs:492-501 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D2 · Cognitive Complexity · samply · ×9
  • samply::windows::etw_gecko::process_trace (cognitive 93) samply/src/windows/etw_gecko.rs:69 — samply::windows::etw_gecko::process_trace has cognitive complexity 93 (threshold 15). Drivers by points: if/else 43 (87 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 47). 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.
  • samply::import::perf::convert_impl (cognitive 57) samply/src/import/perf.rs:71 — samply::import::perf::convert_impl has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (40 pts), match/switch 5 (13 pts), boolean chains 2, loops 2 (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.
  • samply::windows::coreclr::handle_coreclr_event (cognitive 45) samply/src/windows/coreclr.rs:353 — samply::windows::coreclr::handle_coreclr_event has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (38 pts), match/switch 4 (6 pts), boolean chains 1 (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.
  • samply::linux::profiler::run_profiler (cognitive 38) samply/src/linux/profiler.rs:530 — samply::linux::profiler::run_profiler has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 6 (12 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • samply::windows::etw_reader::write_property (cognitive 37) samply/src/windows/etw_reader/mod.rs:337 — samply::windows::etw_reader::write_property has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 4 (9 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • samply::mac::profiler::run (cognitive 37) samply/src/mac/profiler.rs:20 — samply::mac::profiler::run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 6 (13 pts), loops 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.
  • samply::linux::profiler::init_profiler (cognitive 31) samply/src/linux/profiler.rs:370 — samply::linux::profiler::init_profiler has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 4 (6 pts), loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • samply::linux::profiler::run (cognitive 21) samply/src/linux/profiler.rs:36 — samply::linux::profiler::run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 6 (8 pts), boolean chains 1, 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.
  • samply::windows::etw_reader::enumerate_trace_guids_ex (cognitive 18) samply/src/windows/etw_reader/mod.rs:530 — samply::windows::etw_reader::enumerate_trace_guids_ex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D1 · Cyclomatic Complexity · samply · ×8
  • samply::windows::etw_gecko::process_trace (cyclomatic 72) samply/src/windows/etw_gecko.rs:69 — samply::windows::etw_gecko::process_trace has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • samply::windows::coreclr::handle_coreclr_event (cyclomatic 37) samply/src/windows/coreclr.rs:353 — samply::windows::coreclr::handle_coreclr_event 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.
  • samply::import::perf::convert_impl (cyclomatic 34) samply/src/import/perf.rs:71 — samply::import::perf::convert_impl 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.
  • samply::windows::etw_reader::write_property (cyclomatic 32) samply/src/windows/etw_reader/mod.rs:337 — samply::windows::etw_reader::write_property has cyclomatic complexity 32 (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.
  • samply::linux::profiler::run_profiler (cyclomatic 30) samply/src/linux/profiler.rs:530 — samply::linux::profiler::run_profiler 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.
  • samply::mac::profiler::run (cyclomatic 21) samply/src/mac/profiler.rs:20 — samply::mac::profiler::run 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.
  • samply::linux::profiler::run (cyclomatic 18) samply/src/linux/profiler.rs:36 — samply::linux::profiler::run 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.
  • samply::linux::profiler::init_profiler (cyclomatic 16) samply/src/linux/profiler.rs:370 — samply::linux::profiler::init_profiler 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.
D35 · Change Coupling · Change coupling · ×8
  • Change coupling: jit_function_add_marker.rs ↔ process_sample_data.rs samply/src/shared/jit_function_add_marker.rs — `samply/src/shared/jit_function_add_marker.rs` and `samply/src/shared/process_sample_data.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 `581958c6` Add convenience field creator methods.; `fed882cf` Add StaticSchemaMarkerField::new.; `2685d2c8` Change marker field API. — run `git show` on any of them.
  • Change coupling: jit_function_add_marker.rs ↔ per_cpu.rs samply/src/shared/jit_function_add_marker.rs — `samply/src/shared/jit_function_add_marker.rs` and `samply/src/shared/per_cpu.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 `581958c6` Add convenience field creator methods.; `fed882cf` Add StaticSchemaMarkerField::new.; `2685d2c8` Change marker field API. — run `git show` on any of them.
  • Change coupling: elf.rs ↔ macho.rs samply-symbols/src/elf.rs — `samply-symbols/src/elf.rs` and `samply-symbols/src/macho.rs` change together 75% of the time (44 of the 59 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 44 shared commits counted here, the most recent 3 are `071b0c11` Remove ObjectExt and make functions free-standing; `2d858c1c` Split out samply-object crate; `047a948e` Remove the Mutex in samply_symbols::SymbolMap. — run `git show` on any of them.
  • Change coupling: mod.rs ↔ mod.rs samply-api/src/source/mod.rs — `samply-api/src/source/mod.rs` and `samply-api/src/symbolicate/mod.rs` change together 68% of the time (13 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) 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 13 shared commits counted here, the most recent 3 are `502b740a` Make query_json_api return a QueryApiJsonResult instead of a String, …; `7a0c7001` Improve wholesym lookup API.; `e85415bd` Move lookup_external to SymbolMap. — run `git show` on any of them.
  • Change coupling: lib.rs ↔ lib.rs tools/dump_table/src/lib.rs — `tools/dump_table/src/lib.rs` and `tools/query_api/src/lib.rs` change together 64% of the time (9 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 9 shared commits counted here, the most recent 3 are `f81bba5d` Migrate utility crates from samply-symbols to wholesym.; `8c06199c` Lower MSRV by reverting the use of async fn in trait.; `850ab0a8` Use async fn in trait. — run `git show` on any of them.
  • Change coupling: profiler.rs ↔ xperf.rs samply/src/windows/profiler.rs — `samply/src/windows/profiler.rs` and `samply/src/windows/xperf.rs` change together 62% of the time (8 of the 13 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 `22e5ff76` Don't merge the ETL files.; `6470142b` Store the operating system version in the profile.; `799fe445` Support CoreCLR Rundown events when attaching — run `git show` on any of them.
  • Change coupling: import.rs ↔ profiler.rs samply/src/windows/import.rs — `samply/src/windows/import.rs` and `samply/src/windows/profiler.rs` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency 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 6 shared commits counted here, the most recent 3 are `8c277e56` Share post-recording code across platforms.; `db11ba53` Move some things to ProfileCreationArgs.; `4f133762` Set a useful profile name for imported simpleperf profiles again. — run `git show` on any of them.
  • Change coupling: elf.rs ↔ windows.rs samply-symbols/src/elf.rs — `samply-symbols/src/elf.rs` and `samply-symbols/src/windows.rs` change together 53% of the time (31 of the 59 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 31 shared commits counted here, the most recent 3 are `071b0c11` Remove ObjectExt and make functions free-standing; `2d858c1c` Split out samply-object crate; `047a948e` Remove the Mutex in samply_symbols::SymbolMap. — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×8
  • Duplicated block (13 lines × 2) etw-reader/src/etw_types.rs:269 — etw-reader/src/etw_types.rs:269-281 | samply/src/windows/etw_reader/etw_types.rs:269-281 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) etw-reader/src/lib.rs:298 — etw-reader/src/lib.rs:298-310 | samply/src/windows/etw_reader/mod.rs:298-310 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) etw-reader/src/lib.rs:540 — etw-reader/src/lib.rs:540-552 | samply/src/windows/etw_reader/mod.rs:540-552 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) etw-reader/src/parser.rs:351 — etw-reader/src/parser.rs:351-363 | samply/src/windows/etw_reader/parser.rs:351-363 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) etw-reader/src/parser.rs:368 — etw-reader/src/parser.rs:368-380 | samply/src/windows/etw_reader/parser.rs:368-380 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) etw-reader/src/parser.rs:442 — etw-reader/src/parser.rs:442-454 | samply/src/windows/etw_reader/parser.rs:442-454 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) samply/src/linux_shared/process_threads.rs:119 — samply/src/linux_shared/process_threads.rs:119-131 | samply/src/linux_shared/processes.rs:215-227 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) samply-mac-preload/src/mach_ipc.rs:297 — samply-mac-preload/src/mach_ipc.rs:297-309 | samply/src/mac/mach_ipc.rs:348-360 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×8
  • Duplicated block (12 lines × 2) etw-reader/src/lib.rs:156 — etw-reader/src/lib.rs:156-167 | samply/src/windows/etw_reader/mod.rs:156-167 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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 (12 lines × 2) etw-reader/src/lib.rs:390 — etw-reader/src/lib.rs:390-401 | samply/src/windows/etw_reader/mod.rs:390-401 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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 (12 lines × 2) samply/src/import/perf.rs:250 — samply/src/import/perf.rs:250-261 | samply/src/linux/profiler.rs:596-607 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) samply-symbols/src/breakpad/index.rs:945 — samply-symbols/src/breakpad/index.rs:945-956 | samply/src/linux_shared/kernel_symbols.rs:143-154 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) samply-mac-preload/src/mach_ipc.rs:500 — samply-mac-preload/src/mach_ipc.rs:500-511 | samply/src/mac/mach_ipc.rs:817-828 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 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 (12 lines × 2) samply-quota-manager/src/quota_manager.rs:260 — samply-quota-manager/src/quota_manager.rs:260-271 | samply-quota-manager/src/quota_manager.rs:278-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) wholesym/src/file_resolver.rs:1021 — wholesym/src/file_resolver.rs:1021-1032 | wholesym/src/file_resolver.rs:1042-1053 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) wholesym/src/file_resolver.rs:1177 — wholesym/src/file_resolver.rs:1177-1188 | wholesym/src/file_resolver.rs:1198-1209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) etw-reader/src/lib.rs:76 — etw-reader/src/lib.rs:76-81 | samply/src/windows/etw_reader/mod.rs:76-81 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) samply/src/linux_shared/vdso.rs:13 — samply/src/linux_shared/vdso.rs:13-18 | wholesym/src/vdso.rs:8-13 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) samply-symbols/src/symbol_map_string_interner.rs:109 — samply-symbols/src/symbol_map_string_interner.rs:109-114 | samply-symbols/src/symbol_map_string_interner.rs:127-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) etw-reader/src/etw_types.rs:25 — etw-reader/src/etw_types.rs:25-30 | samply/src/windows/etw_reader/etw_types.rs:25-30 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) etw-reader/src/parser.rs:632 — etw-reader/src/parser.rs:632-637 | samply/src/windows/etw_reader/parser.rs:632-637 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) etw-reader/src/utils.rs:58 — etw-reader/src/utils.rs:58-63 | samply/src/windows/etw_reader/utils.rs:62-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) samply-mac-preload/src/mach_ipc.rs:113 — samply-mac-preload/src/mach_ipc.rs:113-118 | samply/src/mac/mach_ipc.rs:143-148 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) fxprof-processed-profile/src/native_symbols.rs:179 — fxprof-processed-profile/src/native_symbols.rs:179-185 | fxprof-processed-profile/src/stack_table.rs:148-153 — 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.
D3 · God Classes · TooManyFields · ×7
  • TooManyFields: __darwin_x86_avx512_state64 samply-mac-preload/src/mach_sys.rs:2670 — TooManyFields — 97 stored fields. The bar is 30 stored fields; this is 67 over it, 3.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: __darwin_i386_avx512_state samply-mac-preload/src/mach_sys.rs:2263 — TooManyFields — 57 stored fields. The bar is 30 stored fields; this is 27 over it, 1.90× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: __darwin_x86_avx_state64 samply-mac-preload/src/mach_sys.rs:2608 — TooManyFields — 57 stored fields. The bar is 30 stored fields; this is 27 over it, 1.90× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: task_vm_info samply-mac-preload/src/mach_sys.rs:3345 — TooManyFields — 46 stored fields. The bar is 30 stored fields; this is 16 over it, 1.53× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: __darwin_i386_avx_state samply-mac-preload/src/mach_sys.rs:2217 — TooManyFields — 41 stored fields. The bar is 30 stored fields; this is 11 over it, 1.37× 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: __darwin_x86_float_state64 samply-mac-preload/src/mach_sys.rs:2563 — TooManyFields — 40 stored fields. The bar is 30 stored fields; this is 10 over it, 1.33× 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: __darwin_i386_float_state samply-mac-preload/src/mach_sys.rs:2180 — TooManyFields — 32 stored fields. The bar is 30 stored fields; this is 2 over it, 1.07× 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.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: Converter.add_module_to_process samply/src/linux_shared/converter.rs:1317 — MethodTooLong — add_module_to_process runs 176 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 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TaskProfiler.new samply/src/mac/task_profiler.rs:123 — MethodTooLong — new runs 146 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 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Sampler.run samply/src/mac/sampler.rs:61 — MethodTooLong — run runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ElfLoad.provide samply-symbols/src/elf.rs:628 — MethodTooLong — provide runs 117 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 17 over it, 1.17× 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: FileResolver.get_candidate_paths_for_debug_file wholesym/src/file_resolver.rs:481 — MethodTooLong — get_candidate_paths_for_debug_file 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.
  • MethodTooLong: PerfBuilder.open samply/src/linux/perf_event.rs:230 — MethodTooLong — open runs 112 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 12 over it, 1.12× 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: Error.from samply/src/mac/mach_ipc.rs:938 — MethodTooLong — from 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) etw-reader/src/schema.rs:160 — etw-reader/src/schema.rs:160-168 | samply/src/windows/etw_reader/schema.rs:160-168 — before extracting anything, compare `etw-reader/src/schema.rs` and `samply/src/windows/etw_reader/schema.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) samply/src/windows/etw_reader/utils.rs:70 — samply/src/windows/etw_reader/utils.rs:70-78 | samply/src/windows/etw_reader/utils.rs:83-91 — both copies are in the same file, so extract the 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) samply-mac-preload/src/lib.rs:122 — samply-mac-preload/src/lib.rs:122-130 | samply-mac-preload/src/lib.rs:140-148 — both copies are in the same file, so extract the 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) samply-mac-preload/src/mach_sys.rs:1895 — samply-mac-preload/src/mach_sys.rs:1895-1903 | samply-mac-preload/src/mach_sys.rs:2136-2144 — both copies are in the same file, so extract the 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) etw-reader/src/etw_types.rs:83 — etw-reader/src/etw_types.rs:83-91 | samply/src/windows/etw_reader/etw_types.rs:83-91 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) samply-symbols/src/symbol_map_object.rs:476 — samply-symbols/src/symbol_map_object.rs:476-484 | samply/src/linux_shared/svma_file_range.rs:15-23 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) samply-symbols/src/symbol_map_object.rs:486 — samply-symbols/src/symbol_map_object.rs:486-494 | samply/src/linux_shared/svma_file_range.rs:25-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×7
  • Duplicated block (5 lines × 2) etw-reader/src/etw_types.rs:298 — etw-reader/src/etw_types.rs:298-302 | samply/src/windows/etw_reader/etw_types.rs:298-302 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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) etw-reader/src/lib.rs:435 — etw-reader/src/lib.rs:435-439 | samply/src/windows/etw_reader/mod.rs:435-439 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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) etw-reader/src/parser.rs:617 — etw-reader/src/parser.rs:617-621 | samply/src/windows/etw_reader/parser.rs:617-621 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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) samply-symbols/src/symbol_map_object.rs:534 — samply-symbols/src/symbol_map_object.rs:534-538 | samply/src/linux_shared/svma_file_range.rs:55-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.
  • Duplicated block (5 lines × 2) samply-symbols/src/breakpad/symbol_map.rs:81 — samply-symbols/src/breakpad/symbol_map.rs:81-85 | samply-symbols/src/elf.rs:187-191 — 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) samply-mac-preload/src/mach_ipc.rs:367 — samply-mac-preload/src/mach_ipc.rs:367-371 | samply/src/mac/mach_ipc.rs:395-399 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 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) samply-mac-preload/src/lib.rs:132 — samply-mac-preload/src/lib.rs:132-136 | samply-mac-preload/src/lib.rs:150-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · Parser · ×6
  • Parser::find_property_size (cognitive 19) etw-reader/src/parser.rs:175 — Parser::find_property_size has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), boolean chains 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.
  • Parser::try_parse (cognitive 19) etw-reader/src/parser.rs:321 — Parser::try_parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1 (nesting depth added 11). 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.
  • Parser::find_property_size (cognitive 19) samply/src/windows/etw_reader/parser.rs:175 — Parser::find_property_size has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (5 pts), boolean chains 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.
  • Parser::try_parse (cognitive 19) samply/src/windows/etw_reader/parser.rs:321 — Parser::try_parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1 (nesting depth added 11). 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.
  • Parser::try_parse (cognitive 16) etw-reader/src/parser.rs:384 — Parser::try_parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). 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.
  • Parser::try_parse (cognitive 16) samply/src/windows/etw_reader/parser.rs:384 — Parser::try_parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2 (nesting depth added 8). 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) etw-reader/src/etw_types.rs:289 — etw-reader/src/etw_types.rs:289-296 | samply/src/windows/etw_reader/etw_types.rs:289-296 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) etw-reader/src/lib.rs:87 — etw-reader/src/lib.rs:87-94 | samply/src/windows/etw_reader/mod.rs:87-94 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) samply/src/linux_shared/process_threads.rs:149 — samply/src/linux_shared/process_threads.rs:149-156 | samply/src/linux_shared/process_threads.rs:195-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) wholesym/src/breakpad.rs:191 — wholesym/src/breakpad.rs:191-198 | wholesym/src/debuginfod.rs:112-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) etw-reader/src/lib.rs:113 — etw-reader/src/lib.rs:113-120 | samply/src/windows/etw_reader/mod.rs:113-120 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) etw-reader/src/lib.rs:531 — etw-reader/src/lib.rs:531-537 | samply/src/windows/etw_reader/mod.rs:531-537 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) etw-reader/src/parser.rs:622 — etw-reader/src/parser.rs:622-628 | samply/src/windows/etw_reader/parser.rs:622-628 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) etw-reader/src/utils.rs:66 — etw-reader/src/utils.rs:66-72 | etw-reader/src/utils.rs:77-83 — both copies are in the same file, so extract the 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) samply-symbols/src/breakpad/index.rs:98 — samply-symbols/src/breakpad/index.rs:98-104 | samply-symbols/src/breakpad/index.rs:112-118 — both copies are in the same file, so extract the 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) samply-symbols/src/breakpad/index.rs:1027 — samply-symbols/src/breakpad/index.rs:1027-1033 | samply-symbols/src/breakpad/index.rs:1038-1044 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D17 · Explicit Debt · XxxComment · ×4
  • XxxComment etw-reader/src/lib.rs:409 — // XXX: we should be using the out_type here instead of in_type — 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.
  • XxxComment samply/src/windows/etw_reader/mod.rs:409 — // XXX: we should be using the out_type here instead of in_type — 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.
  • XxxComment etw-reader/src/custom_schemas.rs:704 — // XXX: use an enum for these — 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.
  • XxxComment samply/src/windows/etw_reader/custom_schemas.rs:704 — // XXX: use an enum for these — 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.
D2 · Cognitive Complexity · Converter · ×4
  • Converter::add_module_to_process (cognitive 42) samply/src/linux_shared/converter.rs:1317 — Converter::add_module_to_process has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 4 (7 pts), boolean chains 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.
  • Converter::get_sample_stack (cognitive 29) samply/src/linux_shared/converter.rs:616 — Converter::get_sample_stack has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Converter::handle_context_switch (cognitive 17) samply/src/linux_shared/converter.rs:850 — Converter::handle_context_switch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Converter::add_kernel_module (cognitive 17) samply/src/linux_shared/converter.rs:1154 — Converter::add_kernel_module has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · FunctionTooLong · ×4
  • FunctionTooLong: samply::windows::etw_gecko::process_trace samply/src/windows/etw_gecko.rs:69 — FunctionTooLong — samply::windows::etw_gecko::process_trace runs 368 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 268 over it, 3.68× 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: samply::windows::coreclr::handle_coreclr_event samply/src/windows/coreclr.rs:353 — FunctionTooLong — samply::windows::coreclr::handle_coreclr_event runs 183 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 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: wholesym_addr2line::main wholesym-addr2line/src/main.rs:67 — FunctionTooLong — wholesym_addr2line::main runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: samply::mac::profiler::run samply/src/mac/profiler.rs:20 — FunctionTooLong — samply::mac::profiler::run runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · ClassTooLong · ×4
  • ClassTooLong: Converter samply/src/linux_shared/converter.rs:64 — ClassTooLong — 1105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 29 methods, 2 blocks, lines 64-1704. The bar is 400 significant lines; this is 705 over it, 2.76× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ProfileContext samply/src/windows/profile_context.rs:440 — ClassTooLong — 1087 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 46 methods, 2 blocks, lines 440-2070. The bar is 400 significant lines; this is 687 over it, 2.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Profile fxprof-processed-profile/src/profile.rs:211 — ClassTooLong — 753 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 69 methods, 2 blocks, lines 211-1603. The bar is 400 significant lines; this is 353 over it, 1.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TaskProfiler samply/src/mac/task_profiler.rs:100 — ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 2 blocks, lines 100-697. The bar is 400 significant lines; this is 49 over it, 1.12× 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 · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) etw-reader/src/lib.rs:504 — etw-reader/src/lib.rs:504-528 | samply/src/windows/etw_reader/mod.rs:504-528 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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 (25 lines × 2) etw-reader/src/parser.rs:322 — etw-reader/src/parser.rs:322-346 | samply/src/windows/etw_reader/parser.rs:322-346 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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 (25 lines × 2) etw-reader/src/parser.rs:547 — etw-reader/src/parser.rs:547-571 | samply/src/windows/etw_reader/parser.rs:547-571 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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 (25 lines × 2) etw-reader/src/schema.rs:191 — etw-reader/src/schema.rs:191-215 | samply/src/windows/etw_reader/schema.rs:191-215 — before extracting anything, compare `etw-reader/src/schema.rs` and `samply/src/windows/etw_reader/schema.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) etw-reader/src/lib.rs:321 — etw-reader/src/lib.rs:321-335 | samply/src/windows/etw_reader/mod.rs:321-335 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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 (15 lines × 2) etw-reader/src/parser.rs:528 — etw-reader/src/parser.rs:528-542 | samply/src/windows/etw_reader/parser.rs:528-542 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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 (15 lines × 2) samply/src/linux_shared/converter.rs:1390 — samply/src/linux_shared/converter.rs:1390-1404 | samply/src/linux_shared/converter.rs:1557-1571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) samply/src/windows/profile_context.rs:909 — samply/src/windows/profile_context.rs:909-923 | samply/src/windows/profile_context.rs:977-991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D17 · Explicit Debt · FixmeComment · ×3
  • FixmeComment etw-reader/src/lib.rs:284 — // Fixme: EVENT_CONTROL_CODE_ENABLE_PROVIDER — 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.
  • FixmeComment samply/src/windows/etw_reader/mod.rs:284 — // Fixme: EVENT_CONTROL_CODE_ENABLE_PROVIDER — 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.
  • FixmeComment samply/src/mac/mach_ipc.rs:236 — // FIXME(pcwalton): Does this leak? — 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.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) etw-reader/src/lib.rs:403 — etw-reader/src/lib.rs:403-420 | samply/src/windows/etw_reader/mod.rs:403-420 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) etw-reader/src/parser.rs:420 — etw-reader/src/parser.rs:420-437 | samply/src/windows/etw_reader/parser.rs:420-437 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (18 lines × 2) samply/src/linux/profiler.rs:637 — samply/src/linux/profiler.rs:637-654 | samply/src/linux/profiler.rs:658-675 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) samply-mac-preload/src/mach_ipc.rs:397 — samply-mac-preload/src/mach_ipc.rs:397-407 | samply/src/mac/mach_ipc.rs:422-432 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) samply-mac-preload/src/mach_ipc.rs:264 — samply-mac-preload/src/mach_ipc.rs:264-274 | samply/src/mac/mach_ipc.rs:603-613 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) samply/src/linux_shared/process.rs:336 — samply/src/linux_shared/process.rs:336-346 | samply/src/windows/profile_context.rs:347-357 — 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.
D1 · Cyclomatic Complexity · Converter · ×2
  • Converter::add_module_to_process (cyclomatic 24) samply/src/linux_shared/converter.rs:1317 — Converter::add_module_to_process 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.
  • Converter::get_sample_stack (cyclomatic 17) samply/src/linux_shared/converter.rs:616 — Converter::get_sample_stack has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser · ×2
  • Parser::find_property_size (cyclomatic 16) etw-reader/src/parser.rs:175 — Parser::find_property_size 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.
  • Parser::find_property_size (cyclomatic 16) samply/src/windows/etw_reader/parser.rs:175 — Parser::find_property_size 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.
D2 · Cognitive Complexity · FileResolver · ×2
  • FileResolver::get_candidate_paths_for_debug_file (cognitive 66) wholesym/src/file_resolver.rs:481 — FileResolver::get_candidate_paths_for_debug_file has cognitive complexity 66 (threshold 15). Drivers by points: if/else 28 (52 pts), loops 4 (10 pts), boolean chains 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • FileResolver::get_candidate_paths_for_binary (cognitive 20) wholesym/src/file_resolver.rs:735 — FileResolver::get_candidate_paths_for_binary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (7 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.
D2 · Cognitive Complexity · etw_reader · ×2
  • etw_reader::write_property (cognitive 37) etw-reader/src/lib.rs:337 — etw_reader::write_property has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 4 (9 pts), loops 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • etw_reader::enumerate_trace_guids_ex (cognitive 18) etw-reader/src/lib.rs:530 — etw_reader::enumerate_trace_guids_ex has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (8 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TaskProfiler · ×2
  • TaskProfiler::sample_impl (cognitive 29) samply/src/mac/task_profiler.rs:348 — TaskProfiler::sample_impl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2, match/switch 1 (2 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.
  • TaskProfiler::new (cognitive 26) samply/src/mac/task_profiler.rs:123 — TaskProfiler::new has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 3 (5 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.
D2 · Cognitive Complexity · samply_symbols · ×2
  • samply_symbols::elf::compute_function_addresses_elf (cognitive 29) samply-symbols/src/elf.rs:393 — samply_symbols::elf::compute_function_addresses_elf has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 4 (5 pts), loops 1 (nesting depth added 16). Of this number, 28 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • samply_symbols::demangle_ocaml::demangle (cognitive 16) samply-symbols/src/demangle_ocaml.rs:1 — samply_symbols::demangle_ocaml::demangle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 2, loops 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.
D2 · Cognitive Complexity · ObjectSymbolMapInner · ×2
  • ObjectSymbolMapInner::try_lookup_external_impl (cognitive 28) samply-symbols/src/symbol_map_object.rs:685 — ObjectSymbolMapInner::try_lookup_external_impl has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 4 (12 pts), loops 1 (2 pts) (nesting depth added 17). 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.
  • ObjectSymbolMapInner::lookup_sync (cognitive 18) samply-symbols/src/symbol_map_object.rs:825 — ObjectSymbolMapInner::lookup_sync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TraceEventInfoRaw · ×2
  • TraceEventInfoRaw::property_map_info (cognitive 19) etw-reader/src/etw_types.rs:146 — TraceEventInfoRaw::property_map_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TraceEventInfoRaw::property_map_info (cognitive 19) samply/src/windows/etw_reader/etw_types.rs:146 — TraceEventInfoRaw::property_map_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · wholesym · ×2
  • wholesym::load_helpers::load_binary_for_library_info (cognitive 18) wholesym/src/load_helpers.rs:83 — wholesym::load_helpers::load_binary_for_library_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 3 (6 pts), boolean chains 2, 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.
  • wholesym::downloader::consume_stream_and_write_to_file (cognitive 16) wholesym/src/downloader.rs:504 — wholesym::downloader::consume_stream_and_write_to_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: Profile fxprof-processed-profile/src/profile.rs:211 — TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ProfileContext samply/src/windows/profile_context.rs:440 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (14 members, 50+ identical tokens) etw-reader/src/custom_schemas.rs:173 — etw-reader/src/custom_schemas.rs:173-186 | etw-reader/src/custom_schemas.rs:284-297 | etw-reader/src/custom_schemas.rs:510-523 | etw-reader/src/custom_schemas.rs:664-677 | etw-reader/src/custom_schemas.rs:758-771 | etw-reader/src/custom_schemas.rs:817-830 | etw-reader/src/custom_schemas.rs:876-889 | samply/src/windows/etw_reader/custom_schemas.rs:173-186 | samply/src/windows/etw_reader/custom_schemas.rs:284-297 | samply/src/windows/etw_reader/custom_schemas.rs:510-523 | samply/src/windows/etw_reader/custom_schemas.rs:664-677 | samply/src/windows/etw_reader/custom_schemas.rs:758-771 | samply/src/windows/etw_reader/custom_schemas.rs:817-830 | samply/src/windows/etw_reader/custom_schemas.rs:876-889 — These 14 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 14 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 14 times.
  • Members sharing a duplicated core (14 members, 50+ identical tokens) samply-mac-preload/src/mach_sys.rs:400 — samply-mac-preload/src/mach_sys.rs:400-415 | samply-mac-preload/src/mach_sys.rs:542-553 | samply-mac-preload/src/mach_sys.rs:603-618 | samply-mac-preload/src/mach_sys.rs:680-699 | samply-mac-preload/src/mach_sys.rs:761-780 | samply-mac-preload/src/mach_sys.rs:842-861 | samply-mac-preload/src/mach_sys.rs:923-942 | samply-mac-preload/src/mach_sys.rs:1004-1023 | samply-mac-preload/src/mach_sys.rs:1085-1104 | samply-mac-preload/src/mach_sys.rs:1154-1169 | samply-mac-preload/src/mach_sys.rs:1219-1234 | samply-mac-preload/src/mach_sys.rs:1284-1299 | samply-mac-preload/src/mach_sys.rs:2428-2451 | samply-mac-preload/src/mach_sys.rs:2501-2517 — These 14 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 14 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 14 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) etw-reader/src/custom_schemas.rs:86 — etw-reader/src/custom_schemas.rs:86-99 | etw-reader/src/custom_schemas.rs:421-434 | samply/src/windows/etw_reader/custom_schemas.rs:86-99 | samply/src/windows/etw_reader/custom_schemas.rs:421-434 — 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) samply/src/linux_shared/converter.rs:247 — samply/src/linux_shared/converter.rs:247-382 | samply/src/linux_shared/converter.rs:387-453 | samply/src/linux_shared/converter.rs:458-540 | samply/src/linux_shared/converter.rs:546-595 — 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 · Duplicated block (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) etw-reader/src/parser.rs:293 — etw-reader/src/parser.rs:293-316 | samply/src/windows/etw_reader/parser.rs:293-316 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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 (24 lines × 2) samply/src/windows/profile_context.rs:884 — samply/src/windows/profile_context.rs:884-907 | samply/src/windows/profile_context.rs:938-961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) etw-reader/src/lib.rs:459 — etw-reader/src/lib.rs:459-480 | samply/src/windows/etw_reader/mod.rs:459-480 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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 (22 lines × 2) etw-reader/src/tdh.rs:25 — etw-reader/src/tdh.rs:25-46 | samply/src/windows/etw_reader/tdh.rs:25-46 — before extracting anything, compare `etw-reader/src/tdh.rs` and `samply/src/windows/etw_reader/tdh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 100 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) etw-reader/src/sddl.rs:34 — etw-reader/src/sddl.rs:34-53 | samply/src/windows/etw_reader/sddl.rs:34-53 — 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 (20 lines × 2) etw-reader/src/tdh.rs:49 — etw-reader/src/tdh.rs:49-68 | samply/src/windows/etw_reader/tdh.rs:49-68 — before extracting anything, compare `etw-reader/src/tdh.rs` and `samply/src/windows/etw_reader/tdh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 100 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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) etw-reader/src/parser.rs:506 — etw-reader/src/parser.rs:506-524 | samply/src/windows/etw_reader/parser.rs:506-524 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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 (19 lines × 2) etw-reader/src/utils.rs:14 — etw-reader/src/utils.rs:14-32 | samply/src/windows/etw_reader/utils.rs:14-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) etw-reader/src/etw_types.rs:214 — etw-reader/src/etw_types.rs:214-229 | samply/src/windows/etw_reader/etw_types.rs:214-229 — before extracting anything, compare `etw-reader/src/etw_types.rs` and `samply/src/windows/etw_reader/etw_types.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 77 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 (16 lines × 2) etw-reader/src/lib.rs:130 — etw-reader/src/lib.rs:130-145 | samply/src/windows/etw_reader/mod.rs:130-145 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: samply-quota-manager — samply-quota-manager: 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: fxprof-processed-profile — fxprof-processed-profile: abstractness 0.09, instability 0.00, distance 0.91 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · FileResolver · ×1
  • FileResolver::get_candidate_paths_for_debug_file (cyclomatic 37) wholesym/src/file_resolver.rs:481 — FileResolver::get_candidate_paths_for_debug_file 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.
D1 · Cyclomatic Complexity · etw_reader · ×1
  • etw_reader::write_property (cyclomatic 32) etw-reader/src/lib.rs:337 — etw_reader::write_property has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · wholesym_addr2line · ×1
  • wholesym_addr2line::main (cyclomatic 28) wholesym-addr2line/src/main.rs:67 — wholesym_addr2line::main 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.
D1 · Cyclomatic Complexity · Sampler · ×1
  • Sampler::run (cyclomatic 20) samply/src/mac/sampler.rs:61 — Sampler::run 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.
D1 · Cyclomatic Complexity · PerfBuilder · ×1
  • PerfBuilder::open (cyclomatic 18) samply/src/linux/perf_event.rs:230 — PerfBuilder::open has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SymbolList · ×1
  • SymbolList::new (cyclomatic 16) samply-symbols/src/symbol_map_object.rs:194 — SymbolList::new has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: samply-symbols/src/symbol_map_object.rs samply-symbols/src/symbol_map_object.rs:194 — samply-symbols/src/symbol_map_object.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SymbolList::new at line 194. 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-06-24..2026-09-22, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-06-24 16:24:55 -04:00' --until='2026-09-22 16:24:55 -04:00' --full-history --no-merges -- samply-symbols/src/symbol_map_object.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.
D17 · Explicit Debt · HackComment · ×1
  • HackComment samply/src/windows/xperf.rs:96 — // hack argument lets things still continue to run for development of samply. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · wholesym_addr2line · ×1
  • wholesym_addr2line::main (cognitive 99) wholesym-addr2line/src/main.rs:67 — wholesym_addr2line::main has cognitive complexity 99 (threshold 15). Drivers by points: if/else 33 (91 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 62). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Sampler · ×1
  • Sampler::run (cognitive 42) samply/src/mac/sampler.rs:61 — Sampler::run has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (7 pts), match/switch 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JitCategoryManager · ×1
  • JitCategoryManager::classify_jit_symbol (cognitive 23) samply/src/shared/jit_category_manager.rs:284 — JitCategoryManager::classify_jit_symbol has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 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.
D2 · Cognitive Complexity · PerfGroup · ×1
  • PerfGroup::consume_events (cognitive 22) samply/src/linux/perf_group.rs:224 — PerfGroup::consume_events has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 5 (10 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.
D2 · Cognitive Complexity · ResponseFrame · ×1
  • ResponseFrame::serialize (cognitive 21) samply-api/src/symbolicate/response_json.rs:205 — ResponseFrame::serialize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (21 pts) (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ElfLoad · ×1
  • ElfLoad::provide (cognitive 20) samply-symbols/src/elf.rs:628 — ElfLoad::provide has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (8 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.
D2 · Cognitive Complexity · SingleJitDumpProcessor · ×1
  • SingleJitDumpProcessor::process_pending_records (cognitive 19) samply/src/shared/jitdump_manager.rs:143 — SingleJitDumpProcessor::process_pending_records has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 2 (4 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.
D2 · Cognitive Complexity · FatArchiveMember · ×1
  • FatArchiveMember::match_score_for_disambiguator (cognitive 19) samply-symbols/src/macho.rs:134 — FatArchiveMember::match_score_for_disambiguator has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (7 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.
D2 · Cognitive Complexity · PerfBuilder · ×1
  • PerfBuilder::open (cognitive 18) samply/src/linux/perf_event.rs:230 — PerfBuilder::open has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ProfileContext · ×1
  • ProfileContext::handle_cswitch (cognitive 18) samply/src/windows/profile_context.rs:1569 — ProfileContext::handle_cswitch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 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.
D2 · Cognitive Complexity · QuotaManager · ×1
  • QuotaManager::list_existing_files_sync (cognitive 17) samply-quota-manager/src/quota_manager.rs:139 — QuotaManager::list_existing_files_sync has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 2 (6 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · AsyncGzipDecoder · ×1
  • AsyncGzipDecoder::poll_read (cognitive 17) wholesym/src/async_gzip_decoder.rs:53 — AsyncGzipDecoder::poll_read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameInterner · ×1
  • FrameInterner::create_tables (cognitive 16) fxprof-processed-profile/src/frame_table.rs:102 — FrameInterner::create_tables has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · SimpleperfSymbolTables · ×1
  • SimpleperfSymbolTables::new (cognitive 16) samply/src/linux_shared/converter.rs:1736 — SimpleperfSymbolTables::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (2 pts), boolean chains 1, 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.
D22 · Internal API Consistency · Inconsistent naming for property retrieval/access. `TraceEventInfoRaw` exposes a raw pointer accessor with a generic name `info_as_ptr`, while the `Parser` component uses `find_property` to locate specific data. More critically, `TypedEvent` and `EventSchema` both expose `property(index · ×1
  • Inconsistent naming for property retrieval/access. `TraceEventInfoRaw` exposes a raw pointer accessor with a generic name `info_as_ptr`, while the `Parser` component uses `find_property` to locate specific data. More critically, `TypedEvent` and `EventSchema` both expose `property(index: u32): Property`, but `Parser` uses `find_property(name: str)`. This forces consumers to use different methods (`find_property` vs `property`) depending on whether they are using the low-level `Parser` or the higher-level `TypedEvent`/`EventSchema` abstractions, despite both ultimately accessing event properties. — Unify property access. Either expose `property(index)` on `Parser` for consistency with `TypedEvent`, or expose `find_property(name)` on `TypedEvent`/`EventSchema` for consistency with `Parser`. Given `TypedEvent` is the primary user-facing type, `Parser` should likely support index-based access or be deprecated in favor of `TypedEvent`. (signatures: etw_reader.etw_types.TraceEventInfoRaw.info_as_ptr(): *mut u8 | etw_reader.parser.Parser.find_property(name: str): ParserResult)
D22 · Internal API Consistency · Redundant API surface for schema registration. `SchemaLocator` has an instance method `add_custom_schema`, but the module-level function `etw_reader.add_custom_schemas` takes a `SchemaLocator` as an argument. It is unclear if the module function performs a different operation (e.g., global registration) or if it is a redundant wrapper. If it just calls the instance method, the module function is unnecessary noise. If it does something else, the naming is ambiguous. · ×1
  • Redundant API surface for schema registration. `SchemaLocator` has an instance method `add_custom_schema`, but the module-level function `etw_reader.add_custom_schemas` takes a `SchemaLocator` as an argument. It is unclear if the module function performs a different operation (e.g., global registration) or if it is a redundant wrapper. If it just calls the instance method, the module function is unnecessary noise. If it does something else, the naming is ambiguous. — Remove the module-level `add_custom_schemas` if it merely delegates to the instance method, or rename it to clearly indicate a global scope (e.g., `register_global_custom_schemas`) if that is the intent. (signatures: etw_reader.schema.SchemaLocator.add_custom_schema(schema: Box) | etw_reader.add_custom_schemas(locator: SchemaLocator))
D22 · Internal API Consistency · Inconsistent naming for handle creation. The `Profile` type uses `handle_for_` prefix for creating handles for categories, strings, frames, etc. However, `InternalCategory` uses `index_for_subcategory`. This mixes 'handle' and 'index' terminology for similar concepts (identifiers/lookups) within the same domain. Additionally, `handle_for_frame_with_label` and `handle_for_frame_with_address` are distinct methods for similar intents (getting a frame handle), which is acceptable, but the lack of a unified `handle_for_frame` with a discriminator or enum argument increases API complexity. · ×1
  • Inconsistent naming for handle creation. The `Profile` type uses `handle_for_` prefix for creating handles for categories, strings, frames, etc. However, `InternalCategory` uses `index_for_subcategory`. This mixes 'handle' and 'index' terminology for similar concepts (identifiers/lookups) within the same domain. Additionally, `handle_for_frame_with_label` and `handle_for_frame_with_address` are distinct methods for similar intents (getting a frame handle), which is acceptable, but the lack of a unified `handle_for_frame` with a discriminator or enum argument increases API complexity. — Standardize on `handle_for_` for all handle creation methods. Rename `index_for_subcategory` to `handle_for_subcategory` or `sub_category_handle` to match the `Profile` API. Consider consolidating frame handle creation into a single method with a `FrameSource` enum argument. (signatures: fxprof_processed_profile.profile.Profile.handle_for_category(category: Category): CategoryHandle | fxprof_processed_profile.profile.Profile.handle_for_subcategory(category_handle: CategoryHandle, subcategory_name: str): SubcategoryHandle | fxprof_processed_profile.profile.Profile.handle_for_string(s: str): StringHandle | fxprof_processed_profile.profile.Profile.handle_for_frame_with_label(...) | fxprof_processed_profile.profile.Profile.handle_for_frame_with_address(...))
D22 · Internal API Consistency · Confusing separation of concerns between `Api.build_query` and the specific `*ApiQueryState` constructors. `Api.build_query` takes a URL and JSON, while the specific query states (Source, Symbolicate) have `from_request_json` constructors. It is unclear how `Api.build_query` relates to these specific states. If `Api.build_query` is a factory, it should return the appropriate `ApiQueryState` or a generic builder. The existence of multiple `from_request_json` methods on different types suggests a lack of a unified entry point for query processing. · ×1
  • Confusing separation of concerns between `Api.build_query` and the specific `*ApiQueryState` constructors. `Api.build_query` takes a URL and JSON, while the specific query states (Source, Symbolicate) have `from_request_json` constructors. It is unclear how `Api.build_query` relates to these specific states. If `Api.build_query` is a factory, it should return the appropriate `ApiQueryState` or a generic builder. The existence of multiple `from_request_json` methods on different types suggests a lack of a unified entry point for query processing. — Introduce a unified `QueryBuilder` or `Api::create_query` method that returns a generic `ApiQueryState` or a specific typed state based on the request content, removing the need for users to manually instantiate `SourceApiQueryState` or `SymbolicateApiQueryState` directly. (signatures: samply_api.Api.build_query(request_url: str, request_json_data: str): Result | samply_api.query_state.ApiQueryState.from_request_json(request_json: str): Result | samply_api.source.SourceApiQueryState.from_request_json(request_json: str): Result | samply_api.symbolicate.SymbolicateApiQueryState.from_request_json(request_json: str): Result)
D30 · Dependency Vulnerabilities · Medium vulnerability · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: converter.rs → process.rs, jit_function_add_marker.rs, stack_converter.rs samply/src/linux_shared/converter.rs — `samply/src/linux_shared/converter.rs` changes together with 3 other files — `samply/src/linux_shared/process.rs`, `samply/src/shared/jit_function_add_marker.rs`, `samply/src/shared/stack_converter.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 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 3.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (103 shared lines) · ×1
  • Near-duplicate member pair (103 shared lines) etw-reader/src/lib.rs:342 — etw-reader/src/lib.rs:342-483 | samply/src/windows/etw_reader/mod.rs:342-483 — These two members are variants of one another: 103 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (67 shared lines) · ×1
  • Near-duplicate member pair (67 shared lines) etw-reader/src/lib.rs:234 — etw-reader/src/lib.rs:234-314 | samply/src/windows/etw_reader/mod.rs:234-314 — These two members are variants of one another: 67 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (53 shared lines) · ×1
  • Near-duplicate member pair (53 shared lines) etw-reader/src/lib.rs:530 — etw-reader/src/lib.rs:530-586 | samply/src/windows/etw_reader/mod.rs:530-586 — These two members are variants of one another: 53 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) samply-mac-preload/src/mach_sys.rs:1868 — samply-mac-preload/src/mach_sys.rs:1868-1903 | samply-mac-preload/src/mach_sys.rs:2085-2144 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) etw-reader/src/parser.rs:505 — etw-reader/src/parser.rs:505-542 | samply/src/windows/etw_reader/parser.rs:505-542 — 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 · Duplicated block (58 lines × 2) · ×1
  • Duplicated block (58 lines × 2) etw-reader/src/tdh.rs:71 — etw-reader/src/tdh.rs:71-128 | samply/src/windows/etw_reader/tdh.rs:71-128 — before extracting anything, compare `etw-reader/src/tdh.rs` and `samply/src/windows/etw_reader/tdh.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 100 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.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) etw-reader/src/parser.rs:176 — etw-reader/src/parser.rs:176-226 | samply/src/windows/etw_reader/parser.rs:176-226 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) etw-reader/src/lib.rs:343 — etw-reader/src/lib.rs:343-388 | samply/src/windows/etw_reader/mod.rs:343-388 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (40–44 lines × 2) · ×1
  • Duplicated block (40–44 lines × 2) samply/src/shared/context_switch.rs:91 — samply/src/shared/context_switch.rs:91-134 | samply/src/shared/context_switch.rs:141-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) samply-mac-preload/src/mach_ipc.rs:561 — samply-mac-preload/src/mach_ipc.rs:561-603 | samply/src/mac/mach_ipc.rs:885-927 — before extracting anything, compare `samply-mac-preload/src/mach_ipc.rs` and `samply/src/mac/mach_ipc.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 101 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.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) etw-reader/src/tdh_types.rs:74 — etw-reader/src/tdh_types.rs:74-115 | samply/src/windows/etw_reader/tdh_types.rs:74-115 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) etw-reader/src/lib.rs:260 — etw-reader/src/lib.rs:260-296 | samply/src/windows/etw_reader/mod.rs:260-296 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) etw-reader/src/schema.rs:69 — etw-reader/src/schema.rs:69-102 | samply/src/windows/etw_reader/schema.rs:69-102 — before extracting anything, compare `etw-reader/src/schema.rs` and `samply/src/windows/etw_reader/schema.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 78 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.
D4 · Code Duplication · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) etw-reader/src/lib.rs:554 — etw-reader/src/lib.rs:554-586 | samply/src/windows/etw_reader/mod.rs:554-586 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) etw-reader/src/parser.rs:385 — etw-reader/src/parser.rs:385-415 | samply/src/windows/etw_reader/parser.rs:385-415 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) etw-reader/src/parser.rs:234 — etw-reader/src/parser.rs:234-262 | samply/src/windows/etw_reader/parser.rs:234-262 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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.
D4 · Code Duplication · Duplicated block (22–25 lines × 2) · ×1
  • Duplicated block (22–25 lines × 2) samply/src/main.rs:88 — samply/src/main.rs:88-109 | samply/src/main.rs:130-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) etw-reader/src/lib.rs:589 — etw-reader/src/lib.rs:589-611 | samply/src/windows/etw_reader/mod.rs:589-611 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) etw-reader/src/parser.rs:481 — etw-reader/src/parser.rs:481-501 | samply/src/windows/etw_reader/parser.rs:481-501 — before extracting anything, compare `etw-reader/src/parser.rs` and `samply/src/windows/etw_reader/parser.rs` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 325 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.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) samply/src/windows/profile_context.rs:754 — samply/src/windows/profile_context.rs:754-772 | samply/src/windows/profile_context.rs:822-841 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) etw-reader/src/lib.rs:236 — etw-reader/src/lib.rs:236-252 | samply/src/windows/etw_reader/mod.rs:236-252 — before extracting anything, compare `etw-reader/src/lib.rs` and `samply/src/windows/etw_reader/mod.rs` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 346 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.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) samply/src/linux_shared/converter.rs:393 — samply/src/linux_shared/converter.rs:393-408 | samply/src/linux_shared/converter.rs:505-517 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) samply/src/linux_shared/converter.rs:262 — samply/src/linux_shared/converter.rs:262-276 | samply/src/linux_shared/converter.rs:391-405 | samply/src/linux_shared/converter.rs:503-517 | samply/src/linux_shared/converter.rs:554-568 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) etw-reader/src/property.rs:38 — etw-reader/src/property.rs:38-51 | samply/src/windows/etw_reader/property.rs:38-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) samply/src/linux_shared/converter.rs:886 — samply/src/linux_shared/converter.rs:886-898 | samply/src/windows/profile_context.rs:1631-1644 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (12 lines × 14) · ×1
  • Duplicated block (12 lines × 14) etw-reader/src/custom_schemas.rs:175 — etw-reader/src/custom_schemas.rs:175-186 | etw-reader/src/custom_schemas.rs:286-297 | etw-reader/src/custom_schemas.rs:512-523 | etw-reader/src/custom_schemas.rs:666-677 | etw-reader/src/custom_schemas.rs:760-771 | etw-reader/src/custom_schemas.rs:819-830 | etw-reader/src/custom_schemas.rs:878-889 | samply/src/windows/etw_reader/custom_schemas.rs:175-186 | samply/src/windows/etw_reader/custom_schemas.rs:286-297 | samply/src/windows/etw_reader/custom_schemas.rs:512-523 | samply/src/windows/etw_reader/custom_schemas.rs:666-677 | samply/src/windows/etw_reader/custom_schemas.rs:760-771 | samply/src/windows/etw_reader/custom_schemas.rs:819-830 | samply/src/windows/etw_reader/custom_schemas.rs:878-889 — there are 14 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 14 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) etw-reader/src/custom_schemas.rs:88 — etw-reader/src/custom_schemas.rs:88-99 | etw-reader/src/custom_schemas.rs:423-434 | samply/src/windows/etw_reader/custom_schemas.rs:88-99 | samply/src/windows/etw_reader/custom_schemas.rs:423-434 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) samply/src/shared/per_cpu.rs:46 — samply/src/shared/per_cpu.rs:46-57 | samply/src/shared/per_cpu.rs:73-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) wholesym/src/file_resolver.rs:1220 — wholesym/src/file_resolver.rs:1220-1230 | wholesym/src/file_resolver.rs:1240-1250 | wholesym/src/file_resolver.rs:1255-1265 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 14) · ×1
  • Duplicated block (9–10 lines × 14) samply-mac-preload/src/mach_sys.rs:401 — samply-mac-preload/src/mach_sys.rs:401-409 | samply-mac-preload/src/mach_sys.rs:543-552 | samply-mac-preload/src/mach_sys.rs:604-612 | samply-mac-preload/src/mach_sys.rs:681-689 | samply-mac-preload/src/mach_sys.rs:762-770 | samply-mac-preload/src/mach_sys.rs:843-851 | samply-mac-preload/src/mach_sys.rs:924-932 | samply-mac-preload/src/mach_sys.rs:1005-1013 | samply-mac-preload/src/mach_sys.rs:1086-1094 | samply-mac-preload/src/mach_sys.rs:1155-1163 | samply-mac-preload/src/mach_sys.rs:1220-1228 | samply-mac-preload/src/mach_sys.rs:1285-1293 | samply-mac-preload/src/mach_sys.rs:2429-2437 | samply-mac-preload/src/mach_sys.rs:2502-2511 — all 14 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) wholesym/src/file_resolver.rs:651 — wholesym/src/file_resolver.rs:651-660 | wholesym/src/file_resolver.rs:766-774 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 14) · ×1
  • Duplicated block (9 lines × 14) samply-mac-preload/src/mach_sys.rs:407 — samply-mac-preload/src/mach_sys.rs:407-415 | samply-mac-preload/src/mach_sys.rs:545-553 | samply-mac-preload/src/mach_sys.rs:610-618 | samply-mac-preload/src/mach_sys.rs:691-699 | samply-mac-preload/src/mach_sys.rs:772-780 | samply-mac-preload/src/mach_sys.rs:853-861 | samply-mac-preload/src/mach_sys.rs:934-942 | samply-mac-preload/src/mach_sys.rs:1015-1023 | samply-mac-preload/src/mach_sys.rs:1096-1104 | samply-mac-preload/src/mach_sys.rs:1161-1169 | samply-mac-preload/src/mach_sys.rs:1226-1234 | samply-mac-preload/src/mach_sys.rs:1291-1299 | samply-mac-preload/src/mach_sys.rs:2443-2451 | samply-mac-preload/src/mach_sys.rs:2508-2517 — all 14 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) samply/src/mac/task_profiler.rs:432 — samply/src/mac/task_profiler.rs:432-439 | samply/src/mac/task_profiler.rs:622-630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) wholesym/src/file_resolver.rs:1064 — wholesym/src/file_resolver.rs:1064-1071 | wholesym/src/file_resolver.rs:1081-1088 | wholesym/src/file_resolver.rs:1115-1122 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) samply/src/linux_shared/process_threads.rs:210 — samply/src/linux_shared/process_threads.rs:210-216 | samply/src/mac/task_profiler.rs:786-792 | samply/src/windows/profile_context.rs:2204-2210 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) samply-symbols/src/symbol_map_object.rs:911 — samply-symbols/src/symbol_map_object.rs:911-915 | samply-symbols/src/symbol_map_object.rs:917-921 | samply-symbols/src/windows.rs:320-324 | samply-symbols/src/windows.rs:326-330 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) samply/src/mac/process_launcher.rs:207 — samply/src/mac/process_launcher.rs:207-211 | samply/src/mac/process_launcher.rs:215-219 | samply/src/mac/process_launcher.rs:223-227 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: SymbolManagerConfig (LCOM4 13) wholesym/src/config.rs:11 — SymbolManagerConfig's methods fall into 13 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 13 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.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 103 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Minor — 12 finding(s)
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Split samply · ×1
  • Split samply — Catch-all name that is huge (23k LoC) and sprawls across nine namespaces. Suggested: split into domain-specific libraries for each of the nine namespaces
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 5 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: samply/src/windows/winutils.rs, etw-reader/src/tdh_types.rs, etw-reader/src/tdh.rs, samply-debugid/src/debugid.rs, etw-reader/src/utils.rs (6 orphaned of 162 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 162 of the 229 production source files in this repository met that bar). 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `wholesym-addr2line`.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
X10 · Duplicated predicate · Duplicated predicate · ×1
  • Duplicated predicate wholesym/src/file_resolver.rs:670 — `path.starts_with("/usr/") || path.starts_with("/System/")` appears character-identically in 2 files — wholesym/src/file_resolver.rs, wholesym/src/symbol_manager.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.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err wholesym/src/file_resolver.rs:711 — `get_candidate_paths_for_gnu_debug_link_dest` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-1ff022f2922f45a4b977002d338963f8/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-1ff022f2922f45a4b977002d338963f8/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .32artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive .2artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive .0artifacts/raw/osv-scanner.json

Run 01a0f297-805a-77ec-bf33-5edfbb26da29 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md