Public report — rustrade, published 30 Jul 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 30-07-2026 @ 01:10 UTC Public
Code Health Audit

Zuytan/rustrade

68% Strong
CriticalWeakAdequateStrongExemplary
upper third — near Strong

Medium · 46,882 LoC · rebuild ~0.6 person-years · weakest lens: Readiness (60%)

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

27/28dimensions tool-verifieddeterministic · confidence 1.0 · 1 LLM-assisted, advisory
154findings with an exact file:lineof 160 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
28/101dimensions across the health lenses46882 LoC — wide & deep

Executive summary

Read through the Template lens: this is a template / kata / sample / demo — code meant to be read or copied, not operated. The ship-it and operate-it dimensions (CI/CD, observability, ADRs, architecture docs, deployment security) are N/A, and the colour bands on what remains are relaxed to what an example needs. Code correctness stays near-strict; the score is absolute and comparable across repos.

Zuytan/rustrade is in good health (68%). It can be evolved and depended on with normal engineering discipline; the items below are improvements, not blockers.

It is strongest in Domain Modelling (100%) — the domain model is expressive and well-guarded. Event Sourcing (100%) is solid too.

The area that most needs attention is Readiness (60%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade.

Leadership focus, highest impact first: Keep a changelog (e.g. Keep-a-Changelog) recording what shipped… (Release Hygiene); explicit build/compile step to your CI pipeline (whatever your… (CI/CD gates); 18 High finding(s) (Static Analysis (SAST)).

For scale: Medium (~46,882 production lines); rebuilding it from scratch would take roughly ~0.6 person-years (~1–2 engineers). Approximate, ±~30%.

Encouragingly, the gaps are in documentation and release process — not in the code's correctness, structure or security, which are strong. They're low-risk to close, and doing so would lift the grade without re-engineering anything that already works.

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.
Readiness 60% · 45% weightSecurity 71% · 25% weightCode Health 71% · 14% weightMaturity 78% · 8% weightEvent-Driven 80% · 4% weightArchitecture 95% · 2% weightDomain Modelling 100% · 1% weightEvent Sourcing 100% · 1% weight

Raise Readiness 60 → 70 (the Healthy floor) ⇒ headline 68 → ~73.

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

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

  • D3 · FileTooLong: dashboard_components/architecture_view.rs src/interfaces/dashboard_components/architecture_view.rs
  • D15 · Hotspot: src/application/strategies/snn_surrogate_strategy.rs src/application/strategies/snn_surrogate_strategy.rs
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D29 · High: github-actions-mutable-action-tag .github/workflows/ci.yml
  • D35 · Change coupling: analyst.rs ↔ websocket.rs src/application/agents/analyst.rs
  • D35 · Change coupling: database.rs ↔ mod.rs src/infrastructure/persistence/database.rs
  • D35 · Change coupling: risk_manager.rs ↔ database.rs src/application/risk_management/core/risk_manager.rs
  • D35 · Change coupling: metrics.rs ↔ portfolio.rs src/domain/performance/metrics.rs
  • D35 · Change coupling: scanner.rs ↔ mod.rs src/application/agents/scanner.rs
  • D35 · Change coupling: mod.rs ↔ database.rs src/application/system/mod.rs
  • D38 · High CVE: [GHSA redacted] Cargo.lock
  • D38 · Medium advisory (unsound): RUSTSEC-2026-0190 Cargo.lock
  • D38 · Medium advisory (unsound): RUSTSEC-2026-0186 Cargo.lock
  • D38 · Medium advisory (unmaintained): RUSTSEC-2026-0192 Cargo.lock
  • D38 · Medium vulnerability: RUSTSEC-2026-0204 Cargo.lock
  • D38 · Medium CVE: PYSEC-2025-148 scripts/ml/requirements.txt
  • D38 · Medium vulnerability: RUSTSEC-2026-0194 Cargo.lock
  • D38 · Medium CVE: [GHSA redacted] scripts/ml/requirements.txt

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 — €30,000–€150,000
Cost to rebuild€30,000–€150,000 (0.3–0.9 person-years (497–1,578 h), ~1–2 engineers)
Domain complexityHigh — harder problems cost more per line
Quality factor1.0× (at 68% 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 ~€90,000 to rebuild). Its weakest lens is Readiness at 60% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.4) — DDD/clean architecture, domain model × a 1.0× 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
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
+6.8 pts · Medium effort · Release Hygiene
2
Add an explicit build/compile step to your CI pipeline (whatever your stack uses — e.g. dotnet build, npm run build, go build, mvn package, swift build/xcodebuild) so every change is compiled before merge.
+6.1 pts · Medium effort · CI/CD gates
3
Resolve the 18 High finding(s) in Static Analysis (SAST) — start with ci.yml (18).
+1.7 pts · Medium effort · Static Analysis (SAST)

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 Readiness at 60%. 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 (46,882 LoC) · weakest lens: Readiness 60%
→ Direct remediation budget at Readiness 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: Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 4–10% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2 complexity, D4 duplication, D6 cohesion: averaging 6.2/10 across the code-quality signals
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

At a glance — Code Health · 71% · Adequate · gated by D2

At a glance — Architecture · 95% · Exemplary

At a glance — Maturity · 78% · Exemplary

At a glance — Readiness · 60% · Strong

At a glance — Security · 71% · Adequate · gated by D29

At a glance — Domain Modelling · 100% · Exemplary

At a glance — Event-Driven · 80% · Exemplary

At a glance — Event Sourcing · 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 — Injection18High / Critical
A06:2021 — Vulnerable & Outdated Components8High / Critical

Roadmap

Begin by maintaining a changelog to clearly record what ships in each release. Next, enforce a build step in your CI pipeline to ensure every change compiles before merging. Then, address the 18 high-priority static analysis findings to improve code quality. After that, start logging significant architectural decisions in an ADR log to preserve rationale. Finally, adopt the transactional outbox pattern to ensure database writes and message publishing remain consistent and reliable.

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

Do thisHelpsEffortDimension
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+6.8 ptsMediumRelease Hygiene
Add an explicit build/compile step to your CI pipeline (whatever your stack uses — e.g. dotnet build, npm run build, go build, mvn package, swift build/xcodebuild) so every change is compiled before merge.+6.1 ptsMediumCI/CD gates
Resolve the 18 High finding(s) in Static Analysis (SAST) — start with ci.yml (18).+1.7 ptsMediumStatic Analysis (SAST)
Resolve the 1 High CVE finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock.+0.7 ptsLowOSV Dependency Vulnerabilities
Start an ADR log (docs/adr/) recording significant decisions and their rationale.+0.9 ptsMediumArchitecture documentation
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.+0.8 ptsMediumOutbox / dual-write
Resolve the 2 Medium advisory (unsound) finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock (2).+0.2 ptsLowOSV Dependency Vulnerabilities
Resolve the 2 Medium vulnerability finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock (2).+0.2 ptsLowOSV Dependency Vulnerabilities

File quality

Per-file score 0–10 — a quality signature. Of 68 files carrying findings, judged against the Template bar: 0% slop · 6% mixed · 94% near-clean.

FileScoreBandWorst signal
Cargo.lock3.1MixedOSV Dependency Vulnerabilities: High CVE: [GHSA redacted]
.github/workflows/ci.yml4.4MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
src/domain/performance/metrics.rs5.9MixedCyclomatic Complexity: PerformanceMetrics::calculate_time_series_metrics_with_benchmark (cyclomatic 20)
src/application/agents/analyst.rs5.9MixedCognitive Complexity: Analyst::handle_news_signal (cognitive 17)
scripts/ml/requirements.txt6.9Near-cleanOSV Dependency Vulnerabilities: Medium CVE: PYSEC-2025-148
src/application/risk_management/core/risk_manager.rs7.0Near-cleanCognitive Complexity: RiskManager::update_portfolio_valuation (cognitive 16)
src/interfaces/dashboard_components/architecture_view.rs7.1Near-cleanCyclomatic Complexity: architecture_view::render_agent_graph (cyclomatic 46)
src/application/strategies/smc.rs7.1Near-cleanCyclomatic Complexity: SMCStrategy::analyze (cyclomatic 27)
src/application/optimization/simulator/engine.rs7.1Near-cleanCyclomatic Complexity: Simulator::run_with_multi_bars (cyclomatic 26)
src/infrastructure/alpaca/market_data/historical.rs7.2Near-cleanCyclomatic Complexity: AlpacaMarketDataService::get_historical_bars_internal (cyclomatic 18)
src/application/optimization/core/walk_forward.rs7.4Near-cleanCyclomatic Complexity: GridSearchOptimizer::generate_combinations (cyclomatic 16)
src/domain/snn/competitive_network.rs7.4Near-cleanCyclomatic Complexity: CompetitiveSnnNetwork::backward (cyclomatic 16)
src/bin/optimize/main.rs7.4Near-cleanCognitive Complexity: main::main (cognitive 25)
src/bin/benchmark.rs7.8Near-cleanCyclomatic Complexity: benchmark::main (cyclomatic 48)
src/interfaces/dashboard.rs7.8Near-cleanCyclomatic Complexity: dashboard::render_dashboard (cyclomatic 43)
src/application/ml/derivative_encoding.rs7.8Near-cleanCyclomatic Complexity: derivative_encoding::encode_multi_feature (cyclomatic 36)
src/application/agents/user_agent/activity.rs7.8Near-cleanCyclomatic Complexity: UserAgent::parse_log_for_activity (cyclomatic 24)
src/domain/performance/calculator.rs7.8Near-cleanCyclomatic Complexity: calculator::calculate_metrics_from_orders (cyclomatic 22)
src/interfaces/settings_components/symbol_selector.rs7.8Near-cleanCyclomatic Complexity: symbol_selector::render_symbol_selector (cyclomatic 21)
src/application/bootstrap/agents.rs7.8Near-cleanCyclomatic Complexity: AgentsBootstrap::init (cyclomatic 20)

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. 27 of 28 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 1 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — 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 — 28 dimensions across the health lenses
D1D2D3D4D13D15D21D28D29D34D35D37D38AX5AX9DM4DM5DM6ED4ES1ES2M1M2M3M4P1P3P6

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, 154 of 160 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
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets 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 019fb092-9b38-7d79-8962-6d6fe7e22f35.

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.

  • 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.
  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

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 (jscpd) — 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.
  • 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.
  • 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.
  • 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").
  • 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of 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.
  • 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 (2): D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These 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.6 / 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: DocumentedVerifiedPrevented · effective 6.6 / 10 · rule-coverage 100% · ceiling Prevented

31 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was benchmark::main at 48. A further 2 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being SettingsPanel::apply_persisted_settings at 17 — they are counted neither in the figure above nor in this dimension's score.

architecture_view::render_agent_graph (cyclomatic 46) · ×2src/interfaces/dashboard_components/architecture_view.rs:307
SMCStrategy::analyze (cyclomatic 27) · ×2src/application/strategies/smc.rs:347
Simulator::run_with_multi_bars (cyclomatic 26) · ×2src/application/optimization/simulator/engine.rs:322
UserAgent::parse_log_for_activity (cyclomatic 24) · ×2src/application/agents/user_agent/activity.rs:68
benchmark::main (cyclomatic 48)src/bin/benchmark.rs:232

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

What to do

  1. Resolve the 2 architecture_view finding(s) in Cyclomatic Complexity — start with architecture_view.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 2 SMCStrategy finding(s) in Cyclomatic Complexity — start with smc.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Simulator finding(s) in Cyclomatic Complexity — start with engine.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 Complexity2.0 / 10Critical✓ 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: DocumentedVerifiedPrevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

76 method(s) exceeded the cognitive complexity threshold of 15; the worst was benchmark::main at 174.

AlpacaMarketDataService::get_historical_bars_internal (cognitive 61) · ×4src/infrastructure/alpaca/market_data/historical.rs:255
main::main (cognitive 34) · ×4src/main.rs:45
SMCStrategy::detect_fvg (cognitive 82) · ×3src/application/strategies/smc.rs:49
Simulator::run_with_multi_bars (cognitive 50) · ×3src/application/optimization/simulator/engine.rs:322
UserAgent::update (cognitive 38) · ×3src/application/agents/user_agent.rs:230

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

What to do

  1. Resolve the 4 AlpacaMarketDataService finding(s) in Cognitive Complexity — start with historical.rs (3), price.rs. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 main finding(s) in Cognitive Complexity — start with main.rs (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 SMCStrategy finding(s) in Cognitive Complexity — start with smc.rs (3). — One of this dimension's main actionable groups (3 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 Classes9.9 / 10Exemplary✓ 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: DocumentedVerifiedPrevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

1 god class(es) detected.

FileTooLong: dashboard_components/architecture_view.rssrc/interfaces/dashboard_components/architecture_view.rs:0

✓ On the Gold path — maintain.

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

D4 · Code Duplication10.0 / 10Exemplary✓ 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: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 duplicated block group(s) detected.

✓ On the Gold path — maintain.

Detailed fixes: d4_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: DocumentedVerifiedPrevented · 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.6 / 10Exemplary✓ 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: DocumentedVerifiedPrevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/bin/benchmark.rs (4×48=192); src/interfaces/dashboard.rs (4×43=172); src/application/bootstrap/agents.rs (7×20=140)

Hotspot: src/bin/benchmark.rs · ×10src/bin/benchmark.rs

✓ On the Gold path — maintain.

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

D21 · Naming Consistency / 10Exemplary◐ 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: DocumentedVerifiedPrevented · 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.

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: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · 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)0.4 / 10Critical✓ 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: DocumentedVerifiedPrevented · effective 0.4 / 10 · rule-coverage 100% · ceiling Documented

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

High: github-actions-mutable-action-tag · ×18.github/workflows/ci.yml:23detected by semgrep finding

What to do

  1. Resolve the 18 High finding(s) in Static Analysis (SAST) — start with ci.yml (18). — One of this dimension's main actionable groups (18 issue-level).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ 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: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling8.9 / 10Strong✓ 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; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: analyst.rs↔websocket.rs 63%; database.rs↔mod.rs 58%; risk_manager.rs↔database.rs 58%

Change coupling: analyst.rs ↔ websocket.rs · ×10src/application/agents/analyst.rs

What to do

  1. Resolve the 10 Change coupling finding(s) in Change Coupling — start with analyst.rs (3), database.rs, risk_manager.rs. — One of this dimension's main actionable groups (10 warning-level).

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D38 · OSV Dependency Vulnerabilities8.1 / 10Strong✓ Tool-verified

What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.

Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.

Maturity: DocumentedVerifiedPrevented · effective 8.1 / 10 · rule-coverage 100% · ceiling Documented

8 finding(s): 0 critical, 1 high, 7 medium, 0 low.

High CVE: [GHSA redacted]Cargo.lockdetected by osv-scanner finding
Medium advisory (unsound): RUSTSEC-2026-0190 · ×2Cargo.lockdetected by osv-scanner finding
Medium vulnerability: RUSTSEC-2026-0204 · ×2Cargo.lockdetected by osv-scanner finding
Medium CVE: PYSEC-2025-148 · ×2scripts/ml/requirements.txtdetected by osv-scanner finding
Medium advisory (unmaintained): RUSTSEC-2026-0192Cargo.lockdetected by osv-scanner finding

What to do

  1. Resolve the 1 High CVE finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 Medium advisory (unsound) finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock (2). — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Medium vulnerability finding(s) in OSV Dependency Vulnerabilities — start with Cargo.lock (2). — One of this dimension's main actionable groups (2 warning-level).

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

Frontend & cross-cutting dimensions

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

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX9 · CQS / query purity9.9 / 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.

  • `BinanceMarketDataService.get_historical_bars` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — market_data.rs:382

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether domain entities own their behaviour (invariant-enforcing commands) rather than being data-only structs driven by a foreign service.

Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.

Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.

DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a domain type's identity-bearing field stays immutable — a `pub` mutable field under a hand-rolled Hash/PartialEq breaks the value-identity invariant.

Method: Roslyn (DDD-gated): public setters on entities detected; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.

Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.

DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies — a domain aggregate fused to a persistence ORM (diesel/sea-orm/sqlx) on its own declaration (active-record) couples the domain to infrastructure. The clean-architecture dependency rule.

Method: Roslyn (DDD-gated): domain-layer types scanned for infrastructure usage in member SIGNATURES and inside method/accessor BODIES — resolved calls and object-creations into EF/Marten/HTTP/Mongo/Redis/message-bus types (not just a namespace allowlist). Deterministic, symbol-resolved, exhaustive over domain-layer bodies, DDD-native.

Coverage: Domain layer identified by NAMESPACE heuristic; infrastructure then resolved by symbol in member SIGNATURES and method/accessor BODIES — rename the layer and the check evaporates.

ED4 · Outbox / dual-write8.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `AdaptiveOptimizationService.execute_reoptimization` performs two independent DURABLE writes — a durable state write (`history_repo.save`, :192) and a second independent durable store write — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — adaptive_optimization_service.rs:142

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)8.0 / 10Exemplary✓ 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.

M2 · Architecture documentation5.0 / 10Adequate✓ 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 — decisions aren't captured for future maintainers.

What to do

  • Start an ADR log (docs/adr/) recording significant decisions and their rationale.
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 gates8.0 / 10Exemplary✓ Tool-verified

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.

  • A CI pipeline exists but no build/compile invocation (a build step for your stack — dotnet build, npm run build, go build, mvn package, cargo build, …) was matched — changes may merge without being compiled.

What to do

  • Add an explicit build/compile step to your CI pipeline (whatever your stack uses — e.g. dotnet build, npm run build, go build, mvn package, swift build/xcodebuild) so every change is compiled before merge.
P3 · Security & performance tooling4.0 / 10Adequate✓ 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

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.

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 Health71%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplarySolid.
Maturity78%ExemplarySolid.
Readiness60%StrongLargest drag on the score — prioritise here.
Security71%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event-Driven80%ExemplarySolid.
Event Sourcing100%ExemplarySolid.
Not included — 73 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 — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over the .NET document set and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — no singleton implementations detected
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over the .NET project-reference graph and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over the .NET project-reference graph and none was loaded for this repository, because it is written in another language or the solution 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 the .NET type surface and none was loaded for this repository, because it is written in another language or the solution 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 — not assessed — test isolation is computed from the .NET project graph (which projects are test projects, and what they reference) and no such graph was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • C1 Data Protection — Not assessed: these personal data controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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 C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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.
  • C3 Audit Trail — Not assessed: these audit controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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 C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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 C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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.
  • D10 Test Quality — ~6030 lines of test source are present (.rs) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Cargo manifest), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D16 Bus Factor — single-maintainer — knowledge-concentration (bus factor) risk
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • 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
  • D20 ADR Quality — N/A — this repo declares itself a template / kata / sample / demo; a formal ADR log is deferred to a real application built from it.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Production source is present (.py, .rs) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["Acme.Billing"]`, `Catalog: ["Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Cargo manifest — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR ruleset is bundled (the public p/gdpr semgrep pack was retired) — data compliance is not assessed in this scan.
  • D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a NuGet package, a container image, a GitHub release).
  • 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.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .py, .rs, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.rs) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Aggregate boundaries — not scored for Rust: aggregate-vs-value-object classification cannot be told apart in source (every struct-holding-struct reads alike), and a child COLLECTION (legitimate membership) vs a single embedded aggregate is indistinguishable — advisory (the Swift/Dart parity)
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — not scored for Rust: a cross-crate domain leak cannot be told apart in source from a legitimate shared-kernel crate, and most repositories ship a single crate — reported as guidance rather than measured
  • DM7 Repository granularity — not scored for Rust: 'a repository per CHILD entity' needs the aggregate-root structure, which is not source-resolvable — reported as guidance rather than measured
  • ED2 Event/command shape — not gated in Rust source-only: a command with >1 competing handler needs a dispatch/call graph the source-only frontend cannot resolve (inferred/generic call owners decline) — advisory
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no data
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
  • P8 Schema migrations — not assessed — schema-migration practice is read from 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo llvm-cov --lcov --output-path lcov.info`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from C# source (attributes, middleware, entity/column names, guard methods) and no C# source was loaded for this repository — because it is written in another language, or the solution failed to load. Absence of a .NET idiom 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 are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository
  • X4 Structured logging — not analysed — these correctness checks are read from C# source and none was loaded for this repository, because it is written in another language or the solution 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 are read from C# source and none was loaded for this repository, because it is written in another language or the solution failed to load. This is a gap in the analyzer, not a finding about this repository

Appendix A — Findings (grouped)

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

Issue — 19 finding(s)
D29 · Static Analysis (SAST) · High · ×18
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:23 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:24 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:25 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: Swatinem/rust-cache@<40-character SHA>`. This step references `Swatinem/rust-cache@v2`; resolve the SHA it points at today with `gh api repos/Swatinem/rust-cache/commits/v2 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:33 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:34 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:35 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: Swatinem/rust-cache@<40-character SHA>`. This step references `Swatinem/rust-cache@v2`; resolve the SHA it points at today with `gh api repos/Swatinem/rust-cache/commits/v2 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:36 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: taiki-e/install-action@<40-character SHA>`. This step references `taiki-e/install-action@nextest`; resolve the SHA it points at today with `gh api repos/taiki-e/install-action/commits/nextest --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:44 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:45 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:48 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: Swatinem/rust-cache@<40-character SHA>`. This step references `Swatinem/rust-cache@v2`; resolve the SHA it points at today with `gh api repos/Swatinem/rust-cache/commits/v2 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:56 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:57 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:69 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:70 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:71 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: taiki-e/install-action@<40-character SHA>`. This step references `taiki-e/install-action@cargo-audit`; resolve the SHA it points at today with `gh api repos/taiki-e/install-action/commits/cargo-audit --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:79 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:80 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: dtolnay/rust-toolchain@<40-character SHA>`. This step references `dtolnay/rust-toolchain@stable`; resolve the SHA it points at today with `gh api repos/dtolnay/rust-toolchain/commits/stable --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/ci.yml:81 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: Swatinem/rust-cache@<40-character SHA>`. This step references `Swatinem/rust-cache@v2`; resolve the SHA it points at today with `gh api repos/Swatinem/rust-cache/commits/v2 --jq .sha`.
D38 · OSV Dependency Vulnerabilities · High CVE · ×1
  • High CVE: [GHSA redacted] Cargo.lock — quinn-proto 0.11.14: [GHSA redacted] — quinn-proto is not declared in this repo's manifests: it is pulled in transitively by quinn 0.11.9, so upgrade the dependency that requires it (or force it with `cargo update -p quinn-proto@0.11.14 --precise 0.11.15`, or a `[patch.crates-io]` entry).
Warning — 137 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: src/bin/benchmark.rs src/bin/benchmark.rs — src/bin/benchmark.rs changed 4 times in last 90 days, max complexity 48.
  • Hotspot: src/interfaces/dashboard.rs src/interfaces/dashboard.rs — src/interfaces/dashboard.rs changed 4 times in last 90 days, max complexity 43.
  • Hotspot: src/application/bootstrap/agents.rs src/application/bootstrap/agents.rs — src/application/bootstrap/agents.rs changed 7 times in last 90 days, max complexity 20.
  • Hotspot: src/interfaces/dashboard_components/architecture_view.rs src/interfaces/dashboard_components/architecture_view.rs — src/interfaces/dashboard_components/architecture_view.rs changed 3 times in last 90 days, max complexity 46.
  • Hotspot: src/application/strategies/ensemble.rs src/application/strategies/ensemble.rs — src/application/strategies/ensemble.rs changed 4 times in last 90 days, max complexity 19.
  • Hotspot: src/main.rs src/main.rs — src/main.rs changed 4 times in last 90 days, max complexity 18. 1 of those changes were fix/bug commits — a defect-dense hotspot worth prioritising.
  • Hotspot: src/application/agents/user_agent.rs src/application/agents/user_agent.rs — src/application/agents/user_agent.rs changed 4 times in last 90 days, max complexity 17.
  • Hotspot: src/application/optimization/core/walk_forward.rs src/application/optimization/core/walk_forward.rs — src/application/optimization/core/walk_forward.rs changed 4 times in last 90 days, max complexity 16.
  • Hotspot: src/interfaces/ui_components/settings_state.rs src/interfaces/ui_components/settings_state.rs — src/interfaces/ui_components/settings_state.rs changed 3 times in last 90 days, max complexity 17.
  • Hotspot: src/application/strategies/snn_surrogate_strategy.rs src/application/strategies/snn_surrogate_strategy.rs — src/application/strategies/snn_surrogate_strategy.rs changed 3 times in last 90 days, max complexity 16.
D35 · Change Coupling · Change coupling · ×10
  • Change coupling: analyst.rs ↔ websocket.rs src/application/agents/analyst.rs — `src/application/agents/analyst.rs` and `src/infrastructure/alpaca/websocket.rs` change together 63% of the time (12 of the 19 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: database.rs ↔ mod.rs src/infrastructure/persistence/database.rs — `src/infrastructure/persistence/database.rs` and `src/infrastructure/persistence/repositories/mod.rs` change together 58% of the time (7 of the 12 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: risk_manager.rs ↔ database.rs src/application/risk_management/core/risk_manager.rs — `src/application/risk_management/core/risk_manager.rs` and `src/infrastructure/persistence/database.rs` change together 58% of the time (7 of the 12 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: analyst.rs ↔ sentinel.rs src/application/agents/analyst.rs — `src/application/agents/analyst.rs` and `src/application/agents/sentinel.rs` change together 58% of the time (11 of the 19 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. They already sit in the same directory, so if they share structure, extract the common part into one unit; otherwise break the coupling.
  • Change coupling: circuit_breaker_validator.rs ↔ position_size_validator.rs src/domain/risk/filters/circuit_breaker_validator.rs — `src/domain/risk/filters/circuit_breaker_validator.rs` and `src/domain/risk/filters/position_size_validator.rs` change together 55% of the time (6 of the 11 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. They already sit in the same directory, so if they share structure, extract the common part into one unit; otherwise break the coupling.
  • Change coupling: metrics.rs ↔ portfolio.rs src/domain/performance/metrics.rs — `src/domain/performance/metrics.rs` and `src/domain/trading/portfolio.rs` change together 54% of the time (7 of the 13 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: scanner.rs ↔ mod.rs src/application/agents/scanner.rs — `src/application/agents/scanner.rs` and `src/application/system/mod.rs` change together 53% of the time (10 of the 19 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: analyst.rs ↔ optimizer.rs src/application/agents/analyst.rs — `src/application/agents/analyst.rs` and `src/application/optimization/optimizer.rs` change together 50% of the time (17 of the 34 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: mod.rs ↔ database.rs src/application/system/mod.rs — `src/application/system/mod.rs` and `src/infrastructure/persistence/database.rs` change together 50% of the time (6 of the 12 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. If they belong together, co-locate them; if not, break the coupling.
  • Change coupling: position_size_validator.rs ↔ sector_exposure_validator.rs src/domain/risk/filters/position_size_validator.rs — `src/domain/risk/filters/position_size_validator.rs` and `src/domain/risk/filters/sector_exposure_validator.rs` change together 50% of the time (5 of the 10 commits that touched the less-changed of the two, renames followed) with no explicit dependency — a hidden/logical coupling. They already sit in the same directory, so if they share structure, extract the common part into one unit; otherwise break the coupling.
D2 · Cognitive Complexity · AlpacaMarketDataService · ×4
  • AlpacaMarketDataService::get_historical_bars_internal (cognitive 61) src/infrastructure/alpaca/market_data/historical.rs:255 — AlpacaMarketDataService::get_historical_bars_internal has cognitive complexity 61 (threshold 15). Drivers by points: if/else 33, loops 17, match/switch 9, boolean chains 2 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AlpacaMarketDataService::get_historical_movers (cognitive 21) src/infrastructure/alpaca/market_data/historical.rs:12 — AlpacaMarketDataService::get_historical_movers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 3, match/switch 3, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • AlpacaMarketDataService::get_prices_internal (cognitive 21) src/infrastructure/alpaca/market_data/price.rs:238 — AlpacaMarketDataService::get_prices_internal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • AlpacaMarketDataService::fetch_historical_bars_internal (cognitive 17) src/infrastructure/alpaca/market_data/historical.rs:110 — AlpacaMarketDataService::fetch_historical_bars_internal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 3, 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.
D2 · Cognitive Complexity · main · ×4
  • main::main (cognitive 34) src/main.rs:45 — main::main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19, match/switch 9, loops 6 (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.
  • main::main (cognitive 25) src/bin/optimize/main.rs:503 — main::main has cognitive complexity 25 (threshold 15). Drivers by points: loops 9, if/else 8, match/switch 8 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • main::run_optimize (cognitive 21) src/bin/optimize/main.rs:205 — main::run_optimize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 3 (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.
  • main::run_clusters (cognitive 21) src/bin/optimize/main.rs:334 — main::run_clusters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SMCStrategy · ×3
  • SMCStrategy::detect_fvg (cognitive 82) src/application/strategies/smc.rs:49 — SMCStrategy::detect_fvg has cognitive complexity 82 (threshold 15). Drivers by points: if/else 71, loops 9, boolean chains 2 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SMCStrategy::analyze (cognitive 75) src/application/strategies/smc.rs:347 — SMCStrategy::analyze has cognitive complexity 75 (threshold 15). Drivers by points: if/else 65, boolean chains 8, match/switch 2 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • SMCStrategy::find_last_ob (cognitive 24) src/application/strategies/smc.rs:182 — SMCStrategy::find_last_ob has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 4, boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Simulator · ×3
  • Simulator::run_with_multi_bars (cognitive 50) src/application/optimization/simulator/engine.rs:322 — Simulator::run_with_multi_bars has cognitive complexity 50 (threshold 15). Drivers by points: loops 26, if/else 22, boolean chains 2 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • Simulator::run_with_bars (cognitive 32) src/application/optimization/simulator/engine.rs:166 — Simulator::run_with_bars has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, loops 8, boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Simulator::run_simulation_core (cognitive 29) src/application/optimization/simulator/engine.rs:17 — Simulator::run_simulation_core has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, loops 5, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UserAgent · ×3
  • UserAgent::update (cognitive 38) src/application/agents/user_agent.rs:230 — UserAgent::update has cognitive complexity 38 (threshold 15). Drivers by points: if/else 30, loops 4, boolean chains 2, match/switch 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • UserAgent::parse_log_for_activity (cognitive 32) src/application/agents/user_agent/activity.rs:68 — UserAgent::parse_log_for_activity has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22, boolean chains 10 (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.
  • UserAgent::calculate_trade_statistics (cognitive 30) src/application/agents/user_agent/metrics.rs:116 — UserAgent::calculate_trade_statistics has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, match/switch 3, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D1 · Cyclomatic Complexity · architecture_view · ×2
  • architecture_view::render_agent_graph (cyclomatic 46) src/interfaces/dashboard_components/architecture_view.rs:307 — architecture_view::render_agent_graph has cyclomatic complexity 46 (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.
  • architecture_view::render_agent_detail_panel (cyclomatic 16) src/interfaces/dashboard_components/architecture_view.rs:643 — architecture_view::render_agent_detail_panel 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.
D1 · Cyclomatic Complexity · SMCStrategy · ×2
  • SMCStrategy::analyze (cyclomatic 27) src/application/strategies/smc.rs:347 — SMCStrategy::analyze has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • SMCStrategy::detect_fvg (cyclomatic 25) src/application/strategies/smc.rs:49 — SMCStrategy::detect_fvg has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Simulator · ×2
  • Simulator::run_with_multi_bars (cyclomatic 26) src/application/optimization/simulator/engine.rs:322 — Simulator::run_with_multi_bars has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • Simulator::run_with_bars (cyclomatic 19) src/application/optimization/simulator/engine.rs:166 — Simulator::run_with_bars has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UserAgent · ×2
  • UserAgent::parse_log_for_activity (cyclomatic 24) src/application/agents/user_agent/activity.rs:68 — UserAgent::parse_log_for_activity 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.
  • UserAgent::update (cyclomatic 17) src/application/agents/user_agent.rs:230 — UserAgent::update 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.
D2 · Cognitive Complexity · GridSearchOptimizer · ×2
  • GridSearchOptimizer::generate_combinations (cognitive 108) src/application/optimization/core/walk_forward.rs:43 — GridSearchOptimizer::generate_combinations has cognitive complexity 108 (threshold 15). Drivers by points: loops 105, if/else 3 (nesting depth added 93). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • GridSearchOptimizer::run_optimization (cognitive 16) src/application/optimization/core/walk_forward.rs:276 — GridSearchOptimizer::run_optimization has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · architecture_view · ×2
  • architecture_view::render_agent_graph (cognitive 95) src/interfaces/dashboard_components/architecture_view.rs:307 — architecture_view::render_agent_graph has cognitive complexity 95 (threshold 15). Drivers by points: if/else 72, loops 14, boolean chains 6, match/switch 3 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • architecture_view::render_agent_detail_panel (cognitive 25) src/interfaces/dashboard_components/architecture_view.rs:643 — architecture_view::render_agent_detail_panel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, match/switch 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RiskManager · ×2
  • RiskManager::cmd_handle_proposal (cognitive 38) src/application/risk_management/core/risk_manager/handler.rs:109 — RiskManager::cmd_handle_proposal has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24, match/switch 13, 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.
  • RiskManager::update_portfolio_valuation (cognitive 16) src/application/risk_management/core/risk_manager.rs:391 — RiskManager::update_portfolio_valuation has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PerformanceMetrics · ×2
  • PerformanceMetrics::calculate_time_series_metrics_with_benchmark (cognitive 34) src/domain/performance/metrics.rs:92 — PerformanceMetrics::calculate_time_series_metrics_with_benchmark has cognitive complexity 34 (threshold 15). Drivers by points: if/else 29, loops 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • PerformanceMetrics::calculate_from_equity_curve (cognitive 25) src/domain/performance/metrics.rs:328 — PerformanceMetrics::calculate_from_equity_curve has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CompetitiveSnnNetwork · ×2
  • CompetitiveSnnNetwork::backward (cognitive 34) src/domain/snn/competitive_network.rs:344 — CompetitiveSnnNetwork::backward has cognitive complexity 34 (threshold 15). Drivers by points: loops 30, if/else 4 (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • CompetitiveSnnNetwork::forward (cognitive 23) src/domain/snn/competitive_network.rs:150 — CompetitiveSnnNetwork::forward has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, loops 11 (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 · Executor · ×2
  • Executor::handle_order (cognitive 28) src/application/agents/executor.rs:119 — Executor::handle_order has cognitive complexity 28 (threshold 15). Drivers by points: if/else 23, match/switch 3, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Executor::update_portfolio (cognitive 22) src/application/agents/executor.rs:396 — Executor::update_portfolio has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, match/switch 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OrderReconciler · ×2
  • OrderReconciler::reconcile_pending_orders (cognitive 21) src/application/risk_management/execution/order_reconciler.rs:127 — OrderReconciler::reconcile_pending_orders has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • OrderReconciler::handle_order_update (cognitive 19) src/application/risk_management/execution/order_reconciler.rs:51 — OrderReconciler::handle_order_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, match/switch 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · settings_view · ×2
  • settings_view::render_trading_engine_content (cognitive 17) src/interfaces/ui_components/settings_view.rs:182 — settings_view::render_trading_engine_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • settings_view::render_save_button (cognitive 17) src/interfaces/ui_components/settings_view.rs:322 — settings_view::render_save_button has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 4 (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.
D38 · OSV Dependency Vulnerabilities · Medium advisory (unsound) · ×2
  • Medium advisory (unsound): RUSTSEC-2026-0190 Cargo.lock — anyhow 1.0.102: RUSTSEC-2026-0190 — upgrade to 1.0.103
  • Medium advisory (unsound): RUSTSEC-2026-0186 Cargo.lock — memmap2 0.9.10: RUSTSEC-2026-0186 — memmap2 is not declared in this repo's manifests: it is pulled in transitively by sctk-adwaita 0.10.1 and smithay-client-toolkit 0.19.2 and 2 others, so upgrade the dependency that requires it (or force it with `cargo update -p memmap2@0.9.10 --precise 0.9.11`, or a `[patch.crates-io]` entry).
D38 · OSV Dependency Vulnerabilities · Medium vulnerability · ×2
  • Medium vulnerability: RUSTSEC-2026-0204 Cargo.lock — crossbeam-epoch 0.9.18: RUSTSEC-2026-0204 — crossbeam-epoch is not declared in this repo's manifests: it is pulled in transitively by crossbeam-deque 0.8.6, so upgrade the dependency that requires it (or force it with `cargo update -p crossbeam-epoch@0.9.18 --precise 0.9.20`, or a `[patch.crates-io]` entry).
  • Medium vulnerability: RUSTSEC-2026-0194 Cargo.lock — quick-xml 0.39.4: RUSTSEC-2026-0194 — quick-xml is not declared in this repo's manifests: it is pulled in transitively by atom_syndication 0.12.8 and rss 2.0.13 and 2 others, so upgrade the dependency that requires it (or add a `[patch.crates-io]` entry for quick-xml — 0.41.0 is not semver-compatible with the resolved 0.39.4, so `cargo update --precise` cannot select it). One upgrade of quick-xml 0.39.4 clears all 2 advisories it raises: RUSTSEC-2026-0194, RUSTSEC-2026-0195.
D38 · OSV Dependency Vulnerabilities · Medium CVE · ×2
  • Medium CVE: PYSEC-2025-148 scripts/ml/requirements.txt — onnx 1.14.0: PYSEC-2025-148 — no fixed version has been published yet. Track the advisory, and remove or replace onnx if the exposure is not acceptable until one lands.
  • Medium CVE: [GHSA redacted] scripts/ml/requirements.txt — torch 2.0.0: [GHSA redacted] — no fixed version has been published yet. Track the advisory, and remove or replace torch if the exposure is not acceptable until one lands. One upgrade of torch 2.0.0 clears all 5 advisories it raises: [GHSA redacted], [GHSA redacted], [GHSA redacted], PYSEC-2025-191, PYSEC-2026-139.
D1 · Cyclomatic Complexity · benchmark · ×1
  • benchmark::main (cyclomatic 48) src/bin/benchmark.rs:232 — benchmark::main has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dashboard · ×1
  • dashboard::render_dashboard (cyclomatic 43) src/interfaces/dashboard.rs:17 — dashboard::render_dashboard has cyclomatic complexity 43 (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 · derivative_encoding · ×1
  • derivative_encoding::encode_multi_feature (cyclomatic 36) src/application/ml/derivative_encoding.rs:60 — derivative_encoding::encode_multi_feature has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · calculator · ×1
  • calculator::calculate_metrics_from_orders (cyclomatic 22) src/domain/performance/calculator.rs:15 — calculator::calculate_metrics_from_orders has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · symbol_selector · ×1
  • symbol_selector::render_symbol_selector (cyclomatic 21) src/interfaces/settings_components/symbol_selector.rs:47 — symbol_selector::render_symbol_selector 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.
D1 · Cyclomatic Complexity · AgentsBootstrap · ×1
  • AgentsBootstrap::init (cyclomatic 20) src/application/bootstrap/agents.rs:54 — AgentsBootstrap::init 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 · RiskManager · ×1
  • RiskManager::cmd_handle_proposal (cyclomatic 20) src/application/risk_management/core/risk_manager/handler.rs:109 — RiskManager::cmd_handle_proposal 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 · PerformanceMetrics · ×1
  • PerformanceMetrics::calculate_time_series_metrics_with_benchmark (cyclomatic 20) src/domain/performance/metrics.rs:92 — PerformanceMetrics::calculate_time_series_metrics_with_benchmark 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 · BinanceWebSocketManager · ×1
  • BinanceWebSocketManager::connect_and_stream (cyclomatic 20) src/infrastructure/binance/websocket.rs:99 — BinanceWebSocketManager::connect_and_stream 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 · train_surrogate · ×1
  • train_surrogate::main (cyclomatic 20) src/bin/train_surrogate.rs:386 — train_surrogate::main 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 · activity_feed · ×1
  • activity_feed::render_logs_panel (cyclomatic 20) src/interfaces/dashboard_components/activity_feed.rs:74 — activity_feed::render_logs_panel 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 · EnsembleStrategy · ×1
  • EnsembleStrategy::analyze (cyclomatic 19) src/application/strategies/ensemble.rs:146 — EnsembleStrategy::analyze has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AlpacaMarketDataService · ×1
  • AlpacaMarketDataService::get_historical_bars_internal (cyclomatic 18) src/infrastructure/alpaca/market_data/historical.rs:255 — AlpacaMarketDataService::get_historical_bars_internal has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · main · ×1
  • main::main (cyclomatic 18) src/main.rs:45 — main::main has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · chart_panel · ×1
  • chart_panel::render_chart_panel (cyclomatic 18) src/interfaces/dashboard_components/chart_panel.rs:9 — chart_panel::render_chart_panel has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonteCarloEngine · ×1
  • MonteCarloEngine::simulate (cyclomatic 17) src/domain/performance/monte_carlo.rs:28 — MonteCarloEngine::simulate 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 · analytics_view · ×1
  • analytics_view::render_analytics_view (cyclomatic 17) src/interfaces/dashboard_components/analytics_view.rs:6 — analytics_view::render_analytics_view 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 · GridSearchOptimizer · ×1
  • GridSearchOptimizer::generate_combinations (cyclomatic 16) src/application/optimization/core/walk_forward.rs:43 — GridSearchOptimizer::generate_combinations has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · CircuitBreakerService · ×1
  • CircuitBreakerService::check_circuit_breaker (cyclomatic 16) src/application/risk_management/validation/circuit_breaker_service.rs:52 — CircuitBreakerService::check_circuit_breaker 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.
D1 · Cyclomatic Complexity · OrderFlowStrategy · ×1
  • OrderFlowStrategy::analyze (cyclomatic 16) src/application/strategies/order_flow.rs:51 — OrderFlowStrategy::analyze 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.
D1 · Cyclomatic Complexity · SnnSurrogateStrategy · ×1
  • SnnSurrogateStrategy::prepare_rolling_window (cyclomatic 16) src/application/strategies/snn_surrogate_strategy.rs:85 — SnnSurrogateStrategy::prepare_rolling_window 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.
D1 · Cyclomatic Complexity · CompetitiveSnnNetwork · ×1
  • CompetitiveSnnNetwork::backward (cyclomatic 16) src/domain/snn/competitive_network.rs:344 — CompetitiveSnnNetwork::backward has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · ensemble_optimizer · ×1
  • ensemble_optimizer::main (cyclomatic 16) src/bin/ensemble_optimizer.rs:40 — ensemble_optimizer::main 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.
D16 · Bus Factor · single-maintainer · ×1
  • single-maintainer — knowledge-concentration (bus factor) risk — single-maintainer — knowledge-concentration (bus factor) risk (1 author(s) across 228 commit(s) sampled).
D19 · Documentation Quality · LLM evaluation failed · ×1
  • LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.findings[0].issue | LineNumber: 0 | BytePositionInLine: 1337.
D2 · Cognitive Complexity · benchmark · ×1
  • benchmark::main (cognitive 174) src/bin/benchmark.rs:232 — benchmark::main has cognitive complexity 174 (threshold 15). Drivers by points: if/else 84, loops 59, match/switch 30, boolean chains 1 (nesting depth added 114). To reduce it, split the body into named stages: move each independent 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 · dashboard · ×1
  • dashboard::render_dashboard (cognitive 68) src/interfaces/dashboard.rs:17 — dashboard::render_dashboard has cognitive complexity 68 (threshold 15). Drivers by points: if/else 61, loops 4, boolean chains 2, match/switch 1 (nesting depth added 12). 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 · chart_panel · ×1
  • chart_panel::render_chart_panel (cognitive 67) src/interfaces/dashboard_components/chart_panel.rs:9 — chart_panel::render_chart_panel has cognitive complexity 67 (threshold 15). Drivers by points: if/else 62, loops 4, boolean chains 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · derivative_encoding · ×1
  • derivative_encoding::encode_multi_feature (cognitive 64) src/application/ml/derivative_encoding.rs:60 — derivative_encoding::encode_multi_feature has cognitive complexity 64 (threshold 15). Drivers by points: if/else 56, boolean chains 5, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RssNewsService · ×1
  • RssNewsService::subscribe_news (cognitive 54) src/infrastructure/news/rss.rs:41 — RssNewsService::subscribe_news has cognitive complexity 54 (threshold 15). Drivers by points: if/else 32, match/switch 12, loops 9, boolean chains 1 (nesting depth added 41). To reduce it, split the body into named stages: move each independent 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 · analytics_view · ×1
  • analytics_view::render_analytics_view (cognitive 51) src/interfaces/dashboard_components/analytics_view.rs:6 — analytics_view::render_analytics_view has cognitive complexity 51 (threshold 15). Drivers by points: if/else 45, loops 6 (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.
D2 · Cognitive Complexity · calculator · ×1
  • calculator::calculate_metrics_from_orders (cognitive 49) src/domain/performance/calculator.rs:15 — calculator::calculate_metrics_from_orders has cognitive complexity 49 (threshold 15). Drivers by points: if/else 28, match/switch 13, loops 5, boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonteCarloEngine · ×1
  • MonteCarloEngine::simulate (cognitive 42) src/domain/performance/monte_carlo.rs:28 — MonteCarloEngine::simulate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 36, loops 6 (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.
D2 · Cognitive Complexity · train_surrogate · ×1
  • train_surrogate::main (cognitive 38) src/bin/train_surrogate.rs:386 — train_surrogate::main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 29, loops 8, match/switch 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.
D2 · Cognitive Complexity · OrderFlowStrategy · ×1
  • OrderFlowStrategy::analyze (cognitive 37) src/application/strategies/order_flow.rs:51 — OrderFlowStrategy::analyze has cognitive complexity 37 (threshold 15). Drivers by points: if/else 35, boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgentsBootstrap · ×1
  • AgentsBootstrap::init (cognitive 34) src/application/bootstrap/agents.rs:54 — AgentsBootstrap::init has cognitive complexity 34 (threshold 15). Drivers by points: if/else 27, boolean chains 3, loops 3, 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.
D2 · Cognitive Complexity · symbol_selector · ×1
  • symbol_selector::render_symbol_selector (cognitive 33) src/interfaces/settings_components/symbol_selector.rs:47 — symbol_selector::render_symbol_selector has cognitive complexity 33 (threshold 15). Drivers by points: if/else 28, boolean chains 4, 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 · BinanceWebSocketManager · ×1
  • BinanceWebSocketManager::connect_and_stream (cognitive 30) src/infrastructure/binance/websocket.rs:99 — BinanceWebSocketManager::connect_and_stream has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 5, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · help_about · ×1
  • help_about::render_help_tab (cognitive 30) src/interfaces/settings_components/help_about.rs:28 — help_about::render_help_tab has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 3, 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 · SessionManager · ×1
  • SessionManager::initialize_session (cognitive 29) src/application/risk_management/session/session_manager.rs:51 — SessionManager::initialize_session has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22, match/switch 4, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnsembleStrategy · ×1
  • EnsembleStrategy::analyze (cognitive 29) src/application/strategies/ensemble.rs:146 — EnsembleStrategy::analyze has cognitive complexity 29 (threshold 15). Drivers by points: if/else 21, boolean chains 4, match/switch 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnnSurrogateStrategy · ×1
  • SnnSurrogateStrategy::prepare_rolling_window (cognitive 29) src/application/strategies/snn_surrogate_strategy.rs:85 — SnnSurrogateStrategy::prepare_rolling_window has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, loops 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · activity_feed · ×1
  • activity_feed::render_logs_panel (cognitive 29) src/interfaces/dashboard_components/activity_feed.rs:74 — activity_feed::render_logs_panel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24, boolean chains 2, match/switch 2, loops 1 (nesting depth added 6). 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 · ensemble_optimizer · ×1
  • ensemble_optimizer::main (cognitive 28) src/bin/ensemble_optimizer.rs:40 — ensemble_optimizer::main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21, loops 4, match/switch 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CircuitBreakerService · ×1
  • CircuitBreakerService::check_circuit_breaker (cognitive 27) src/application/risk_management/validation/circuit_breaker_service.rs:52 — CircuitBreakerService::check_circuit_breaker has cognitive complexity 27 (threshold 15). Drivers by points: if/else 27 (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 · EmpiricalWinRateProvider · ×1
  • EmpiricalWinRateProvider::get_overall_win_rate (cognitive 25) src/application/monitoring/strategy/empirical_win_rate_provider.rs:126 — EmpiricalWinRateProvider::get_overall_win_rate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, loops 7, match/switch 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalysisContext · ×1
  • AnalysisContext::multi_timeframe_trend_strength (cognitive 24) src/application/strategies/traits.rs:190 — AnalysisContext::multi_timeframe_trend_strength has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, 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 · Scanner · ×1
  • Scanner::scan (cognitive 24) src/infrastructure/alpaca/market_data/crypto_movers.rs:16 — Scanner::scan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14, match/switch 6, loops 4 (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 · regime_handler · ×1
  • regime_handler::apply_dynamic_risk_scaling (cognitive 24) src/application/agents/regime_handler.rs:77 — regime_handler::apply_dynamic_risk_scaling has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MockExecutionService · ×1
  • MockExecutionService::execute (cognitive 23) src/infrastructure/mock/execution_service.rs:76 — MockExecutionService::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TechnicalFeatureEngineeringService · ×1
  • TechnicalFeatureEngineeringService::update (cognitive 22) src/application/monitoring/strategy/feature_engineering_service.rs:199 — TechnicalFeatureEngineeringService::update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 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 · AlpacaWebSocketManager · ×1
  • AlpacaWebSocketManager::spawn_connection_task (cognitive 21) src/infrastructure/alpaca/websocket.rs:210 — AlpacaWebSocketManager::spawn_connection_task has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, match/switch 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoricalWinRateProvider · ×1
  • HistoricalWinRateProvider::calculate_win_rate_from_orders (cognitive 20) src/application/optimization/win_rate_provider.rs:77 — HistoricalWinRateProvider::calculate_win_rate_from_orders has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, loops 4, match/switch 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashboardViewModel · ×1
  • DashboardViewModel::get_metrics (cognitive 20) src/interfaces/view_models/dashboard_view_model.rs:38 — DashboardViewModel::get_metrics has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · symbol_card · ×1
  • symbol_card::render_symbol_card (cognitive 20) src/interfaces/dashboard_components/symbol_card.rs:6 — symbol_card::render_symbol_card has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, match/switch 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DataCollector · ×1
  • DataCollector::update_labels_and_flush (cognitive 19) src/application/ml/data_collector.rs:57 — DataCollector::update_labels_and_flush has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ManualAdx · ×1
  • ManualAdx::next (cognitive 19) src/application/monitoring/strategy/feature_engineering_service.rs:53 — ManualAdx::next has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, boolean chains 3 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AlpacaExecutionService · ×1
  • AlpacaExecutionService::new (cognitive 19) src/infrastructure/alpaca/execution.rs:31 — AlpacaExecutionService::new has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 3, match/switch 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticOptimizer · ×1
  • GeneticOptimizer::run_optimization (cognitive 18) src/application/optimization/core/genetic.rs:54 — GeneticOptimizer::run_optimization has cognitive complexity 18 (threshold 15). Drivers by points: loops 10, if/else 8 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DiffIzhikevichLayer · ×1
  • DiffIzhikevichLayer::backward (cognitive 18) src/domain/snn/izhikevich_diff.rs:304 — DiffIzhikevichLayer::backward has cognitive complexity 18 (threshold 15). Drivers by points: loops 12, if/else 6 (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Analyst · ×1
  • Analyst::handle_news_signal (cognitive 17) src/application/agents/analyst.rs:558 — Analyst::handle_news_signal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, match/switch 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · news_feed · ×1
  • news_feed::render_news_feed (cognitive 17) src/interfaces/dashboard_components/news_feed.rs:5 — news_feed::render_news_feed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, match/switch 6, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SizingEngine · ×1
  • SizingEngine::calculate_quantity (cognitive 16) src/application/risk_management/position/sizing_engine.rs:157 — SizingEngine::calculate_quantity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MarketRegimeDetector · ×1
  • MarketRegimeDetector::detect (cognitive 16) src/domain/market/market_regime.rs:130 — MarketRegimeDetector::detect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ArbitrageEngine · ×1
  • ArbitrageEngine::check_opportunity (cognitive 16) src/domain/trading/arbitrage.rs:25 — ArbitrageEngine::check_opportunity has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, match/switch 4, 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.
D2 · Cognitive Complexity · grid · ×1
  • grid::get_grid_for_profile (cognitive 16) src/bin/optimize/grid.rs:36 — grid::get_grid_for_profile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · position_lifecycle · ×1
  • position_lifecycle::manage_pending_orders (cognitive 16) src/application/agents/position_lifecycle.rs:28 — position_lifecycle::manage_pending_orders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · reporting · ×1
  • reporting::max_drawdown_from_trades (cognitive 16) src/application/benchmarking/reporting.rs:234 — reporting::max_drawdown_from_trades has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 2, match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · FileTooLong · ×1
  • FileTooLong: dashboard_components/architecture_view.rs src/interfaces/dashboard_components/architecture_view.rs:0 — FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted).
D38 · OSV Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • Medium advisory (unmaintained): RUSTSEC-2026-0192 Cargo.lock — ttf-parser 0.25.1: RUSTSEC-2026-0192 — no fixed version exists: the advisory reports the package as unmaintained. ttf-parser is not declared in this repo's manifests: it is pulled in transitively by owned_ttf_parser 0.25.1, so the action is on the dependency that requires it — upgrade or replace that dependent.
Recommendation — 2 finding(s)
D11 · Test Reliability · Test reliability not included · ×1
  • Test reliability not included — Test source is present (.rs) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D8 · Code Coverage · Coverage not included · ×1
  • Coverage not included — suite not readable by the collector — 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 llvm-cov --lcov --output-path lcov.info`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored.
Info — 2 finding(s)
D12 · Dependency Hygiene · Dependency hygiene not measured · ×1
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene — This repository's dependency manifest (a Cargo manifest) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D38 wherever the manifest is OSV-readable.
D22 · Internal API Consistency · No exposed public API · ×1
  • No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.

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)gitleaksgitleaks detect --no-banner --report-format json --report-path /dev/stdout --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D29 · Static Analysis (SAST)semgrepsemgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --json --quiet --timeout 0 --metrics off .18artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (no readable dependency manifest)none (no readable dependency manifest): not present in this environment0
D31 · IaC & Container Securitytrivytrivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.0
D32 · Data Compliance (PII/GDPR)semgrepsemgrep: not applicable — No PII/GDPR ruleset is bundled (the public p/gdpr semgrep pack was retired) — data compliance is not assessed in this scan.0
D33 · JS/npm Dependency Vulnerabilitiestrivytrivy: not applicable — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.0
D36 · Supply-chain Provenance & Signingprovenanceprovenance: not applicable — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a NuGet package, a container image, a GitHub release).0
D38 · OSV Dependency Vulnerabilitiesosv-scannerosv-scanner --format json --recursive .8artifacts/raw/osv-scanner.json
D40 · Network Egress Confinementruntime-hardeningruntime-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-hardeningruntime-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-hardeningruntime-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

Run 019fb092-9b38-7d79-8962-6d6fe7e22f35 · 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