Public report of Zuytan/rustrade, published 21 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 21 October 2026, 22:55 UTC · Survey ID cd_429a7691660c468ea1fbcc8714160ebf

Zuytan/rustrade

Measured 21 October 2026, 22:49 UTC, at code version 53cd295

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 51out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 18 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 49,539 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Security and Compliance, 36

Findings by how serious they are

21 critical 280 serious 73 minor

13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
21 October 2026, 22:49 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

62of 66 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
343of 374 findings point to an exact file and line, so you can open each one in the code. The other 31 concern the repository as a whole, such as missing documentation.
66dimensions across 9 lenses, read from 49,539 lines of product code in 2 projects.
Chapters

Executive summary

Zuytan/rustrade scores 51 out of 100 and is rated Adequate, while six of its nine lenses score higher still: Maturity at 70, Event-Driven at 80, Performance at 82, Architecture at 84, Domain Modelling at 100, and Event Sourcing at 100. The score is held down by its weakest group, a quality bar other than Production, At risk, or provisional, because Watchdog judged it as a template, sample or demo, so the dimensions about building, releasing and running a product don't apply, and its lenses are rated against a lower bar.

The score is lower than those six because the weakest lens counts most, and here that is Security and Compliance, which scores 36 and is rated Weak. The project has no access controls, so its Access Controls dimension scores 0 out of 10, and until that dimension reaches 4, the lens can't be rated higher than Adequate. The first actions are to protect endpoints by default-deny with a global authentication guard or middleware, and to secure the server's transport by serving TLS or running behind a TLS-terminating proxy. If Security and Compliance rose to 70, the lowest score rated Strong, the score would rise from 51 to about 63.

Twenty-one findings are critical: eighteen mutable action tags in GitHub Actions, one query that writes persistent state on the read path, one high severity vulnerability in dependencies, and one dual write without an outbox. The mutable action tags should be pinned to specific commit hashes to prevent supply chain attacks, the query should be refactored to ensure read paths do not modify state, the high severity vulnerability should be resolved by updating the affected dependency, and the dual write should be replaced with an outbox pattern to ensure data consistency.

Watchdog couldn't measure Code Coverage because the test suite is not readable by the collector, Test Reliability because the suite was not re-run, and Navigability because too few call sites were counted as resolved. It also could not analyze Nullable reference types, Unfloored truncation loop, Disposal-pattern correctness, Incompleteness & stubs, or Interface segregation because the repository is written in a language these checks do not yet model. The product code is 49,539 lines, which would take an estimated 0.5 person-years, around €71,000, to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 36 · counts for 45%Production Readiness 54 · counts for 25%Code Health 65 · counts for 14%Maturity 70 · counts for 8%Event-Driven 80 · counts for 4%Performance 82 · counts for 2%Architecture 84 · counts for 1%Domain Modelling 100 · counts for 1%Event Sourcing 100 · counts for 0%

If Security and Compliance rose from 36 to 70, the lowest score rated Strong, the score would rise from 51 to about 63.

Code composition: what the lines of code are
Product code 89%Tests 11%
New since the last survey: 7 findings

These 7 critical or serious findings weren't in the previous survey, on 7 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 1 finding

This critical or serious finding was in the previous survey, on 7 October 2026, and is gone from this one.

  • Supply-chain Provenance & Signing REDACTED
Rebuild cost: about €71,000 · Estimate
Cost to rebuild€24,000 to €120,000, for 393 to 1,247 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemHigh, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 51. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 49,539 lines of product code

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
Raises the score by about 12 points · Medium effort · Access Controls
2
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
Raises the score by about 8 points · Medium effort · Web-Security Posture
3
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED.
Raises the score by about 2 points · Low effort · Dependency Vulnerabilities

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €71,000 to build again, about 0.5 person-years of work. Its weakest lens is Security and Compliance, at 36 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. Of all the actions in this report, it raises the score most for the work it takes: about 12 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 19,053 lines over the last 90 days, which is about 77,270 lines a year. At that pace, the extra work comes to an estimated 5.3 to 31.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

216 modules, with 427 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 176 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 application.bootstrap.persistence2 application.market_data.spread_cache3 application.monitoring.health.connection_health_service4 application.monitoring.strategy.strategy_validator5 config6 domain.market.market_regime7 domain.market.strategy_config8 domain.market.timeframe9 domain.risk.risk_appetite10 domain.risk.state11 domain.snn.competitive_network12 infrastructure.i18n.service13 infrastructure.observability.metrics14 application.agents.analyst_config15 application.monitoring.health.agent_status16 domain.risk.optimal_parameters17 domain.trading.types18 application.optimization.core.grid19 application.optimization.core.types20 application.strategies.traits21 application.trading.symbol_context22 domain.ports23 domain.trading.portfolio24 interfaces.ui_components.settings_state25 application.agents.executor26 application.agents.signal_processor27 application.optimization.core.walk_forward28 application.risk_management.core.risk_manager29 domain.repositories30 domain.risk.filters.validator_trait31 application.agents.news_handler32 application.agents.trade_evaluator33 application.optimization.adaptive_optimization_service34 application.agents.candle_pipeline35 application.bootstrap.services36 application.agents.analyst37 application.bootstrap.agents38 application.system39 application.client40 application.agents.user_agent
1 application.bootstrap.persistence
2 application.market_data.spread_cache
3 application.monitoring.health.connection_health_service
4 application.monitoring.strategy.strategy_validator
5 config
6 domain.market.market_regime
7 domain.market.strategy_config
8 domain.market.timeframe
9 domain.risk.risk_appetite
10 domain.risk.state
11 domain.snn.competitive_network
12 infrastructure.i18n.service
13 infrastructure.observability.metrics
14 application.agents.analyst_config11
15 application.monitoring.health.agent_status1
16 domain.risk.optimal_parameters3
17 domain.trading.types1
18 application.optimization.core.grid11
19 application.optimization.core.types1122
20 application.strategies.traits23
21 application.trading.symbol_context11112
22 domain.ports15
23 domain.trading.portfolio1
24 interfaces.ui_components.settings_state11
25 application.agents.executor2221
26 application.agents.signal_processor1121
27 application.optimization.core.walk_forward1215
28 application.risk_management.core.risk_manager121122111
29 domain.repositories1131
30 domain.risk.filters.validator_trait1111
31 application.agents.news_handler1121
32 application.agents.trade_evaluator12111
33 application.optimization.adaptive_optimization_service11
34 application.agents.candle_pipeline121111
35 application.bootstrap.services1111211
36 application.agents.analyst121121111
37 application.bootstrap.agents112112111
38 application.system11211122211
39 application.client1111111
40 application.agents.user_agent2111111
Uses a module listed above itPart of a loopThe module itself
1 application.bootstrap.persistence2 application.market_data.spread_cache3 application.monitoring.health.connection_health_service4 application.monitoring.strategy.strategy_validator5 config6 domain.market.market_regime7 domain.market.strategy_config8 domain.market.timeframe9 domain.risk.risk_appetite10 domain.risk.state11 domain.snn.competitive_network12 infrastructure.i18n.service13 infrastructure.observability.metrics14 application.agents.analyst_config15 application.monitoring.health.agent_status16 domain.risk.optimal_parameters17 domain.trading.types18 application.optimization.core.grid19 application.optimization.core.types20 application.strategies.traits21 application.trading.symbol_context22 domain.ports23 domain.trading.portfolio24 interfaces.ui_components.settings_state25 application.agents.executor26 application.agents.signal_processor27 application.optimization.core.walk_forward28 application.risk_management.core.risk_manager29 domain.repositories30 domain.risk.filters.validator_trait31 application.agents.news_handler32 application.agents.trade_evaluator33 application.optimization.adaptive_optimization_service34 application.agents.candle_pipeline35 application.bootstrap.services36 application.agents.analyst37 application.bootstrap.agents38 application.system39 application.client40 application.agents.user_agentapplication.bootstrap.persistence1application.market_data.spread_cache2application.monitoring.health.connection_health_service3application.monitoring.strategy.strategy_validator4config5domain.market.market_regime6domain.market.strategy_config7domain.market.timeframe8domain.risk.risk_appetite9domain.risk.state10domain.snn.competitive_network11infrastructure.i18n.service12infrastructure.observability.metrics13application.agents.analyst_config14application.monitoring.health.agent_status15domain.risk.optimal_parameters16domain.trading.types17application.optimization.core.grid18application.optimization.core.types19application.strategies.traits20application.trading.symbol_context21domain.ports22domain.trading.portfolio23interfaces.ui_components.settings_state24application.agents.executor25application.agents.signal_processor26application.optimization.core.walk_forward27application.risk_management.core.risk_manager28domain.repositories29domain.risk.filters.validator_trait30application.agents.news_handler31application.agents.trade_evaluator32application.optimization.adaptive_optimization_service33application.agents.candle_pipeline34application.bootstrap.services35application.agents.analyst36application.bootstrap.agents37application.system38application.client39application.agents.user_agent4011131111122231111215111222111211215121122111113111111121121111112111111112111211211111121121111121112221111111112111111+176 more modules (most-connected shown)

At a glance — Code Health · 65% · Adequate · gated by D2, X4 ·

At a glance — Architecture · 84% · Adequate · gated by D26 ·

At a glance — Maturity · 70% · Strong ·

At a glance — Readiness · 54% · Adequate · gated by P7 ·

At a glance — Security · 36% · Weak · gated by C2 ·

At a glance — Domain Modelling · 100% · Exemplary ·

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

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Performance · 82% · 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
A05:2025 — Injection18High / Critical
A03:2025 — Software Supply Chain Failures18High / Critical

Roadmap

First, enforce strict access controls by implementing a global authentication guard with explicit public opt-outs and named role permissions. Second, secure the server's transport by enabling TLS and sending Strict-Transport-Security headers to ensure HTTPS-only communication. Third, improve outbound HTTP resilience by setting request timeouts on all clients and adding retry logic with back-off for transient failures. Finally, enable automated dependency scanning and fix the 469 instances of interpolated logging to restore structured log integrity.

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

Do thisHelpsEffortDimension
Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.+11.8 ptsMediumAccess Controls
Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.+8.4 ptsMediumWeb-Security Posture
Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED.+1.5 ptsLowDependency Vulnerabilities
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.+2.5 ptsMediumOutbound HTTP resilience
Resolve the 6 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (6).+1.0 ptsLowDependency Vulnerabilities
Enable Dependabot/Renovate or a dependency-review gate.+1.8 ptsMediumSecurity & performance tooling
Interpolated log message defeats structured logging+1.6 ptsMediumStructured logging
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.3 ptsMediumRelease Hygiene

File quality

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

FileScoreBandWorst signal
REDACTED2.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED3.0MixedDependency Vulnerabilities: High CVE: REDACTED
src/application/risk_management/core/risk_manager.rs5.6MixedCyclomatic Complexity: RiskManager::run (cyclomatic 31)
src/application/agents/analyst.rs5.7MixedCyclomatic Complexity: Analyst::run (cyclomatic 27)
src/application/strategies/traits.rs6.0Near-cleanExplicit Debt: TodoComment
REDACTED6.9Near-cleanDependency Vulnerabilities: Medium CVE: REDACTED
src/domain/performance/metrics.rs7.0Near-cleanCyclomatic Complexity: PerformanceMetrics::calculate_time_series_metrics_with_benchmark (cyclomatic 20)
src/bin/benchmark.rs7.0Near-cleanCyclomatic Complexity: rustrade::bin::benchmark::main (cyclomatic 48)
src/interfaces/dashboard_components/architecture_view.rs7.0Near-cleanCyclomatic Complexity: rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph (cyclomatic 46)
src/application/optimization/simulator/engine.rs7.0Near-cleanCyclomatic Complexity: Simulator::run_with_multi_bars (cyclomatic 26)
src/domain/snn/competitive_network.rs7.0Near-cleanCyclomatic Complexity: CompetitiveSnnNetwork::backward (cyclomatic 16)
src/application/strategies/smc.rs7.0Near-cleanCyclomatic Complexity: SMCStrategy::analyze (cyclomatic 27)
src/application/optimization/core/walk_forward.rs7.0Near-cleanCyclomatic Complexity: GridSearchOptimizer::generate_combinations (cyclomatic 16)
src/application/benchmarking/engine.rs7.0Near-cleanCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
src/bin/optimize/main.rs7.1Near-cleanCognitive Complexity: rustrade::bin::optimize::main::main (cognitive 25)
src/main.rs7.1Near-cleanCyclomatic Complexity: rustrade::main (cyclomatic 21)
src/infrastructure/alpaca/market_data/historical.rs7.1Near-cleanCyclomatic Complexity: AlpacaMarketDataService::get_historical_bars_internal (cyclomatic 18)
src/infrastructure/alpaca/websocket.rs7.2Near-cleanCyclomatic Complexity: AlpacaWebSocketManager::run_connection (cyclomatic 31)
src/application/bootstrap/agents.rs7.2Near-cleanCyclomatic Complexity: AgentsBootstrap::init (cyclomatic 29)
src/bin/train_surrogate.rs7.2Near-cleanCyclomatic Complexity: rustrade::bin::train_surrogate::main (cyclomatic 20)

How the grades work

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

Critical — 21

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 280

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 73

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

Could not be resolved — 13

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

Methodology & how to trust this report

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

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

What we checked — 66 dimensions across the health lenses
D1D2D3D4D6D9D12D13D14D15D17D19D21D22D26D28D29D30D34D35D37D43D44AX10AX3AX4AX5AX9C2DM1DM4ED4ES1ES2M1M2M3M4P1P10P2P3P6P7PF1PF3S1X1X12X13X14X15X17X19X21X22X23X24X25X26X27X28X29X3X30X4

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, 343 of 374 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a160a7-b457-769f-931a-ed1d0c6c6ec1.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.rs) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.rs) and this repository declares a Cargo test suite (repository root, 129 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-contributor repository — bus factor is not applicable (1 contributor(s) across 228 commit(s) sampled, automation and bot accounts excluded). Concentration needs a team to concentrate: with one contributor there is nobody to spread the knowledge to, so there is nothing here for the owner to act on.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via ToolchainServer (.). the service did not build — `cargo build --locked --bin 'rustrade'` exited 101: 2 Compiling sqlx-macros-core v0.8.6 Compiling anstream v1.0.0 Compiling crossbeam-deque v0.8.6 Compiling simba v0.9.1 Compiling accesskit_winit v0.29.2 Compiling derive_builder v0.20…; runtime evidence skipped (launch chosen because 'axum' dependency in Cargo.toml, binary 'rustrade').
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P8 Schema migrations — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
  • X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala and PHP source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala or PHP was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X4 Structured logging — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 429 further occurrence(s) are not listed individually; the score already reflects all 469.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python, Rust is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: 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 (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

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

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

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

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

35 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was rustrade::bin::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. 2 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/interfaces/ui_components/settings_state.rs (SettingsPanel::apply_persisted_settings at 17), src/infrastructure/persistence/repositories/mod.rs (SqliteOrderRepository::map_rows_to_orders at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

rustrade::bin::benchmark::main (cyclomatic 48) · ×13src/bin/benchmark.rs:232
RiskManager::run (cyclomatic 31) · ×2src/application/risk_management/core/risk_manager.rs:597
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

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

What to do

  1. Bring the 6 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with rustrade::bin::benchmark::main (cyclomatic 48), rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph (cyclomatic 46), rustrade::interfaces::dashboard::render_dashboard (cyclomatic 43). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cyclomatic Complexity from 6.4 to about 7.0/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. 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: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

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

rustrade::bin::benchmark::main (cognitive 174) · ×27src/bin/benchmark.rs:232
AlpacaMarketDataService::get_historical_bars_internal (cognitive 61) · ×4src/infrastructure/alpaca/market_data/historical.rs:255
SMCStrategy::detect_fvg (cognitive 82) · ×3src/application/strategies/smc.rs:49
RiskManager::run (cognitive 67) · ×3src/application/risk_management/core/risk_manager.rs:597
Simulator::run_with_multi_bars (cognitive 50) · ×3src/application/optimization/simulator/engine.rs:322

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

What to do

  1. Bring the 32 bodies over 30 down to 30 or less in Cognitive Complexity — start with rustrade::bin::benchmark::main (cognitive 174), GridSearchOptimizer::generate_combinations (cognitive 108), rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph (cognitive 95). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 32 together lifts Cognitive Complexity from 2.0 to about 5.6/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. 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 Classes6.3 / 10Adequate✓ Tool-verified

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

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

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

51 god class(es) detected.

MethodTooLong: AgentsBootstrap.init · ×25src/application/bootstrap/agents.rs:54
FunctionTooLong: rustrade::interfaces::dashboard::render_dashboard · ×19src/interfaces/dashboard.rs:17
FileTooLong: dashboard_components/architecture_view.rs · ×3src/interfaces/dashboard_components/architecture_view.rs
TooManyFields: StrategyConfig · ×2src/domain/config/strategy_config.rs:33
ClassTooLong: PerformanceMetrics · ×2src/domain/performance/metrics.rs:12

What to do

  1. Resolve the 25 MethodTooLong finding(s) in God Classes — start with engine.rs (3), metrics.rs (3), walk_forward.rs (2). — One of this dimension's main actionable groups (25 warning-level).
  2. Resolve the 19 FunctionTooLong finding(s) in God Classes — start with architecture_view.rs (2), main.rs (2), train_surrogate.rs (2). — One of this dimension's main actionable groups (19 warning-level).
  3. Resolve the 3 FileTooLong finding(s) in God Classes — start with architecture_view.rs, main.rs, benchmark.rs. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.4 / 10Stronggated by 59 serious findings✓ Tool-verified

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

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

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

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

Duplicated block (9 lines × 2) · ×7src/bin/benchmark.rs:234
Duplicated block (13 lines × 2) · ×5src/application/benchmarking/engine.rs:368
Duplicated block (8 lines × 2) · ×4src/application/agents/user_agent/metrics.rs:45
Duplicated block (12 lines × 2) · ×3src/application/risk_management/validation/circuit_breaker_service.rs:66
Duplicated block (11 lines × 2) · ×3src/infrastructure/binance/execution.rs:142

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

What to do

  1. Resolve the 7 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with optimization_history_repository.rs (2), benchmark.rs, optimal_parameters_persistence.rs. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 5 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with engine.rs, genetic.rs, walk_forward.rs. — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 4 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with metrics.rs, competitive_network.rs, optimal_parameters_persistence.rs. — One of this dimension's main actionable groups (4 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

2 of 118 classes have LCOM4 above 3.

Low cohesion: OptimizeReporter (LCOM4 5) · ×2src/application/optimization/reporting.rs:11

What to do

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

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

D9 · Test Distribution9.9 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D12 · Dependency Hygiene9.1 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

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

18 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: anyhow · ×18

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 691 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.5 / 10Stronggated by 16 serious findings✓ Tool-verified

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

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

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

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

Hotspot: src/application/bootstrap/agents.rs · ×16src/application/bootstrap/agents.rs:54

What to do

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

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

D17 · Explicit Debt10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

1 deducted task-comment markers across 49539 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoCommentsrc/application/strategies/traits.rs:290

What to do

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

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

D19 · Documentation QualityExemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's root README is a comprehensive overview of the RustTrade agentic bot with an outstanding architecture and design documentation set. It documents what the project does (a high-performance multi-agent algorithmic trading system), its native desktop interface, and the full feature list plus a detailed roadmap. The scripts/README, specs/, translations/, and docs/ directories each document their own subdirectories (scripts, specifications, translation files, statistical features) without overlapping the root's scope, showing good separation of concerns. The README is well-structured with an overview, key features, a full outline, and cross-references; its only unshown section is clipped by the scanner and must not be flagged as missing.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

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

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyAdequate◐ Sampled · advisory

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

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

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

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

Redundant operations with ambiguous distinction. Both methods accept the same arguments and return the same type. It is unclear if one is a cached lookup and the other forces recalculation, or if they are functionally identical aliases.
Inconsistent naming and signature for pluralization. The method 'release_reservations' (plural intent) accepts a single 'ReservationToken' (singular type), while 'release_reservation' (singular intent) also accepts a single token. This suggests a copy-paste error or missing Vec wrapper.
Ambiguous 'sync' suffix. In Rust, 'sync' often implies thread-safety or blocking behavior. Having two methods that likely return the same data structure ('HashMap') with one marked 'sync' suggests inconsistent handling of interior mutability or locking, or one is a legacy alias.
Inconsistent parameter grouping. 'run_single' takes individual fields (strategy mode, risk score) while 'run_single_with_config' takes a composite 'AnalystConfig'. This forces users to either construct a config or pass primitives, creating two entry points for the same logical operation.

What to do

  1. Resolve the 1 Redundant operations with ambiguous distinction. Both methods accept the… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent naming and signature for pluralization. The method… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Ambiguous 'sync' suffix. In Rust, 'sync' often implies thread-safety or… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

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

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

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

1 of 2 build units (Cargo, Python) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)10.0 / 10Adequategated by 18 critical findings○ Nothing flagged

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

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

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

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

18 finding(s): 0 critical, 18 high, 0 medium, 0 low. 18 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.

REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities6.2 / 10Adequate✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 6 Medium vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 4 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (4 warning-level).

Detailed fixes: d30_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: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 184 of the 270 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.5 / 10Stronggated by 4 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: analyst.rs↔optimizer.rs 81%; analyst.rs↔websocket.rs 73%; optimizer.rs↔mod.rs 69%

Change coupling: optimizer.rs ↔ mod.rs · ×3src/application/optimization/optimizer.rs:1
Change-coupling hub: analyst.rs → sentinel.rs, optimizer.rs, websocket.rssrc/application/agents/analyst.rs

What to do

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

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

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: Documented → Verified → Prevented · 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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 6 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.3 / 10Strong✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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. — src/infrastructure/binance/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.
C2 · Access Controls0.0 / 10Critical✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • This repository serves requests — a server (axum::serve) (src/infrastructure/api/mod.rs:90) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — src/infrastructure/api/mod.rs:90

What to do

  • Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether an aggregate references another aggregate by identity rather than embedding it by object reference.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

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.

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). — src/application/optimization/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 — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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 accuracy6.0 / 10Strong◐ 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.

  • README.md links to `walkthrough.md`, but `walkthrough.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:109
  • specs/README.md names `data_dictionary.md`, but no file or folder `data_dictionary.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — specs/README.md:13

What to do

  • Reconcile the README with reality: README.md links to `walkthrough.md`, but `walkthrough.md` does not exist; specs/README.md names `data_dictionary.md`, but no file or folder `data_dictionary.md` exists.
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 step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.

What to do

  • Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
P10 · Library API & versioning6.0 / 10Strong✓ Tool-verified

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

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

  • 351/396 types (89%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.

What to do

  • Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
P2 · Observability9.0 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
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.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/application/risk_management/core/risk_manager.rs:289
  • `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — src/infrastructure/news/rss.rs:30

What to do

  • Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
PF1 · Benchmark discipline8.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene8.5 / 10Exemplary✓ Tool-verified

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

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

  • `run_parallel` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs. — src/application/optimization/parallel_benchmark.rs:84

What to do

  • Rust: `.await` the future instead of `block_on` (on a Tokio runtime thread it panics outright) and use `tokio::time::sleep(..).await` instead of `std::thread::sleep`; where synchronous code must run, move it to `tokio::task::spawn_blocking` or `block_in_place`.
S1 · Web-Security Posture4.0 / 10Weak✓ Tool-verified

Other · Security — Read from this repository's Rust source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository serves HTTP itself (`axum::serve(` (src/infrastructure/api/mod.rs:90)), so its Rust source was also read for the server controls: TLS served or HSTS set, security response headers, cookie flags and inbound validation — each credited where its Rust spelling appears in production source, not proven on every route. A Rocket 0.5 application is credited the headers Rocket's default `Shield` sends unless it attaches its own, and its cookie jar's SameSite=Strict default; a session middleware its default cookie flags.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).
  • No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).

What to do

  • Secure the server's transport: serve TLS itself (`HttpServer::bind_rustls_0_23(addr, config)` in actix-web, `axum_server::bind_rustls(addr, RustlsConfig::from_pem_file(…))`, tonic's `Server::builder().tls_config(ServerTlsConfig::new().identity(…))`, Rocket's `[default.tls]`), or run it behind a TLS-terminating proxy and check `X-Forwarded-Proto`; send `Strict-Transport-Security` once it is HTTPS-only.
  • Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
  • Validate what the server reads from a request — path, query, headers, body size and shape — and answer what fails with 400 (413 for an oversized body) before a handler acts on it: derive `validator::Validate` (or `garde::Validate`) on the request types and reject with `StatusCode::BAD_REQUEST`, and cap bodies with `DefaultBodyLimit::max`/`RequestBodyLimitLayer` or actix's `JsonConfig::default().limit(…)`.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging2.2 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `error!` at line 93 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:93
  • `error!` at line 102 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:102
  • `error!` at line 123 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:123
  • `error!` at line 133 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:133
  • `error!` at line 140 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:140
  • `info!` at line 181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:181
  • `info!` at line 226 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:226
  • `info!` at line 250 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:250
  • `error!` at line 258 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/main.rs:258
  • `debug!` at line 59 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:59
  • `debug!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:61
  • `info!` at line 110 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:110
  • `info!` at line 129 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:129
  • `debug!` at line 186 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:186
  • `info!` at line 209 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:209
  • `info!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:219
  • `info!` at line 241 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:241
  • `warn!` at line 248 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/warmup_service.rs:248
  • `error!` at line 101 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/user_agent.rs:101
  • `error!` at line 108 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/user_agent.rs:108
  • `debug!` at line 262 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/user_agent.rs:262
  • `debug!` at line 271 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/user_agent.rs:271
  • `debug!` at line 282 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/user_agent.rs:282
  • `info!` at line 134 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/trade_evaluator.rs:134
  • `debug!` at line 82 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:82
  • `debug!` at line 93 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:93
  • `debug!` at line 108 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:108
  • `debug!` at line 143 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:143
  • `debug!` at line 188 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:188
  • `debug!` at line 216 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:216
  • `debug!` at line 277 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/signal_processor.rs:277
  • `info!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:61
  • `error!` at line 75 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:75
  • `info!` at line 88 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:88
  • `error!` at line 106 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:106
  • `error!` at line 112 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:112
  • `error!` at line 136 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:136
  • `warn!` at line 165 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:165
  • `info!` at line 172 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:172
  • `error!` at line 175 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — src/application/agents/sentinel.rs:175

What to do

  • Interpolated log message defeats structured logging

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 Health65%Adequate — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture84%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity70%StrongSolid.
Readiness54%Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security36%Weak — gated by C2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Event-Driven80%ExemplarySolid.
Event Sourcing100%ExemplarySolid.
Performance82%ExemplarySolid.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · 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 published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

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

  • 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
Not included — 57 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written.
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the service did not build — `cargo build --locked --bin 'rustrade'` exited 101: 2 Compiling sqlx-macros-core v0.8.6 Compiling anstream v1.0.0 Compiling crossbeam-deque v0.8.6 Compiling simba v0.9.1 Compiling accesskit_winit v0.29.2 Compiling derive_builder v0.20…; runtime evidence skipped (launch chosen because 'axum' dependency in Cargo.toml, binary 'rustrade') This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~6030 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .rs suite was found but not re-run
  • D16 Bus Factor — single-contributor repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • 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.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (domain), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • 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 — Not applicable — this Cargo build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM2 Strongly-typed ids — no in-repo typed-id idiom — primitive-obsession recorded as advisory DM8, DM2 not gated
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM5 Encapsulated state — this Rust crate declares no type implementing a hand-rolled Hash/PartialEq, so DM5's value-identity encapsulation read has no population to be taken over
  • DM6 Domain ↔ infrastructure boundary — this Rust crate maps no type to a persistence framework (diesel/sea-orm/sqlx), so DM6's domain↔infrastructure fusion read has no population to be taken over
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — sqlx is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • X16 Unfloored truncation loop — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X18 Disposal-pattern correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 21 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: BinanceMarketDataService.get_historical_bars src/infrastructure/binance/market_data.rs:382 — `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.
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×1
  • Dual write (no outbox): AdaptiveOptimizationService.execute_reoptimization src/application/optimization/adaptive_optimization_service.rs:142 — `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).
Serious — 280 finding(s)
D2 · Cognitive Complexity · rustrade · ×27
  • rustrade::bin::benchmark::main (cognitive 174) src/bin/benchmark.rs:232 — rustrade::bin::benchmark::main has cognitive complexity 174 (threshold 15). Drivers by points: if/else 38 (84 pts), loops 14 (59 pts), match/switch 7 (30 pts), 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.
  • rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph (cognitive 95) src/interfaces/dashboard_components/architecture_view.rs:307 — rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph has cognitive complexity 95 (threshold 15). Drivers by points: if/else 43 (72 pts), loops 7 (14 pts), boolean chains 6, match/switch 1 (3 pts) (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.
  • rustrade::interfaces::dashboard::render_dashboard (cognitive 68) src/interfaces/dashboard.rs:17 — rustrade::interfaces::dashboard::render_dashboard has cognitive complexity 68 (threshold 15). Drivers by points: if/else 51 (61 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel (cognitive 67) src/interfaces/dashboard_components/chart_panel.rs:9 — rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (62 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • rustrade::application::ml::derivative_encoding::encode_multi_feature (cognitive 64) src/application/ml/derivative_encoding.rs:60 — rustrade::application::ml::derivative_encoding::encode_multi_feature has cognitive complexity 64 (threshold 15). Drivers by points: if/else 37 (56 pts), 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.
  • rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view (cognitive 51) src/interfaces/dashboard_components/analytics_view.rs:6 — rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (45 pts), loops 2 (6 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • rustrade::domain::performance::calculator::calculate_metrics_from_orders (cognitive 49) src/domain/performance/calculator.rs:15 — rustrade::domain::performance::calculator::calculate_metrics_from_orders has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 4 (13 pts), loops 3 (5 pts), 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.
  • rustrade::main (cognitive 43) src/main.rs:45 — rustrade::main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 7 (15 pts), loops 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::bin::train_surrogate::main (cognitive 38) src/bin/train_surrogate.rs:386 — rustrade::bin::train_surrogate::main has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 4 (8 pts), 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.
  • rustrade::interfaces::settings_components::symbol_selector::render_symbol_selector (cognitive 33) src/interfaces/settings_components/symbol_selector.rs:47 — rustrade::interfaces::settings_components::symbol_selector::render_symbol_selector has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (28 pts), 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.
  • rustrade::interfaces::settings_components::help_about::render_help_tab (cognitive 30) src/interfaces/settings_components/help_about.rs:28 — rustrade::interfaces::settings_components::help_about::render_help_tab has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (26 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel (cognitive 29) src/interfaces/dashboard_components/activity_feed.rs:74 — rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • rustrade::bin::ensemble_optimizer::main (cognitive 28) src/bin/ensemble_optimizer.rs:40 — rustrade::bin::ensemble_optimizer::main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::bin::optimize::main::main (cognitive 25) src/bin/optimize/main.rs:503 — rustrade::bin::optimize::main::main has cognitive complexity 25 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 3 (8 pts), match/switch 5 (8 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • rustrade::infrastructure::api::handle_socket (cognitive 25) src/infrastructure/api/mod.rs:109 — rustrade::infrastructure::api::handle_socket has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (21 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::dashboard_components::architecture_view::render_agent_detail_panel (cognitive 25) src/interfaces/dashboard_components/architecture_view.rs:643 — rustrade::interfaces::dashboard_components::architecture_view::render_agent_detail_panel has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 2 (4 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::application::agents::regime_handler::apply_dynamic_risk_scaling (cognitive 24) src/application/agents/regime_handler.rs:77 — rustrade::application::agents::regime_handler::apply_dynamic_risk_scaling has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • rustrade::bin::optimize::main::run_optimize (cognitive 21) src/bin/optimize/main.rs:205 — rustrade::bin::optimize::main::run_optimize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (4 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::bin::optimize::main::run_clusters (cognitive 21) src/bin/optimize/main.rs:334 — rustrade::bin::optimize::main::run_clusters has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::dashboard_components::symbol_card::render_symbol_card (cognitive 20) src/interfaces/dashboard_components/symbol_card.rs:6 — rustrade::interfaces::dashboard_components::symbol_card::render_symbol_card has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (18 pts), match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • rustrade::application::bootstrap::agents::spawn_adaptive_optimization (cognitive 18) src/application/bootstrap/agents.rs:533 — rustrade::application::bootstrap::agents::spawn_adaptive_optimization has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::dashboard_components::news_feed::render_news_feed (cognitive 17) src/interfaces/dashboard_components/news_feed.rs:5 — rustrade::interfaces::dashboard_components::news_feed::render_news_feed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 2 (6 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::ui_components::settings_view::render_trading_engine_content (cognitive 17) src/interfaces/ui_components/settings_view.rs:182 — rustrade::interfaces::ui_components::settings_view::render_trading_engine_content has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::interfaces::ui_components::settings_view::render_save_button (cognitive 17) src/interfaces/ui_components/settings_view.rs:322 — rustrade::interfaces::ui_components::settings_view::render_save_button has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rustrade::application::agents::position_lifecycle::manage_pending_orders (cognitive 16) src/application/agents/position_lifecycle.rs:28 — rustrade::application::agents::position_lifecycle::manage_pending_orders has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 1 (4 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • + 2 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×25
  • MethodTooLong: AgentsBootstrap.init src/application/bootstrap/agents.rs:54 — MethodTooLong — init runs 287 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Database.init src/infrastructure/persistence/database.rs:49 — MethodTooLong — init runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Simulator.run_with_multi_bars src/application/optimization/simulator/engine.rs:322 — MethodTooLong — run_with_multi_bars runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PerformanceMetrics.calculate_time_series_metrics_with_benchmark src/domain/performance/metrics.rs:92 — MethodTooLong — calculate_time_series_metrics_with_benchmark runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AlpacaExecutionService.new src/infrastructure/alpaca/execution.rs:31 — MethodTooLong — new runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MockExecutionService.execute src/infrastructure/mock/execution_service.rs:76 — MethodTooLong — execute runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ParameterGrid.gene_bounds src/application/optimization/core/grid.rs:54 — MethodTooLong — gene_bounds runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GridSearchOptimizer.generate_combinations src/application/optimization/core/walk_forward.rs:43 — MethodTooLong — generate_combinations runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RiskManager.cmd_handle_proposal src/application/risk_management/core/risk_manager/handler.rs:109 — MethodTooLong — cmd_handle_proposal runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AlpacaMarketDataService.get_historical_bars_internal src/infrastructure/alpaca/market_data/historical.rs:255 — MethodTooLong — get_historical_bars_internal runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: StrategyEnvLoader.from_env src/config/strategy_config.rs:17 — MethodTooLong — from_env runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Sentinel.run src/application/agents/sentinel.rs:58 — MethodTooLong — run runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CompetitiveSnnNetwork.forward src/domain/snn/competitive_network.rs:150 — MethodTooLong — forward runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PerformanceMetrics.calculate_from_equity_curve src/domain/performance/metrics.rs:328 — MethodTooLong — calculate_from_equity_curve runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: RiskManager.run src/application/risk_management/core/risk_manager.rs:597 — MethodTooLong — run runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AlpacaWebSocketManager.run_connection src/infrastructure/alpaca/websocket.rs:300 — MethodTooLong — run_connection runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TechnicalFeatureEngineeringService.update src/application/monitoring/strategy/feature_engineering_service.rs:199 — MethodTooLong — update runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Analyst.run src/application/agents/analyst.rs:183 — MethodTooLong — run runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WarmupService.warmup_context src/application/agents/warmup_service.rs:86 — MethodTooLong — warmup_context runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Simulator.run_with_bars src/application/optimization/simulator/engine.rs:166 — MethodTooLong — run_with_bars runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Metrics.new src/infrastructure/observability/metrics.rs:53 — MethodTooLong — new runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CompetitiveSnnNetwork.backward src/domain/snn/competitive_network.rs:344 — MethodTooLong — backward runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Simulator.run_simulation_core src/application/optimization/simulator/engine.rs:17 — MethodTooLong — run_simulation_core runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ServiceFactory.create_services src/infrastructure/factory.rs:18 — MethodTooLong — create_services runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GridSearchOptimizer.run_optimization src/application/optimization/core/walk_forward.rs:276 — MethodTooLong — run_optimization runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · FunctionTooLong · ×19
  • FunctionTooLong: rustrade::interfaces::dashboard::render_dashboard src/interfaces/dashboard.rs:17 — FunctionTooLong — rustrade::interfaces::dashboard::render_dashboard runs 433 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 333 over it, 4.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::bin::benchmark::main src/bin/benchmark.rs:232 — FunctionTooLong — rustrade::bin::benchmark::main runs 348 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 248 over it, 3.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph src/interfaces/dashboard_components/architecture_view.rs:307 — FunctionTooLong — rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph runs 237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::bin::optimize::main::main src/bin/optimize/main.rs:503 — FunctionTooLong — rustrade::bin::optimize::main::main runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::bin::train_surrogate::main src/bin/train_surrogate.rs:386 — FunctionTooLong — rustrade::bin::train_surrogate::main runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::settings_components::strategy_settings::render_strategy_settings src/interfaces/settings_components/strategy_settings.rs:68 — FunctionTooLong — rustrade::interfaces::settings_components::strategy_settings::render_strategy_settings runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::main src/main.rs:45 — FunctionTooLong — rustrade::main runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::architecture_view::render_agent_detail_panel src/interfaces/dashboard_components/architecture_view.rs:643 — FunctionTooLong — rustrade::interfaces::dashboard_components::architecture_view::render_agent_detail_panel runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::settings_components::symbol_selector::render_symbol_selector src/interfaces/settings_components/symbol_selector.rs:47 — FunctionTooLong — rustrade::interfaces::settings_components::symbol_selector::render_symbol_selector runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::settings_components::help_about::render_help_tab src/interfaces/settings_components/help_about.rs:28 — FunctionTooLong — rustrade::interfaces::settings_components::help_about::render_help_tab runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::symbol_card::render_symbol_card src/interfaces/dashboard_components/symbol_card.rs:6 — FunctionTooLong — rustrade::interfaces::dashboard_components::symbol_card::render_symbol_card runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::settings_components::risk_settings::render_risk_settings src/interfaces/settings_components/risk_settings.rs:14 — FunctionTooLong — rustrade::interfaces::settings_components::risk_settings::render_risk_settings runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view src/interfaces/dashboard_components/analytics_view.rs:6 — FunctionTooLong — rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel src/interfaces/dashboard_components/chart_panel.rs:9 — FunctionTooLong — rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::bin::train_surrogate::fetch_and_encode_data src/bin/train_surrogate.rs:167 — FunctionTooLong — rustrade::bin::train_surrogate::fetch_and_encode_data runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::bin::ensemble_optimizer::main src/bin/ensemble_optimizer.rs:40 — FunctionTooLong — rustrade::bin::ensemble_optimizer::main runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel src/interfaces/dashboard_components/activity_feed.rs:74 — FunctionTooLong — rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::application::ml::derivative_encoding::encode_multi_feature src/application/ml/derivative_encoding.rs:60 — FunctionTooLong — rustrade::application::ml::derivative_encoding::encode_multi_feature runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rustrade::application::optimization::core::grid::decode_genome src/application/optimization/core/grid.rs:228 — FunctionTooLong — rustrade::application::optimization::core::grid::decode_genome runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D15 · Churn × Complexity Hotspots · Hotspot · ×16
  • Hotspot: src/application/bootstrap/agents.rs src/application/bootstrap/agents.rs:54 — src/application/bootstrap/agents.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in AgentsBootstrap::init at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/application/bootstrap/agents.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/bin/benchmark.rs src/bin/benchmark.rs:232 — src/bin/benchmark.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in rustrade::bin::benchmark::main at line 232. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/bin/benchmark.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/dashboard.rs src/interfaces/dashboard.rs:17 — src/interfaces/dashboard.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in rustrade::interfaces::dashboard::render_dashboard at line 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/dashboard.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/dashboard_components/architecture_view.rs src/interfaces/dashboard_components/architecture_view.rs:307 — src/interfaces/dashboard_components/architecture_view.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph at line 307. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/dashboard_components/architecture_view.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/main.rs src/main.rs:45 — src/main.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in rustrade::main at line 45. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/application/agents/analyst.rs src/application/agents/analyst.rs:183 — src/application/agents/analyst.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in Analyst::run at line 183. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/application/agents/analyst.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/application/agents/user_agent.rs src/application/agents/user_agent.rs:230 — src/application/agents/user_agent.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in UserAgent::update at line 230. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/application/agents/user_agent.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/application/optimization/core/walk_forward.rs src/application/optimization/core/walk_forward.rs:43 — src/application/optimization/core/walk_forward.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in GridSearchOptimizer::generate_combinations at line 43. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/application/optimization/core/walk_forward.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/infrastructure/alpaca/websocket.rs src/infrastructure/alpaca/websocket.rs:300 — src/infrastructure/alpaca/websocket.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AlpacaWebSocketManager::run_connection at line 300. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/infrastructure/alpaca/websocket.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/ui_components/settings_state.rs src/interfaces/ui_components/settings_state.rs:131 — src/interfaces/ui_components/settings_state.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in SettingsPanel::apply_persisted_settings at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/ui_components/settings_state.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/infrastructure/persistence/repositories/mod.rs src/infrastructure/persistence/repositories/mod.rs:112 — src/infrastructure/persistence/repositories/mod.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SqliteOrderRepository::map_rows_to_orders at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/infrastructure/persistence/repositories/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/application/agents/executor.rs src/application/agents/executor.rs:119 — src/application/agents/executor.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Executor::handle_order at line 119. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/application/agents/executor.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/dashboard_components/chart_panel.rs src/interfaces/dashboard_components/chart_panel.rs:9 — src/interfaces/dashboard_components/chart_panel.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel at line 9. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/dashboard_components/chart_panel.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/dashboard_components/analytics_view.rs src/interfaces/dashboard_components/analytics_view.rs:6 — src/interfaces/dashboard_components/analytics_view.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/dashboard_components/analytics_view.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/domain/performance/metrics.rs src/domain/performance/metrics.rs:328 — src/domain/performance/metrics.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in PerformanceMetrics::calculate_from_equity_curve at line 328. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/domain/performance/metrics.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/interfaces/dashboard_components/symbol_card.rs src/interfaces/dashboard_components/symbol_card.rs:6 — src/interfaces/dashboard_components/symbol_card.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in rustrade::interfaces::dashboard_components::symbol_card::render_symbol_card at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-03-16..2026-06-14, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-03-16 00:01:58 +02:00' --until='2026-06-14 00:01:58 +02:00' --full-history --no-merges -- src/interfaces/dashboard_components/symbol_card.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D1 · Cyclomatic Complexity · rustrade · ×13
  • rustrade::bin::benchmark::main (cyclomatic 48) src/bin/benchmark.rs:232 — rustrade::bin::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.
  • rustrade::interfaces::dashboard_components::architecture_view::render_agent_graph (cyclomatic 46) src/interfaces/dashboard_components/architecture_view.rs:307 — rustrade::interfaces::dashboard_components::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.
  • rustrade::interfaces::dashboard::render_dashboard (cyclomatic 43) src/interfaces/dashboard.rs:17 — rustrade::interfaces::dashboard::render_dashboard has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • rustrade::application::ml::derivative_encoding::encode_multi_feature (cyclomatic 36) src/application/ml/derivative_encoding.rs:60 — rustrade::application::ml::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.
  • rustrade::domain::performance::calculator::calculate_metrics_from_orders (cyclomatic 22) src/domain/performance/calculator.rs:15 — rustrade::domain::performance::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.
  • rustrade::interfaces::settings_components::symbol_selector::render_symbol_selector (cyclomatic 21) src/interfaces/settings_components/symbol_selector.rs:47 — rustrade::interfaces::settings_components::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.
  • rustrade::main (cyclomatic 21) src/main.rs:45 — rustrade::main 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.
  • rustrade::bin::train_surrogate::main (cyclomatic 20) src/bin/train_surrogate.rs:386 — rustrade::bin::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.
  • rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel (cyclomatic 20) src/interfaces/dashboard_components/activity_feed.rs:74 — rustrade::interfaces::dashboard_components::activity_feed::render_logs_panel has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • rustrade::interfaces::dashboard_components::chart_panel::render_chart_panel (cyclomatic 18) src/interfaces/dashboard_components/chart_panel.rs:9 — rustrade::interfaces::dashboard_components::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.
  • rustrade::interfaces::dashboard_components::analytics_view::render_analytics_view (cyclomatic 17) src/interfaces/dashboard_components/analytics_view.rs:6 — rustrade::interfaces::dashboard_components::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.
  • rustrade::bin::ensemble_optimizer::main (cyclomatic 16) src/bin/ensemble_optimizer.rs:40 — rustrade::bin::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.
  • rustrade::interfaces::dashboard_components::architecture_view::render_agent_detail_panel (cyclomatic 16) src/interfaces/dashboard_components/architecture_view.rs:643 — rustrade::interfaces::dashboard_components::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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×7
  • Duplicated block (9 lines × 2) src/bin/benchmark.rs:234 — src/bin/benchmark.rs:234-242 | src/bin/train_gen.rs:41-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/infrastructure/optimal_parameters_persistence.rs:59 — src/infrastructure/optimal_parameters_persistence.rs:59-67 | src/infrastructure/settings_persistence.rs:89-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/main.rs:190 — src/main.rs:190-200 | src/main.rs:235-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/infrastructure/binance/execution.rs:248 — src/infrastructure/binance/execution.rs:248-256 | src/infrastructure/binance/market_data.rs:243-251 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/infrastructure/persistence/repositories/optimization_history_repository.rs:95 — src/infrastructure/persistence/repositories/optimization_history_repository.rs:95-103 | src/infrastructure/persistence/repositories/performance_snapshot_repository.rs:90-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/infrastructure/persistence/repositories/optimization_history_repository.rs:57 — src/infrastructure/persistence/repositories/optimization_history_repository.rs:57-65 | src/infrastructure/persistence/repositories/performance_snapshot_repository.rs:54-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/interfaces/dashboard_components/architecture_view.rs:269 — src/interfaces/dashboard_components/architecture_view.rs:269-277 | src/interfaces/dashboard_components/architecture_view.rs:286-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) src/application/benchmarking/engine.rs:368 — src/application/benchmarking/engine.rs:368-380 | src/bin/ensemble_optimizer.rs:290-302 — before extracting anything, compare `src/application/benchmarking/engine.rs` and `src/bin/ensemble_optimizer.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) src/application/optimization/core/genetic.rs:61 — src/application/optimization/core/genetic.rs:61-73 | src/application/optimization/core/walk_forward.rs:286-298 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) src/application/optimization/core/walk_forward.rs:261 — src/application/optimization/core/walk_forward.rs:261-273 | src/application/optimization/core/walk_forward.rs:415-427 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/bin/benchmark.rs:214 — src/bin/benchmark.rs:214-226 | src/bin/train_gen.rs:77-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) src/main.rs:176 — src/main.rs:176-188 | src/main.rs:221-233 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · 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 10 (33 pts), loops 3 (17 pts), match/switch 3 (9 pts), boolean chains 2 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • 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 5 (14 pts), loops 2 (3 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 14 (18 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • 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 8 (13 pts), 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×4
  • Duplicated block (8 lines × 2) src/application/agents/user_agent/metrics.rs:45 — src/application/agents/user_agent/metrics.rs:45-52 | src/application/agents/user_agent/metrics.rs:56-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/domain/snn/competitive_network.rs:431 — src/domain/snn/competitive_network.rs:431-438 | src/domain/snn/izhikevich_diff.rs:347-355 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/infrastructure/optimal_parameters_persistence.rs:23 — src/infrastructure/optimal_parameters_persistence.rs:23-30 | src/infrastructure/settings_persistence.rs:55-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/config/risk_env_config.rs:40 — src/config/risk_env_config.rs:40-47 | src/config/strategy_config.rs:22-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
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 21 (71 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 56). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • SMCStrategy::analyze (cognitive 75) src/application/strategies/smc.rs:347 — SMCStrategy::analyze has cognitive complexity 75 (threshold 15). Drivers by points: if/else 27 (65 pts), boolean chains 8, match/switch 1 (2 pts) (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 7 (17 pts), loops 2 (4 pts), 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 · RiskManager · ×3
  • RiskManager::run (cognitive 67) src/application/risk_management/core/risk_manager.rs:597 — RiskManager::run has cognitive complexity 67 (threshold 15). Drivers by points: if/else 25 (58 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 18 (24 pts), match/switch 4 (13 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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 12 (26 pts), if/else 15 (22 pts), 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 15 (21 pts), loops 5 (8 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 11 (22 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 10 (30 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • 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 15 (22 pts), 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 15 (25 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: dashboard_components/architecture_view.rs src/interfaces/dashboard_components/architecture_view.rs — 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). The bar is 500 significant lines; this is 162 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: optimize/main.rs src/bin/optimize/main.rs — FileTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 65 over it, 1.13× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: bin/benchmark.rs src/bin/benchmark.rs — FileTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 3 over it, 1.01× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change coupling · ×3
  • Change coupling: optimizer.rs ↔ mod.rs src/application/optimization/optimizer.rs:1 — `src/application/optimization/optimizer.rs` and `src/application/system/mod.rs` change together 69% of the time (11 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `2884554c` fix: add -100% return floor, circuit breaker, tune RiskAppetite (at that commit the file was still `src/application/system.rs`); `4fc9a11b` feat: Release v0.61.0 - Dynamic Risk Scaling & UI Icon Fixes (at that commit the file was still `src/application/system.rs`); `96151271` feat(strategies): Add VWAP, Breakout, Momentum, Ensemble strategies a… (at that commit the file was still `src/application/system.rs`) — run `git show` on any of them.
  • Change coupling: mod.rs ↔ execution_service.rs src/application/system/mod.rs:1 — `src/application/system/mod.rs` and `src/infrastructure/mock/execution_service.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `9a6c7c12` feat: Implement emergency shutdown with optional portfolio flattening… (at that commit the file was still `src/infrastructure/mock.rs`); `9c798771` feat(risk): Release v0.85.1 - Safe Portfolio Initialization & False D… (at that commit the files were still `src/application/system.rs` and `src/infrastructure/mock.rs`); `4358bfae` feat(v0.31.0): Incremental Candle Loading Optimization (at that commit the files were still `src/application/system.rs` and `src/infrastructure/mock.rs`) — run `git show` on any of them.
  • Change coupling: risk_manager.rs ↔ execution_service.rs src/application/risk_management/core/risk_manager.rs:1 — `src/application/risk_management/core/risk_manager.rs` and `src/infrastructure/mock/execution_service.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `9a6c7c12` feat: Implement emergency shutdown with optional portfolio flattening… (at that commit the files were still `src/application/risk_management/risk_manager.rs` and `src/infrastructure/mock.rs`); `9c798771` feat(risk): Release v0.85.1 - Safe Portfolio Initialization & False D… (at that commit the files were still `src/application/risk_management/risk_manager.rs` and `src/infrastructure/mock.rs`); `796af09e` fix: critical volume data ingestion flaw (at that commit the files were still `src/application/risk_management/risk_manager.rs` and `src/infrastructure/mock.rs`) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) src/application/risk_management/validation/circuit_breaker_service.rs:66 — src/application/risk_management/validation/circuit_breaker_service.rs:66-77 | src/application/risk_management/validation/circuit_breaker_service.rs:97-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/application/strategies/snn_surrogate_strategy.rs:147 — src/application/strategies/snn_surrogate_strategy.rs:147-158 | src/application/strategies/snn_surrogate_strategy.rs:183-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/domain/performance/metrics.rs:208 — src/domain/performance/metrics.rs:208-219 | src/domain/performance/metrics.rs:374-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×3
  • Duplicated block (11 lines × 2) src/infrastructure/binance/execution.rs:142 — src/infrastructure/binance/execution.rs:142-152 | src/infrastructure/binance/execution.rs:222-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/infrastructure/binance/market_data.rs:370 — src/infrastructure/binance/market_data.rs:370-380 | src/infrastructure/binance/market_data.rs:522-532 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/infrastructure/persistence/repositories/performance_snapshot_repository.rs:60 — src/infrastructure/persistence/repositories/performance_snapshot_repository.rs:60-70 | src/infrastructure/persistence/repositories/performance_snapshot_repository.rs:98-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×3
  • Duplicated block (10 lines × 2) src/application/strategies/order_flow.rs:64 — src/application/strategies/order_flow.rs:64-73 | src/application/strategies/order_flow.rs:125-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/application/strategies/order_flow.rs:84 — src/application/strategies/order_flow.rs:84-93 | src/application/strategies/order_flow.rs:145-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/infrastructure/binance/execution.rs:324 — src/infrastructure/binance/execution.rs:324-333 | src/infrastructure/binance/execution.rs:365-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×3
  • Duplicated block (7 lines × 2) src/domain/performance/metrics.rs:283 — src/domain/performance/metrics.rs:283-289 | src/domain/performance/metrics.rs:446-452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/infrastructure/mock/execution_service.rs:150 — src/infrastructure/mock/execution_service.rs:150-156 | src/infrastructure/mock/execution_service.rs:167-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/application/agents/user_agent.rs:99 — src/application/agents/user_agent.rs:99-105 | src/interfaces/ui_components/settings_view.rs:382-389 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) src/application/optimization/core/walk_forward.rs:311 — src/application/optimization/core/walk_forward.rs:311-316 | src/application/optimization/core/walk_forward.rs:370-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/bin/benchmark.rs:202 — src/bin/benchmark.rs:202-207 | src/bin/optimize/main.rs:474-479 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/config/risk_env_config.rs:154 — src/config/risk_env_config.rs:154-159 | src/config/strategy_config.rs:173-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D1 · Cyclomatic Complexity · RiskManager · ×2
  • RiskManager::run (cyclomatic 31) src/application/risk_management/core/risk_manager.rs:597 — RiskManager::run has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • 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 · 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 14 (105 pts), if/else 1 (3 pts) (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 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AlpacaWebSocketManager · ×2
  • AlpacaWebSocketManager::run_connection (cognitive 77) src/infrastructure/alpaca/websocket.rs:300 — AlpacaWebSocketManager::run_connection has cognitive complexity 77 (threshold 15). Drivers by points: if/else 14 (55 pts), match/switch 4 (14 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 9 (18 pts), match/switch 1 (2 pts), 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 · Analyst · ×2
  • Analyst::run (cognitive 69) src/application/agents/analyst.rs:183 — Analyst::run has cognitive complexity 69 (threshold 15). Drivers by points: if/else 12 (42 pts), match/switch 7 (21 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • 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 5 (10 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 26 (29 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • 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 22 (23 pts), 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 13 (30 pts), if/else 2 (4 pts) (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 6 (12 pts), loops 7 (11 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 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 10 (23 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • 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 11 (20 pts), 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 7 (18 pts), 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 6 (16 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: StrategyConfig src/domain/config/strategy_config.rs:33 — TooManyFields — 59 stored fields beside 3 methods. The bar is 30 stored fields; this is 29 over it, 1.97× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: AnalysisContext src/application/strategies/traits.rs:35 — TooManyFields — 31 stored fields beside 4 methods. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D3 · God Classes · ClassTooLong · ×2
  • ClassTooLong: PerformanceMetrics src/domain/performance/metrics.rs:12 — ClassTooLong — 443 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 10 methods, 2 blocks, lines 12-678. The bar is 400 significant lines; this is 43 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RiskManager src/application/risk_management/core/risk_manager.rs:67 — ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 2 blocks, lines 67-813. The bar is 400 significant lines; this is 29 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×2
  • Duplicated block (5 lines × 2) src/bin/train_gen.rs:64 — src/bin/train_gen.rs:64-68 | src/bin/train_surrogate.rs:170-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) src/domain/snn/competitive_network.rs:117 — src/domain/snn/competitive_network.rs:117-121 | src/domain/snn/izhikevich_diff.rs:151-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) src/bin/optimize/main.rs:303 — src/bin/optimize/main.rs:303-316 | src/bin/optimize/main.rs:432-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/application/strategies/smc.rs:384 — src/application/strategies/smc.rs:384-397 | src/application/strategies/smc.rs:458-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: OptimizeReporter (LCOM4 5) src/application/optimization/reporting.rs:11 — OptimizeReporter's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TradeFilter (LCOM4 4) src/application/trading/trade_filter.rs:10 — TradeFilter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience src/application/risk_management/core/risk_manager.rs:289 — `reqwest::Client::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/infrastructure/news/rss.rs:30 — `Client::new()` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
C2 · Access Controls · No authorization · ×1
  • No authorization src/infrastructure/api/mod.rs:90 — This repository serves requests — a server (axum::serve) (src/infrastructure/api/mod.rs:90) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected.
D1 · Cyclomatic Complexity · AlpacaWebSocketManager · ×1
  • AlpacaWebSocketManager::run_connection (cyclomatic 31) src/infrastructure/alpaca/websocket.rs:300 — AlpacaWebSocketManager::run_connection has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sentinel · ×1
  • Sentinel::run (cyclomatic 29) src/application/agents/sentinel.rs:58 — Sentinel::run has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentsBootstrap · ×1
  • AgentsBootstrap::init (cyclomatic 29) src/application/bootstrap/agents.rs:54 — AgentsBootstrap::init has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Analyst · ×1
  • Analyst::run (cyclomatic 27) src/application/agents/analyst.rs:183 — Analyst::run has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
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, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · 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 · 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 · SnnSurrogateStrategy · ×1
  • SnnSurrogateStrategy::prepare_rolling_window (cyclomatic 17) src/application/strategies/snn_surrogate_strategy.rs:85 — SnnSurrogateStrategy::prepare_rolling_window 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 · 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 · 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 · 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.
D17 · Explicit Debt · TodoComment · ×1
  • TodoComment src/application/strategies/traits.rs:290 — /// TODO(Phase 3): Implement R-STDP or RL weight updates using this feedback. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · Sentinel · ×1
  • Sentinel::run (cognitive 81) src/application/agents/sentinel.rs:58 — Sentinel::run has cognitive complexity 81 (threshold 15). Drivers by points: if/else 12 (41 pts), match/switch 10 (35 pts), loops 2 (4 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · RssNewsService · ×1
  • RssNewsService::subscribe_news (cognitive 56) src/infrastructure/news/rss.rs:41 — RssNewsService::subscribe_news has cognitive complexity 56 (threshold 15). Drivers by points: if/else 6 (32 pts), match/switch 4 (14 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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 44) src/application/bootstrap/agents.rs:54 — AgentsBootstrap::init has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (27 pts), match/switch 9 (10 pts), loops 3 (4 pts), boolean chains 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.
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 22 (36 pts), loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListenerAgent · ×1
  • ListenerAgent::run (cognitive 37) src/application/agents/listener.rs:64 — ListenerAgent::run has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 4 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 21 (35 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarketScanner · ×1
  • MarketScanner::run (cognitive 33) src/application/agents/scanner.rs:36 — MarketScanner::run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 3 (8 pts), loops 2 (6 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnnSurrogateStrategy · ×1
  • SnnSurrogateStrategy::prepare_rolling_window (cognitive 31) src/application/strategies/snn_surrogate_strategy.rs:85 — SnnSurrogateStrategy::prepare_rolling_window has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 11 (23 pts), loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare_strategies.main (cognitive 30) · ×1
  • compare_strategies.main (cognitive 30) scripts/compare_strategies.py:57 — compare_strategies.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 7 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 11 (22 pts), match/switch 2 (4 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 12 (21 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 18 (27 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AnalysisContext · ×1
  • AnalysisContext::multi_timeframe_trend_strength (cognitive 27) src/application/strategies/traits.rs:190 — AnalysisContext::multi_timeframe_trend_strength has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (26 pts), 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 · 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 3 (13 pts), loops 3 (7 pts), match/switch 2 (5 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
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 6 (14 pts), match/switch 3 (6 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AlpacaTradingStream · ×1
  • AlpacaTradingStream::run_connection (cognitive 23) src/infrastructure/alpaca/trading_stream.rs:141 — AlpacaTradingStream::run_connection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 3 (10 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 11 (21 pts), 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 19 (20 pts), 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 · 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 5 (13 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 12 (17 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 7 (14 pts), 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 13 (16 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
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 7 (13 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
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 6 (10 pts), if/else 4 (8 pts) (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 5 (12 pts), if/else 2 (6 pts) (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 · 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 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
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 12 (15 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
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 6 (10 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency · Redundant operations with ambiguous distinction. Both methods accept the same arguments and return the same type. It is unclear if one is a cached lookup and the other forces recalculation, or if they are functionally identical aliases. · ×1
  • Redundant operations with ambiguous distinction. Both methods accept the same arguments and return the same type. It is unclear if one is a cached lookup and the other forces recalculation, or if they are functionally identical aliases. — Remove one method. If 'refresh' implies updating a cache and 'calculate' implies a fresh computation, rename to 'get_cached_or_refresh' and 'force_recalculate' respectively, or consolidate into a single 'update_matrix' method. (signatures: CorrelationService.refresh_correlation_matrix(symbols: &[String]): Result | CorrelationService.calculate_correlation_matrix(symbols: &[String]): Result)
D22 · Internal API Consistency · Inconsistent naming and signature for pluralization. The method 'release_reservations' (plural intent) accepts a single 'ReservationToken' (singular type), while 'release_reservation' (singular intent) also accepts a single token. This suggests a copy-paste error or missing Vec wrapper. · ×1
  • Inconsistent naming and signature for pluralization. The method 'release_reservations' (plural intent) accepts a single 'ReservationToken' (singular type), while 'release_reservation' (singular intent) also accepts a single token. This suggests a copy-paste error or missing Vec wrapper. — Rename 'release_reservations' to 'release_reservations(tokens: Vec<ReservationToken>)' to match the plural name, or rename both to 'release_reservation' if only single-token release is supported. (signatures: PortfolioStateManager.release_reservation(token: ReservationToken) | PortfolioStateManager.release_reservations(tokens: ReservationToken))
D22 · Internal API Consistency · Ambiguous 'sync' suffix. In Rust, 'sync' often implies thread-safety or blocking behavior. Having two methods that likely return the same data structure ('HashMap') with one marked 'sync' suggests inconsistent handling of interior mutability or locking, or one is a legacy alias. · ×1
  • Ambiguous 'sync' suffix. In Rust, 'sync' often implies thread-safety or blocking behavior. Having two methods that likely return the same data structure ('HashMap') with one marked 'sync' suggests inconsistent handling of interior mutability or locking, or one is a legacy alias. — Clarify the difference. If one is blocking and the other is non-blocking, use names like 'get_all_blocking' and 'get_all_non_blocking'. If they are identical, remove one. (signatures: AgentStatusRegistry.get_all(): HashMap | AgentStatusRegistry.get_all_sync(): HashMap)
D22 · Internal API Consistency · Inconsistent parameter grouping. 'run_single' takes individual fields (strategy mode, risk score) while 'run_single_with_config' takes a composite 'AnalystConfig'. This forces users to either construct a config or pass primitives, creating two entry points for the same logical operation. · ×1
  • Inconsistent parameter grouping. 'run_single' takes individual fields (strategy mode, risk score) while 'run_single_with_config' takes a composite 'AnalystConfig'. This forces users to either construct a config or pass primitives, creating two entry points for the same logical operation. — Standardize on one signature. Prefer 'run_single_with_config' for flexibility, or ensure 'run_single' internally constructs the config consistently. Consider removing 'run_single' if 'AnalystConfig' is the canonical way to define a run. (signatures: BenchmarkEngine.run_single(symbol: str, start: DateTime, end: DateTime, strategy: StrategyMode, risk_score: u8, timeframe: str): Result | BenchmarkEngine.run_single_with_config(symbol: str, start: DateTime, end: DateTime, config: AnalystConfig, timeframe: str): Result)
D35 · Change Coupling · Change-coupling hub · ×1
  • Change-coupling hub: analyst.rs → sentinel.rs, optimizer.rs, websocket.rs src/application/agents/analyst.rs — `src/application/agents/analyst.rs` changes together with 3 other files — `src/application/agents/sentinel.rs`, `src/application/optimization/optimizer.rs`, `src/infrastructure/alpaca/websocket.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (127 shared lines) · ×1
  • Near-duplicate member pair (127 shared lines) src/domain/performance/metrics.rs:97 — src/domain/performance/metrics.rs:97-324 | src/domain/performance/metrics.rs:332-487 — These two members are variants of one another: 127 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/application/benchmarking/engine.rs:367 — src/application/benchmarking/engine.rs:367-399 | src/application/optimization/core/walk_forward.rs:432-490 | src/application/optimization/simulator/result.rs:17-51 | src/bin/ensemble_optimizer.rs:289-321 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (36–38 lines × 2) · ×1
  • Duplicated block (36–38 lines × 2) src/application/benchmarking/engine.rs:275 — src/application/benchmarking/engine.rs:275-310 | src/application/benchmarking/engine.rs:323-360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) src/domain/performance/metrics.rs:293 — src/domain/performance/metrics.rs:293-324 | src/domain/performance/metrics.rs:456-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) src/domain/performance/metrics.rs:221 — src/domain/performance/metrics.rs:221-250 | src/domain/performance/metrics.rs:387-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) src/application/strategies/smc.rs:76 — src/application/strategies/smc.rs:76-102 | src/application/strategies/smc.rs:129-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) src/bin/benchmark.rs:354 — src/bin/benchmark.rs:354-379 | src/bin/benchmark.rs:479-505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) src/domain/performance/metrics.rs:183 — src/domain/performance/metrics.rs:183-206 | src/domain/performance/metrics.rs:349-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) src/domain/risk/risk_config.rs:122 — src/domain/risk/risk_config.rs:122-144 | src/domain/risk/risk_config.rs:150-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) src/domain/performance/metrics.rs:253 — src/domain/performance/metrics.rs:253-274 | src/domain/performance/metrics.rs:420-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) src/bin/benchmark.rs:320 — src/bin/benchmark.rs:320-335 | src/bin/benchmark.rs:421-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) src/domain/ml/feature_registry.rs:30 — src/domain/ml/feature_registry.rs:30-49 | src/domain/ml/feature_registry.rs:57-76 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) src/application/benchmarking/engine.rs:383 — src/application/benchmarking/engine.rs:383-399 | src/bin/ensemble_optimizer.rs:305-321 — before extracting anything, compare `src/application/benchmarking/engine.rs` and `src/bin/ensemble_optimizer.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) src/interfaces/dashboard_components/architecture_view.rs:397 — src/interfaces/dashboard_components/architecture_view.rs:397-413 | src/interfaces/dashboard_components/architecture_view.rs:424-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) src/application/benchmarking/engine.rs:382 — src/application/benchmarking/engine.rs:382-397 | src/application/optimization/core/walk_forward.rs:450-465 | src/bin/ensemble_optimizer.rs:304-319 — before extracting anything, compare `src/application/benchmarking/engine.rs` and `src/bin/ensemble_optimizer.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–15 lines × 3) · ×1
  • Duplicated block (11–15 lines × 3) src/application/benchmarking/engine.rs:63 — src/application/benchmarking/engine.rs:63-77 | src/application/benchmarking/engine.rs:106-119 | src/application/benchmarking/engine.rs:202-212 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) src/application/market_data/timeframe_aggregator.rs:79 — src/application/market_data/timeframe_aggregator.rs:79-90 | src/application/market_data/timeframe_aggregator.rs:93-105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) src/domain/performance/metrics.rs:152 — src/domain/performance/metrics.rs:152-163 | src/domain/performance/metrics.rs:531-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) src/application/benchmarking/engine.rs:382 — src/application/benchmarking/engine.rs:382-392 | src/application/optimization/core/walk_forward.rs:450-460 | src/application/optimization/simulator/result.rs:35-45 | src/bin/ensemble_optimizer.rs:304-314 — before extracting anything, compare `src/application/benchmarking/engine.rs` and `src/bin/ensemble_optimizer.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) src/application/benchmarking/reporting.rs:243 — src/application/benchmarking/reporting.rs:243-249 | src/application/benchmarking/reporting.rs:316-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/domain/snn/competitive_network.rs:424 — src/domain/snn/competitive_network.rs:424-429 | src/domain/snn/competitive_network.rs:430-435 | src/domain/snn/izhikevich_diff.rs:346-351 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) src/infrastructure/alpaca/execution.rs:393 — src/infrastructure/alpaca/execution.rs:393-402 | src/infrastructure/alpaca/execution.rs:511-520 | src/infrastructure/alpaca/execution.rs:576-587 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) src/infrastructure/alpaca/execution.rs:396 — src/infrastructure/alpaca/execution.rs:396-403 | src/infrastructure/alpaca/execution.rs:492-499 | src/infrastructure/alpaca/execution.rs:514-521 | src/infrastructure/alpaca/execution.rs:581-588 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×1
  • Duplicated block (27–28 lines × 2) scripts/compare_strategies.py:28 — scripts/compare_strategies.py:28-54 | scripts/validate_risk_filter.py:29-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking src/application/optimization/parallel_benchmark.rs:84 — `run_parallel` is async and calls block_on — a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs.
Minor — 55 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging src/main.rs:93 — `error!` at line 93 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:102 — `error!` at line 102 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:123 — `error!` at line 123 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:133 — `error!` at line 133 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:140 — `error!` at line 140 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:181 — `info!` at line 181 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:226 — `info!` at line 226 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:250 — `info!` at line 250 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/main.rs:258 — `error!` at line 258 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:59 — `debug!` at line 59 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:61 — `debug!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:110 — `info!` at line 110 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:129 — `info!` at line 129 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:186 — `debug!` at line 186 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:209 — `info!` at line 209 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:219 — `info!` at line 219 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:241 — `info!` at line 241 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/warmup_service.rs:248 — `warn!` at line 248 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/user_agent.rs:101 — `error!` at line 101 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/user_agent.rs:108 — `error!` at line 108 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/user_agent.rs:262 — `debug!` at line 262 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/user_agent.rs:271 — `debug!` at line 271 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/user_agent.rs:282 — `debug!` at line 282 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/trade_evaluator.rs:134 — `info!` at line 134 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging src/application/agents/signal_processor.rs:82 — `debug!` at line 82 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×3
  • Silent fallback default on Err src/application/agents/user_agent/metrics.rs:206 — `get_performance_metrics` turns every `Err` into `crate::domain::performance::metrics::PerformanceMetrics::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/application/agents/user_agent/metrics.rs:249 — `get_equity_curve_points` turns every `Err` into `vec![]` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/application/monitoring/health/agent_status.rs:107 — `get_all_sync` turns every `Err` into `HashMap::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift README.md:109 — README.md links to `walkthrough.md`, but `walkthrough.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift specs/README.md:13 — specs/README.md names `data_dictionary.md`, but no file or folder `data_dictionary.md` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (49419 LoC, 420 module-visible types across 62 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P1 · CI/CD gates · CI build step not evidenced · ×1
  • CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 351/396 types (89%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×1
  • No app-layer HTTPS enforcement detected — This repository starts an HTTP server and nothing in its Rust source or committed `Rocket.toml` secures the transport: no TLS served (actix-web `bind_rustls`/`bind_openssl`, axum-server `bind_rustls` with a `RustlsConfig`, tonic `ServerTlsConfig`, a `TlsAcceptor`, Rocket's `[default.tls]`), no `Strict-Transport-Security` header, no `X-Forwarded-Proto` read from a TLS-terminating proxy — so its traffic may cross the network in clear text. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).
S1 · Web-Security Posture · No inbound request validation detected · ×1
  • No inbound request validation detected — No handler of this repository's Rust server answers 400, 413 or 422 (`StatusCode::BAD_REQUEST`, `HttpResponse::BadRequest()`, `Status::BadRequest`, tonic `Status::invalid_argument`), and nothing declares validation — no `validator`/`garde` derive, no body limit (`DefaultBodyLimit::max`, `RequestBodyLimitLayer`, `JsonConfig::default().limit(…)`, Rocket `Limits`) — nothing shows inbound requests being checked, and refused, before a handler acts on them. A check that answers its failure with 200 and an error body is not seen. (−2.0 on this card.) The server: `axum::serve(` (src/infrastructure/api/mod.rs:90).
X10 · Duplicated predicate · Duplicated predicate · ×1
  • Duplicated predicate src/application/risk_management/core/risk_manager.rs:732 — `level == HaltLevel::Reduced || level == HaltLevel::FullHalt` appears character-identically in 2 files — src/application/risk_management/core/risk_manager.rs, src/application/risk_management/core/risk_manager/handler.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Minor — 18 finding(s)
D12 · Dependency Hygiene · Outdated · ×18
  • Outdated: anyhow — `anyhow` is locked at 1.0.102 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
  • Outdated: async-trait — `async-trait` is locked at 0.1.89 but 0.1.92 is the current stable release on crates.io, and it already satisfies the `"0.1.89"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p async-trait` and commit the updated REDACTED.
  • Outdated: chrono — `chrono` is locked at 0.4.44 but 0.4.45 is the current stable release on crates.io, and it already satisfies the `"0.4.44"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p chrono` and commit the updated REDACTED.
  • Outdated: clap — `clap` is locked at 4.6.1 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.6.1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: crossbeam-channel — `crossbeam-channel` is locked at 0.5.15 but 0.5.17 is the current stable release on crates.io, and it already satisfies the `"0.5.15"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p crossbeam-channel` and commit the updated REDACTED.
  • Outdated: futures — `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.32"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
  • Outdated: futures-util — `futures-util` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3.32"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
  • Outdated: rand — `rand` is locked at 0.10.1 but 0.10.3 is the current stable release on crates.io, and it already satisfies the `"0.10.1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rand` and commit the updated REDACTED.
  • Outdated: reqwest — `reqwest` is locked at 0.13.4 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p reqwest` and commit the updated REDACTED.
  • Outdated: rss — `rss` is locked at 2.0.13 but 2.1.2 is the current stable release on crates.io, and it already satisfies the `"2.0.13"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rss` and commit the updated REDACTED.
  • Outdated: rust_decimal — `rust_decimal` is locked at 1.42.0 but 1.43.0 is the current stable release on crates.io, and it already satisfies the `"1.42.0"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rust_decimal` and commit the updated REDACTED.
  • Outdated: serde — `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1.0.228"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.150 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0.150"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: thiserror — `thiserror` is locked at 2.0.18 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2.0"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.52.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1.52.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: tokio-util — `tokio-util` is locked at 0.7.18 but 0.7.20 is the current stable release on crates.io, and it already satisfies the `"0.7.18"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio-util` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.1.2+spec-1.1.0 but 1.1.8+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1.2"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.23.1 but 1.28.0 is the current stable release on crates.io, and it already satisfies the `"1.23.1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

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

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

Run 01a160a7-b457-769f-931a-ed1d0c6c6ec1 · 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