Public report — mirrord, published 30 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this surveyFiledcd_a722b5d46375467185c34cbf2f4028c4
Filed 30 September 2026, 03:34 UTC
Public
Large · 186,217 LoC · 43 projects · rebuild ~1.6 person-years · weakest lens: Readiness (53%)
Findings by grade
70 critical696 serious29 minor39 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 September 2026, 03:19 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
759findings with an exact file:lineof 795 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
63/133dimensions across the health lenses186217 LoC · 43 projects — wide & deep
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
The system holds a 62% health score, marking it as at risk. While the underlying code structure is robust, the platform’s operational readiness is insufficient for its scale. This gap exposes the business to preventable outages and security incidents, threatening delivery stability despite the asset’s strong architectural foundation.
This is a substantial asset, comprising over 186,000 lines of production code. Rebuilding it would require approximately 1.6 person-years and cost around €230,000, representing significant sunk value. The codebase is highly modular with minimal boilerplate, indicating that the core logic is well-organized. However, the sheer size means that any operational weakness is amplified, making reliability and security critical to protecting this investment.
The primary risk lies in operational fragility. With a readiness score of 53%, the system lacks the necessary safeguards for safe, continuous operation. This manifests as missing timeouts on external calls and insufficient retry logic, which can lead to cascading failures during network instability. These gaps increase the likelihood of service degradation and increase the cost of incident response, directly impacting customer trust and revenue continuity.
A secondary concern is security exposure. A leaked secret was identified in a connectivity script, creating an immediate vulnerability. While the overall security posture is moderate, this specific finding represents a critical failure in basic hygiene. If exploited, it could grant unauthorized access to infrastructure, leading to data breaches or service disruption. This risk is acute and requires immediate attention to prevent exploitation.
Strengths include excellent code health and architectural maturity, suggesting the team has built a maintainable and scalable foundation. The high event sourcing score indicates a solid data consistency model. These positives provide a stable base for remediation efforts, ensuring that fixes will not require a complete rewrite.
Focus first on resolving the leaked secret. This action has the highest leverage, addressing a critical security flaw with minimal effort. Once secured, prioritize adding timeouts and retry logic to improve operational resilience. This approach protects the business from immediate threats while building a more reliable platform for future growth.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
D22 · Redundant methods with nearly identical names and likely identical functionality (mutating vs immutable builder pattern). The distinction is unclear from signatures alone and suggests a copy-paste error or incomplete refactoring.
D22 · Ambiguous naming for cleanup operations. It is unclear if `cleanup_verified` performs a stricter check, returns different error types, or is simply a redundant alias.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
0.8× (at 62% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.6 person-years of build effort (about ~€230,000 to rebuild). Its weakest lens is Readiness at 53% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
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.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~1.6 person-years to rebuild), and its weakest lens is Readiness at 53%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
667 modules, 1297 dependencies. 4 dependency cycles across 127 modules, marked above the diagonal.
Showing the 40 most-connected modules; 627 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
packages.monitor.src.components uses packages.monitor.src.types. Changing packages.monitor.src.types can break packages.monitor.src.components, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
15→11 mirrord_agent.incoming.task depends on mirrord_agent.incoming.connection✕
Type pairs
2 distinct (type in mirrord_agent.incoming.task → type in mirrord_agent.incoming.connection) references.
mirrord_agent.incoming.task uses mirrord_agent.incoming.connection. Changing mirrord_agent.incoming.connection can break mirrord_agent.incoming.task, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
16→4 mirrord_config.util depends on mirrord_config.config.context✕
Type pairs
2 distinct (type in mirrord_config.util → type in mirrord_config.config.context) references.
mirrord_session_monitor_client.request_builder uses mirrord_protocol.tcp. Changing mirrord_protocol.tcp can break mirrord_session_monitor_client.request_builder, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→4 mirrord_config.feature.network.incoming depends on mirrord_config.config.context✕
Type pairs
1 distinct (type in mirrord_config.feature.network.incoming → type in mirrord_config.config.context) reference.
mirrord_config.feature.network.incoming uses mirrord_config.config.context. Changing mirrord_config.config.context can break mirrord_config.feature.network.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→16 mirrord_config.feature.network.incoming depends on mirrord_config.util✕
Type pairs
2 distinct (type in mirrord_config.feature.network.incoming → type in mirrord_config.util) references.
mirrord_config.feature.network.incoming uses mirrord_config.util. Changing mirrord_config.util can break mirrord_config.feature.network.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
19→24 mirrord_config.feature.network.incoming depends on mirrord.port_forwardcycle✕
Type pairs
2 distinct (type in mirrord_config.feature.network.incoming → type in mirrord.port_forward) references.
mirrord_config.feature.network.incoming uses mirrord.port_forward. Changing mirrord.port_forward can break mirrord_config.feature.network.incoming, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
19→26 mirrord_config.feature.network.incoming depends on mirrord_analyticscycle✕
Type pairs
2 distinct (type in mirrord_config.feature.network.incoming → type in mirrord_analytics) references.
mirrord_config.feature.network.incoming uses mirrord_analytics. Changing mirrord_analytics can break mirrord_config.feature.network.incoming, not the reverse.
Position
Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
20→6 mirrord_intproxy_protocol depends on mirrord_protocol.outgoing✕
Type pairs
3 distinct (type in mirrord_intproxy_protocol → type in mirrord_protocol.outgoing) references.
mirrord_intproxy_protocol uses mirrord_session_monitor_client.request_builder. Changing mirrord_session_monitor_client.request_builder can break mirrord_intproxy_protocol, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→21 mirrord_intproxy_protocol depends on mirrord_protocol.codeccycle✕
Type pairs
2 distinct (type in mirrord_intproxy_protocol → type in mirrord_protocol.codec) references.
mirrord_protocol_api.client.outgoing uses mirrord_protocol.outgoing. Changing mirrord_protocol.outgoing can break mirrord_protocol_api.client.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→15 mirrord_protocol_api.client.outgoing depends on mirrord_agent.incoming.task✕
Type pairs
2 distinct (type in mirrord_protocol_api.client.outgoing → type in mirrord_agent.incoming.task) references.
mirrord_protocol_api.client.outgoing uses mirrord_agent.incoming.task. Changing mirrord_agent.incoming.task can break mirrord_protocol_api.client.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→21 mirrord_protocol_api.client.outgoing depends on mirrord_protocol.codec✕
Type pairs
1 distinct (type in mirrord_protocol_api.client.outgoing → type in mirrord_protocol.codec) reference.
mirrord_protocol_api.client.outgoing uses mirrord_protocol.codec. Changing mirrord_protocol.codec can break mirrord_protocol_api.client.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→1 mirrord.port_forward depends on mirrord.config✕
Type pairs
1 distinct (type in mirrord.port_forward → type in mirrord.config) reference.
mirrord.port_forward uses mirrord_config.feature.network.incoming. Changing mirrord_config.feature.network.incoming can break mirrord.port_forward, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→21 mirrord.port_forward depends on mirrord_protocol.codec✕
Type pairs
2 distinct (type in mirrord.port_forward → type in mirrord_protocol.codec) references.
mirrord_intproxy.proxies.outgoing uses mirrord_protocol.outgoing. Changing mirrord_protocol.outgoing can break mirrord_intproxy.proxies.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→20 mirrord_intproxy.proxies.outgoing depends on mirrord_intproxy_protocol✕
Type pairs
9 distinct (type in mirrord_intproxy.proxies.outgoing → type in mirrord_intproxy_protocol) references.
mirrord_intproxy.proxies.outgoing uses mirrord_intproxy_protocol. Changing mirrord_intproxy_protocol can break mirrord_intproxy.proxies.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→21 mirrord_intproxy.proxies.outgoing depends on mirrord_protocol.codec✕
Type pairs
1 distinct (type in mirrord_intproxy.proxies.outgoing → type in mirrord_protocol.codec) reference.
mirrord_intproxy.proxies.outgoing uses mirrord_protocol.codec. Changing mirrord_protocol.codec can break mirrord_intproxy.proxies.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→22 mirrord_intproxy.proxies.outgoing depends on mirrord_agent.entrypoint✕
Type pairs
2 distinct (type in mirrord_intproxy.proxies.outgoing → type in mirrord_agent.entrypoint) references.
mirrord_intproxy.proxies.outgoing uses mirrord_agent.entrypoint. Changing mirrord_agent.entrypoint can break mirrord_intproxy.proxies.outgoing, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→19 mirrord_analytics depends on mirrord_config.feature.network.incoming✕
Type pairs
1 distinct (type in mirrord_analytics → type in mirrord_config.feature.network.incoming) reference.
mirrord_analytics uses mirrord_config.feature.network.incoming. Changing mirrord_config.feature.network.incoming can break mirrord_analytics, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→24 mirrord_analytics depends on mirrord.port_forward✕
Type pairs
1 distinct (type in mirrord_analytics → type in mirrord.port_forward) reference.
mirrord_protocol_api.client.incoming uses mirrord_test_utils. Changing mirrord_test_utils can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→8 mirrord_protocol_api.client.incoming depends on mirrord_tui.context✕
Type pairs
1 distinct (type in mirrord_protocol_api.client.incoming → type in mirrord_tui.context) reference.
mirrord_protocol_api.client.incoming uses mirrord_tui.context. Changing mirrord_tui.context can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→13 mirrord_protocol_api.client.incoming depends on mirrord_protocol.tcp✕
Type pairs
4 distinct (type in mirrord_protocol_api.client.incoming → type in mirrord_protocol.tcp) references.
mirrord_protocol_api.client.incoming uses mirrord_protocol.tcp. Changing mirrord_protocol.tcp can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→15 mirrord_protocol_api.client.incoming depends on mirrord_agent.incoming.task✕
Type pairs
1 distinct (type in mirrord_protocol_api.client.incoming → type in mirrord_agent.incoming.task) reference.
mirrord_protocol_api.client.incoming uses mirrord_agent.incoming.task. Changing mirrord_agent.incoming.task can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→21 mirrord_protocol_api.client.incoming depends on mirrord_protocol.codec✕
Type pairs
1 distinct (type in mirrord_protocol_api.client.incoming → type in mirrord_protocol.codec) reference.
mirrord_protocol_api.client.incoming uses mirrord_protocol.codec. Changing mirrord_protocol.codec can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→24 mirrord_protocol_api.client.incoming depends on mirrord.port_forward✕
Type pairs
1 distinct (type in mirrord_protocol_api.client.incoming → type in mirrord.port_forward) reference.
mirrord_protocol_api.client.incoming uses mirrord.port_forward. Changing mirrord.port_forward can break mirrord_protocol_api.client.incoming, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
28→4 mirrord_config depends on mirrord_config.config.context✕
Type pairs
2 distinct (type in mirrord_config → type in mirrord_config.config.context) references.
mirrord_config.feature.database_branches uses mirrord_config.config.context. Changing mirrord_config.config.context can break mirrord_config.feature.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→12 mirrord_config.feature.database_branches depends on mirrord_config.target✕
Type pairs
2 distinct (type in mirrord_config.feature.database_branches → type in mirrord_config.target) references.
mirrord_config.feature.database_branches uses mirrord_config.target. Changing mirrord_config.target can break mirrord_config.feature.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
29→26 mirrord_config.feature.database_branches depends on mirrord_analytics✕
Type pairs
2 distinct (type in mirrord_config.feature.database_branches → type in mirrord_analytics) references.
mirrord_config.feature.database_branches uses mirrord_analytics. Changing mirrord_analytics can break mirrord_config.feature.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→4 mirrord_config.feature.split_queues depends on mirrord_config.config.context✕
Type pairs
1 distinct (type in mirrord_config.feature.split_queues → type in mirrord_config.config.context) reference.
mirrord_config.feature.split_queues uses mirrord_config.config.context. Changing mirrord_config.config.context can break mirrord_config.feature.split_queues, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
30→26 mirrord_config.feature.split_queues depends on mirrord_analytics✕
Type pairs
2 distinct (type in mirrord_config.feature.split_queues → type in mirrord_analytics) references.
mirrord_layer_lib.setup uses mirrord_config.feature.network.incoming. Changing mirrord_config.feature.network.incoming can break mirrord_layer_lib.setup, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
31→24 mirrord_layer_lib.setup depends on mirrord.port_forward✕
Type pairs
2 distinct (type in mirrord_layer_lib.setup → type in mirrord.port_forward) references.
mirrord_operator.crd.db_branching.branch_database uses mirrord_config.feature.database_branches. Changing mirrord_config.feature.database_branches can break mirrord_operator.crd.db_branching.branch_database, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→3 mirrord_operator.crd.preview depends on mirrord_agent.steal.task✕
Type pairs
1 distinct (type in mirrord_operator.crd.preview → type in mirrord_agent.steal.task) reference.
mirrord_operator.crd.preview uses mirrord_config.feature.network.incoming. Changing mirrord_config.feature.network.incoming can break mirrord_operator.crd.preview, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
33→30 mirrord_operator.crd.preview depends on mirrord_config.feature.split_queues✕
Type pairs
2 distinct (type in mirrord_operator.crd.preview → type in mirrord_config.feature.split_queues) references.
mirrord_operator.crd.preview uses mirrord_config.feature.split_queues. Changing mirrord_config.feature.split_queues can break mirrord_operator.crd.preview, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→12 mirrord_operator.client.database_branches depends on mirrord_config.target✕
Type pairs
6 distinct (type in mirrord_operator.client.database_branches → type in mirrord_config.target) references.
mirrord_operator.client.database_branches uses mirrord_config.target. Changing mirrord_config.target can break mirrord_operator.client.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→29 mirrord_operator.client.database_branches depends on mirrord_config.feature.database_branches✕
Type pairs
4 distinct (type in mirrord_operator.client.database_branches → type in mirrord_config.feature.database_branches) references.
mirrord_operator.client.database_branches uses mirrord_config.feature.database_branches. Changing mirrord_config.feature.database_branches can break mirrord_operator.client.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
34→32 mirrord_operator.client.database_branches depends on mirrord_operator.crd.db_branching.branch_database✕
Type pairs
3 distinct (type in mirrord_operator.client.database_branches → type in mirrord_operator.crd.db_branching.branch_database) references.
mirrord_operator.client.database_branches uses mirrord_operator.crd.db_branching.branch_database. Changing mirrord_operator.crd.db_branching.branch_database can break mirrord_operator.client.database_branches, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
35→33 mirrord_operator.crd depends on mirrord_operator.crd.preview✕
Type pairs
1 distinct (type in mirrord_operator.crd → type in mirrord_operator.crd.preview) reference.
mirrord.ui.server uses mirrord_session_monitor_client.request_builder. Changing mirrord_session_monitor_client.request_builder can break mirrord.ui.server, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
36→22 mirrord.ui.server depends on mirrord_agent.entrypoint✕
Type pairs
1 distinct (type in mirrord.ui.server → type in mirrord_agent.entrypoint) reference.
mirrord_operator.client uses mirrord_config.feature.database_branches. Changing mirrord_config.feature.database_branches can break mirrord_operator.client, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→30 mirrord_operator.client depends on mirrord_config.feature.split_queues✕
Type pairs
1 distinct (type in mirrord_operator.client → type in mirrord_config.feature.split_queues) reference.
mirrord_operator.client uses mirrord_config.feature.split_queues. Changing mirrord_config.feature.split_queues can break mirrord_operator.client, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
37→35 mirrord_operator.client depends on mirrord_operator.crd✕
Type pairs
1 distinct (type in mirrord_operator.client → type in mirrord_operator.crd) reference.
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
43
High / Critical
A05:2021 — Security Misconfiguration
33
High / Critical
A06:2021 — Vulnerable & Outdated Components
18
High / Critical
A02:2021 — Cryptographic Failures
1
High / Critical
Roadmap
Immediately resolve the leaked secret in REDACTED and enforce request timeouts with retry logic on all HTTP clients to prevent unbounded failures. Expand test coverage by adding imports for currently unreached production modules to ensure broader validation of core functionality. Finally, restrict public API exposure to internal types to protect against breaking changes and update Dependabot to monitor all package ecosystems for consistent security updates.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
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.
Dependabot is configured but does not watch `github-actions`, `npm`, `gomod`, `pip` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Wire the existing health endpoints into readiness/liveness probes and a rolling-update (or blue/green) strategy in the deployment manifests — or document where that wiring lives — so a bad release is caught and rolled back automatically.
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 — 70
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 — 696
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 — 29
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 39
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. 58 of 63 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 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 — 63 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 759 of 795 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 158 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 184 test source file(s) (.rs, .py, .go) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
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 reliability NOT SCORED: this repository's production source includes .rs, and the built-in reliability runner cannot re-run the .rs test suite(s) — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/monitor/ (50 tests); vitest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/wizard/ (131 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 6 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — 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. License Compliance couldn't be assessed within its 15-minute budget on a solution this large — not included in this run.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
R4 Test Coverage — 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. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X12 Unreachable branch — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X13 Undrained process stream — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X14 Bypassable address classification — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X16 Unfloored truncation loop — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X18 Disposal-pattern correctness — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X19 Unrestored process-global state — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X20 Mistyped argument guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X21 Side-effecting pattern guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X22 Contradicted release guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X25 Inert configuration knob — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X26 Unsynchronised callback handoff — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X3 Exception handling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X30 Support guard that admits what it rejects — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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 (5): D19, D21, D22, D26, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
70 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was App.App at 54. A further 18 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 NewOperatorFeature::fmt at 53 — they are counted neither in the figure above nor in this dimension's score. 11 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: mirrord/operator/src/crd.rs (NewOperatorFeature::fmt at 53), mirrord/layer-lib/src/error.rs (mirrord_layer_lib::error::get_platform_errno at 40), mirrord/protocol/src/error.rs (ErrorKindInternal::from at 40), mirrord/agent/src/file.rs (FileManager::handle_message at 30), mirrord/layer/src/go.rs (mirrord_layer::go::c_abi_syscall6_handler at 30), and 6 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 47 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 mirrord finding(s) in Cyclomatic Complexity — start with preview.rs (2), main.rs (2), db_portforwards.rs. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 4 mirrord_layer_win finding(s) in Cyclomatic Complexity — start with query_info.rs, mod.rs, set_info.rs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 TargetsScreen finding(s) in Cyclomatic Complexity — start with targets.rs (3). — One of this dimension's main actionable groups (3 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 62 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 mirrord finding(s) in Cognitive Complexity — start with preview.rs (2), ui.rs, external_proxy.rs. — One of this dimension's main actionable groups (9 warning-level).
Resolve the 6 mirrord_tui finding(s) in Cognitive Complexity — start with databases.rs (2), view.rs, queues.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 mirrord_layer_lib finding(s) in Cognitive Complexity — start with ops.rs (2), debugger_ports.rs, command_line.rs. — One of this dimension's main actionable groups (5 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.2 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 36 FileTooLong finding(s) in God Classes — start with lib.rs (3), database_branches.rs (2), hooks.rs (2). — One of this dimension's main actionable groups (36 warning-level).
Resolve the 34 FunctionTooLong finding(s) in God Classes — start with mod.rs (5), preview.rs (2), hooks.rs (2). — One of this dimension's main actionable groups (34 warning-level).
Resolve the 23 MethodTooLong finding(s) in God Classes — start with client.rs (3), lib.rs (2), files.rs (2). — One of this dimension's main actionable groups (23 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
159 duplicated block group(s) detected. A further 11 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 1 of the 170 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 58 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with config.rs (2), mysql.rs (2), file.rs. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 13 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ci.rs, config.rs, local_redis.rs. — One of this dimension's main actionable groups (13 warning-level).
Resolve the 12 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with hooks.rs (2), error.rs, ops.rs. — One of this dimension's main actionable groups (12 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.1 / 10Strong✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
43 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 10 module(s) off the main sequence, with abstractness counted on 40 of the 43 (the rest declare no modelled class or interface, export only macros, or have no source directory of their own).
Off the main sequence: mirrord-jaq · ×10
What to do
Resolve the 10 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (10 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with connection.rs, seqpacket.rs, udp.rs. — One of this dimension's main actionable groups (6 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
1379 test methods: 1220 unit, 159 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 158 `it`/`test` case(s) across 13 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 1221 `#[test]` function(s) across 256 file(s) declaring at least one; its unit/integration split is Cargo's own — 67 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.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 158 tests. Measured on the JavaScript/TypeScript suite only — at least 184 test source file(s) (.rs, .py, .go) went unread, so its test quality is unmeasured and is not in these counts.
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.
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 36 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.rs (2), database_branches.rs (2), client.rs. — One of this dimension's main actionable groups (36 warning-level).
Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with pitm.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor8.9 / 10Strong✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
52 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is mirrord/utils-win/src/diagnostics/report.rs. Counted over 506 of the 728 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Off-boarding risk: anonymized user #1 · ×6
Further sole-owners (lower concentration)
What to do
Resolve the 6 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (6 recommendation-level).
Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
54 deducted task-comment markers across 186217 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 49 TodoComment finding(s) in Explicit Debt — start with lib.rs (6), file.rs (4), hooks.rs (4). — One of this dimension's main actionable groups (49 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with chaos.rs (2), rules.rs (2). — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with prefetch.rs. — One of this dimension's main actionable groups (1 warning-level).
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.
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.
The repository's root README gives a strong overview of mirrord and its dual halves (development loop grounding vs end-to-end feedback), adoption list, and links to architecture/Docs markdown files. The medschool/readme.md README is focused on the directory it documents (a Rust crate that generates configuration.md from docs) with clear usage examples; tests/README.md and xtask/README.md are test/e2e automation guides for their directories; .github/workflows/README.md describes CI/release workflows; mirrord/auth/cli, config/derive, layer, protocol, tui, and the rest of the READMEs document individual modules. The visible content is comprehensive and well-structured.
Documentation: no contributor guidanceREADME.md
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
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.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyStronggated by 2 serious findings◐ 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.
2 API inconsistencies across a 400-member sample of 974 exposed types.
Redundant methods with nearly identical names and likely identical functionality (mutating vs immutable builder pattern). The distinction is unclear from signatures alone and suggests a copy-paste error or incomplete refactoring.
Ambiguous naming for cleanup operations. It is unclear if `cleanup_verified` performs a stricter check, returns different error types, or is simply a redundant alias.
What to do
Resolve the 1 Redundant methods with nearly identical names and likely identical… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Ambiguous naming for cleanup operations. It is unclear if… 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.
4 of 43 build units (Cargo) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
43 finding(s): 0 critical, 41 high, 2 medium, 0 low. 15 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 10 file(s) — `.github/scripts/ci-duration.sh` (line 57, line 120), `.github/scripts/flaky-issue.sh` (line 239, line 247), `mirrord/agent/src/entrypoint.rs` (line 1296), `mirrord/agent/src/steal/test.rs` (line 502, line 588), `mirrord/kube/src/api/kubernetes/seeker.rs` (line 265, line 314), … (+5 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 9 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 11 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6), REDACTED, REDACTED. — One of this dimension's main actionable groups (8 issue-level).
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (6 issue-level).
No action in Static Analysis (SAST) — all 13 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 (13 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5), REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 17 High IaC finding(s) in IaC & Container Security — start with REDACTED (7), REDACTED (4), REDACTED (3). — One of this dimension's main actionable groups (17 issue-level).
Resolve the 11 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
1 of 506 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is medschool/src/types.rs. Counted over 506 of the 728 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Orphaned files with no living knowledge
✓ On the Gold path — maintain.
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 7 Change coupling finding(s) in Change Coupling — start with execution.rs, diagnose.rs, db_portforwards.rs. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 40 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels5.1 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×3) — packages/monitor/src/components/ContextNamespacePicker.tsx:148, packages/monitor/src/components/chaos/ChaosRuleForm.tsx:261, packages/monitor/src/components/events/EventSearchBar.tsx:35
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — packages/monitor/src/components/SessionSidebar.tsx:213, packages/monitor/src/components/chaos/RequestChaosTypeDialog.tsx:60, packages/wizard/src/components/steps/TargetTab.tsx:277, …
This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×3) — packages/monitor/src/components/SubscribeEventsTable.tsx:202, packages/wizard/src/components/steps/AddNewFilter.tsx:61, packages/wizard/src/components/steps/NetworkTab.tsx:292
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×2) — packages/wizard/src/components/Wizard.tsx:185, packages/wizard/src/components/steps/LearningSteps.tsx:204
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — REDACTED:2
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 60 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a 'Testing' section to the root README — how to run the test suite.
Add a README to the 37 of 47 project(s) that lack one — worth up to 1.6 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning6.0 / 10Adequate✓ 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.
874/1157 types (76%) 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.
Only 28/31 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `mirrord/layer-tests`, `packages/wizard`, `xtask`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Dependabot is configured but does not watch `github-actions`, `npm`, `gomod`, `pip` — add those `package-ecosystem` entries to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Deployment automation exists and the service already exposes health probe endpoints (healthz/livez/readyz or a container healthcheck), but no manifest in this repository wires them into readiness/liveness probes, a rolling-update strategy, lifecycle hooks or a migration job — a bad release is harder to detect and reverse. If that wiring lives in a separate ops/Helm repository, document the pointer here so release safety is evidenced.
What to do
Wire the existing health endpoints into readiness/liveness probes and a rolling-update (or blue/green) strategy in the deployment manifests — or document where that wiring lives — so a bad release is caught and rolled back automatically.
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. 3 of the 6 files that make outbound calls are unbounded; the first 3 are listed. — mirrord/analytics/src/lib.rs:564
`reqwest::Client::builder(` 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. — mirrord/sessions-manager/client/src/control_plane.rs:143
`reqwest::blocking::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — xtask/src/tasks/sip_binaries.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.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
`spawn` 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. — mirrord/agent/src/task.rs:47
`start` 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. — mirrord/cli/src/local_redis.rs:115
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`.
Do you agree with this assessment?
R1 · Type Safety8.3 / 10Strong✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
What to do
Migrate the remaining .js/.jsx files to TypeScript.
React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.
Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.
5 duplicated blocks under packages/ have copies in at least two of the sibling directories monitor, ui, wizard — 0 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/monitor/eslint.config.js:1
packages/wizard/src/components/JsonUtils.tsx:432 · packages/wizard/src/components/JsonUtils.tsx:621 · packages/wizard/src/components/JsonUtils.tsx:709 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:432
packages/wizard/src/components/steps/TargetTab.tsx:339 · packages/wizard/src/components/steps/TargetTab.tsx:450 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/steps/TargetTab.tsx:339
packages/monitor/src/components/ContextNamespacePicker.tsx:40 · packages/monitor/src/components/ContextNamespacePicker.tsx:129 — the two spans are one implementation copied and then locally edited — 95 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/monitor/src/components/ContextNamespacePicker.tsx:40
packages/wizard/src/components/steps/TargetTab.tsx:386 · packages/wizard/src/components/steps/TargetTab.tsx:488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/wizard/src/components/steps/TargetTab.tsx:386
packages/wizard/src/components/JsonUtils.tsx:649 · packages/wizard/src/components/JsonUtils.tsx:737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/wizard/src/components/JsonUtils.tsx:649
packages/monitor/src/components/AppHeader.tsx:61 · packages/monitor/src/components/ContextNamespacePicker.tsx:237 — the two spans are one implementation copied and then locally edited — 97 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/monitor/src/components/AppHeader.tsx:61
packages/monitor/src/components/FunnelHero.tsx:95 · packages/monitor/src/components/SessionSidebar.tsx:525 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/monitor/src/components/FunnelHero.tsx:95
packages/wizard/src/components/JsonUtils.tsx:566 · packages/wizard/src/components/JsonUtils.tsx:588 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:566
packages/wizard/src/components/steps/ConfigTabs.tsx:128 · packages/wizard/src/components/steps/TargetTab.tsx:236 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/steps/ConfigTabs.tsx:128
packages/monitor/src/api.ts:171 · packages/monitor/src/api.ts:190 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/monitor/src/api.ts:171
packages/monitor/src/components/EmptySessionState.tsx:59 · packages/monitor/src/components/EmptySessionState.tsx:74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/monitor/src/components/EmptySessionState.tsx:59
packages/wizard/src/components/JsonUtils.tsx:76 · packages/wizard/src/components/JsonUtils.tsx:457 · packages/wizard/src/components/JsonUtils.tsx:646 · packages/wizard/src/components/JsonUtils.tsx:734 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:76
packages/monitor/src/hooks/useChaosRules.ts:237 · packages/monitor/src/hooks/useChaosRules.ts:280 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/monitor/src/hooks/useChaosRules.ts:237
packages/wizard/src/components/JsonUtils.tsx:58 · packages/wizard/src/components/JsonUtils.tsx:280 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:58
packages/wizard/src/components/steps/LearningSteps.tsx:58 · packages/wizard/src/components/steps/LearningSteps.tsx:70 · packages/wizard/src/components/steps/LearningSteps.tsx:82 — all 3 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/wizard/src/components/steps/LearningSteps.tsx:58
packages/monitor/src/components/ConnectOperatorModal.tsx:161 · packages/monitor/src/components/ConnectOperatorModal.tsx:227 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/monitor/src/components/ConnectOperatorModal.tsx:161
packages/monitor/src/components/chaos/BreakPopover.tsx:113 · packages/monitor/src/components/chaos/BreakPopover.tsx:125 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/monitor/src/components/chaos/BreakPopover.tsx:113
packages/wizard/src/components/JsonUtils.tsx:409 · packages/wizard/src/components/JsonUtils.tsx:602 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:409
packages/wizard/src/components/steps/TargetTab.tsx:319 · packages/wizard/src/components/steps/TargetTab.tsx:437 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/wizard/src/components/steps/TargetTab.tsx:319
packages/monitor/src/api.ts:270 · packages/monitor/src/api.ts:285 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/monitor/src/api.ts:270
packages/monitor/src/components/chaos/ChaosRuleForm.tsx:208 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:217 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:226 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:266 — all 4 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/monitor/src/components/chaos/ChaosRuleForm.tsx:208
packages/wizard/src/components/JsonUtils.tsx:363 · packages/wizard/src/components/JsonUtils.tsx:383 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:363
packages/monitor/src/components/OperatorSessionDetail.tsx:42 · packages/monitor/src/utils.ts:102 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/monitor/src/components/OperatorSessionDetail.tsx:42
packages/wizard/src/components/JsonUtils.tsx:334 · packages/wizard/src/components/JsonUtils.tsx:567 · packages/wizard/src/components/JsonUtils.tsx:589 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/wizard/src/components/JsonUtils.tsx:334
packages/monitor/src/components/chaos/ChaosRuleForm.tsx:230 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:270 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/monitor/src/components/chaos/ChaosRuleForm.tsx:230
packages/monitor/src/hooks/useChaosRules.ts:222 · packages/monitor/src/hooks/useChaosRules.ts:246 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/monitor/src/hooks/useChaosRules.ts:222
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
TargetTab has cyclomatic complexity 30 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/steps/TargetTab.tsx:52
SessionSidebar has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/SessionSidebar.tsx:88
updateConfigFilter has cyclomatic complexity 22 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/JsonUtils.tsx:428
PreviewDiagnostics has cyclomatic complexity 20 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/PreviewDiagnostics.tsx:40
OperatorSessionDetail has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/OperatorSessionDetail.tsx:74
Wizard has cyclomatic complexity 19 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/Wizard.tsx:50
(anonymous) has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/JsonUtils.tsx:330
updateConfigPorts has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/JsonUtils.tsx:621
EventRow has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/events/EventRow.tsx:22
EventStream has cyclomatic complexity 15 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/EventStream.tsx:58
NetworkTab has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/steps/NetworkTab.tsx:149
updateConfigPortMapping has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/JsonUtils.tsx:706
NamespaceCombobox has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/ContextNamespacePicker.tsx:96
(anonymous) has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/wizard/src/components/JsonUtils.tsx:175
timeout has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/App.tsx:254
Widget has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/Widget.tsx:17
App has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/App.tsx:55
describe has cyclomatic complexity 11 and cognitive complexity 8; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/subscribeEvents.ts:68
parseEvent has cyclomatic complexity 11 and cognitive complexity 4; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/monitor/src/components/events/parseEvent.ts:14
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files7.5 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage4.0 / 10Weak✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — packages/monitor/src/components/SessionSidebar.tsx, packages/monitor/src/App.tsx, packages/monitor/src/components/ContextNamespacePicker.tsx, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code9.6 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 9 application, 12 tooling and 34 test entry point(s) detected in this repo. Gate removals on `pnpm run typecheck` — an undetected custom entry would make these reachable.
no import path from any entry point (9 application, 12 tooling, 34 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — REDACTED
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
Declared in packages/monitor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 2 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 64 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.
AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 100) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not scored — polyglot repository, one half has no runner
D12 Dependency Hygiene — Not scored — 6 direct Cargo declaration(s) were read, but the outdated signal needs crates.io, which could not be reached on this run, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
D14 License Compliance — License Compliance not included (time budget)
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.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — symbol resolution incomplete — navigability not assessed
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.
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 MEASURED: the JavaScript/TypeScript half could not be measured — packages/monitor/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 76 value object(s); 5 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
AC2 · Forms & labels· <input> without a programmatic label · ×3
<input> without a programmatic label packages/monitor/src/components/ContextNamespacePicker.tsx:148— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label packages/monitor/src/components/chaos/ChaosRuleForm.tsx:261— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
<input> without a programmatic label packages/monitor/src/components/events/EventSearchBar.tsx:35— This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels· <button> with no accessible text · ×2
<button> with no accessible text packages/wizard/src/components/Wizard.tsx:185— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
<button> with no accessible text packages/wizard/src/components/steps/LearningSteps.tsx:204— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
TodoComment mirrord/agent/env/src/envs.rs:101— /// TODO remove — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/vpn.rs:238— // TODO: need to do it for UDP as well to avoid ICMP unreachable. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/reverse_dns.rs:16— /// # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/dns.rs:129— /// # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/intproxy/src/lib.rs:1091— /// # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/file.rs:125— // TODO: maybe not agent error on this? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/file.rs:556— // TODO(alex): clanker says that what we're doing here is not really equivalent to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/agent/src/env.rs:109— // TODO: nginx doesn't play nice when we do this, it only returns a string that goes like — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/cli/src/util.rs:107— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/debugger_ports.rs:604— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/debugger_ports.rs:608— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/debugger_ports.rs:611— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer/src/lib.rs:447— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer/src/lib.rs:451— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer/src/lib.rs:459— // TODO: Audit that the environment access only happens in single-threaded code. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/config/src/feature.rs:88— // TODO(alex) [high] 2023-05-18: This links to `FsConfig`, not `FsUserConfig` as I thought — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/config/src/feature/fs/advanced.rs:26— // TODO(alex): We could turn this derive macro (`MirrordConfig`) into an attribute version, which — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/intproxy/src/session_monitor/win_security.rs:9— //! TODO: this helper isn't really session-monitor-specific — it builds a generic — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/kube/src/api/container/util.rs:47— // TODO remove after some time. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/socket.rs:200— // TODO(alex): We could treat `sockfd` as being the same as `&self` for socket ops, we currently — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/proxy_connection.rs:26— // TODO: We don't really need a lock, we just need a type that: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/error.rs:535— // TODO: Add more error kinds, next time we break protocol compatibility. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/file/unix/read_local_by_default.rs:52— // TODO: `node` searches for this file in multiple directories, bypassing some of our — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/socket/dns/windows.rs:55— // TODO: according to the man page, service could also be a service name, it doesn't have to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment mirrord/layer-lib/src/socket/dns/unix.rs:80— // TODO: according to the man page, service could also be a service name, it doesn't have to — 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.
+ 24 more in this group — see findings.md.
R4 · Test Coverage· No test reaches this file · ×40
No test reaches this file packages/monitor/src/components/SessionSidebar.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/App.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/ContextNamespacePicker.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/hooks/useChaosRules.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/SubscribeEventsTable.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/ConnectOperatorModal.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/chaos/ChaosRuleForm.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/SessionDetail.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/types.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/OperatorSessionDetail.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/OperatorList.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/PreviewDiagnostics.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/ui/src/App.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/chaos/ChaosPane.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/eventsStore.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/AppHeader.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file REDACTED— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/extensionBridge.ts— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/JoinBar.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/chaos/ChaosRuleCard.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/FunnelHero.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/SidePane.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/ResizableSplit.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/SettingsDialog.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file packages/monitor/src/components/SessionRow.tsx— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
Hotspot: mirrord/operator/src/client.rs mirrord/operator/src/client.rs:701— mirrord/operator/src/client.rs changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in OperatorApi::prepare_branch_dbs at line 701. 2 of those changes were fix/bug commits, and the other 48 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/operator/src/client.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: mirrord/operator/src/crd.rs mirrord/operator/src/crd.rs:833— mirrord/operator/src/crd.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in NewOperatorFeature::fmt at line 833. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/operator/src/crd.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: mirrord/cli/src/main.rs mirrord/cli/src/main.rs:1027— mirrord/cli/src/main.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in mirrord::main at line 1027. 4 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/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: mirrord/config/src/lib.rs mirrord/config/src/lib.rs:848— mirrord/config/src/lib.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in LayerConfig::verify at line 848. 2 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/config/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
Hotspot: mirrord/config/src/feature/database_branches.rs mirrord/config/src/feature/database_branches.rs:609— mirrord/config/src/feature/database_branches.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DatabaseBranchConfig::copy_mode at line 609. 4 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/config/src/feature/database_branches.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: mirrord/cli/src/preview.rs mirrord/cli/src/preview.rs:106— mirrord/cli/src/preview.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in mirrord::preview::preview_start at line 106. 2 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/preview.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: mirrord/cli/src/error.rs mirrord/cli/src/error.rs:870— mirrord/cli/src/error.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in CliError::from at line 870. 2 of those changes were fix/bug commits, and the other 27 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/error.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: packages/monitor/src/App.tsx packages/monitor/src/App.tsx:55— packages/monitor/src/App.tsx changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in App.App at line 55. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/monitor/src/App.tsx`: 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: mirrord/operator/src/client/database_branches.rs mirrord/operator/src/client/database_branches.rs:1394— mirrord/operator/src/client/database_branches.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in UnifiedDatabaseBranchParams::new at line 1394. 2 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/operator/src/client/database_branches.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: mirrord/cli/src/internal_proxy/db_portforwards.rs mirrord/cli/src/internal_proxy/db_portforwards.rs:278— mirrord/cli/src/internal_proxy/db_portforwards.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in mirrord::internal_proxy::db_portforwards::extract_portforward_configs at line 278. 3 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/internal_proxy/db_portforwards.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: mirrord/cli/src/connection.rs mirrord/cli/src/connection.rs:75— mirrord/cli/src/connection.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in mirrord::connection::try_connect_using_operator at line 75. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/connection.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: mirrord/cli/src/ui.rs mirrord/cli/src/ui.rs:268— mirrord/cli/src/ui.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in mirrord::ui::chaos_command at line 268. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/ui.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: mirrord/operator/src/crd/db_branching/branch_database.rs mirrord/operator/src/crd/db_branching/branch_database.rs:780— mirrord/operator/src/crd/db_branching/branch_database.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in BranchDatabaseSpec::validate_extra_params at line 780. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/operator/src/crd/db_branching/branch_database.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: mirrord/intproxy/src/proxies/outgoing.rs mirrord/intproxy/src/proxies/outgoing.rs:785— mirrord/intproxy/src/proxies/outgoing.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in OutgoingProxy::run at line 785. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/intproxy/src/proxies/outgoing.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: mirrord/config/src/target.rs mirrord/config/src/target.rs:702— mirrord/config/src/target.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in TargetConfig::collect_analytics at line 702. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/config/src/target.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: packages/monitor/src/components/EventStream.tsx packages/monitor/src/components/EventStream.tsx:58— packages/monitor/src/components/EventStream.tsx changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in EventStream.EventStream at line 58. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/monitor/src/components/EventStream.tsx`: 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: mirrord/up/src/process.rs mirrord/up/src/process.rs:343— mirrord/up/src/process.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in mirrord_up::process::supervise_with_second_signal at line 343. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/up/src/process.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: packages/wizard/src/components/steps/TargetTab.tsx packages/wizard/src/components/steps/TargetTab.tsx:52— packages/wizard/src/components/steps/TargetTab.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in TargetTab.TargetTab at line 52. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/wizard/src/components/steps/TargetTab.tsx`: 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: mirrord/layer-lib/src/debugger_ports.rs mirrord/layer-lib/src/debugger_ports.rs:155— mirrord/layer-lib/src/debugger_ports.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in DebuggerType::get_ports at line 155. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/layer-lib/src/debugger_ports.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: packages/wizard/src/components/JsonUtils.tsx packages/wizard/src/components/JsonUtils.tsx:325— packages/wizard/src/components/JsonUtils.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in JsonUtils.readCurrentFilters at line 325. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/wizard/src/components/JsonUtils.tsx`: 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: packages/monitor/src/components/SessionSidebar.tsx packages/monitor/src/components/SessionSidebar.tsx:88— packages/monitor/src/components/SessionSidebar.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SessionSidebar.SessionSidebar at line 88. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/monitor/src/components/SessionSidebar.tsx`: 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: packages/monitor/src/components/SessionDetail.tsx packages/monitor/src/components/SessionDetail.tsx:35— packages/monitor/src/components/SessionDetail.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in SessionDetail.SessionDetail at line 35. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/monitor/src/components/SessionDetail.tsx`: 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: mirrord/agent/src/entrypoint.rs mirrord/agent/src/entrypoint.rs:638— mirrord/agent/src/entrypoint.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ClientConnectionHandler::handle_client_message at line 638. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/agent/src/entrypoint.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: packages/monitor/src/hooks/useChaosRules.ts packages/monitor/src/hooks/useChaosRules.ts:102— packages/monitor/src/hooks/useChaosRules.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in useChaosRules.useChaosRules at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- packages/monitor/src/hooks/useChaosRules.ts`: 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: mirrord/intproxy/src/proxies/files.rs mirrord/intproxy/src/proxies/files.rs:900— mirrord/intproxy/src/proxies/files.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in FilesProxy::file_response at line 900. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/intproxy/src/proxies/files.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.
FileTooLong: src/client.rs mirrord/operator/src/client.rs— FileTooLong — 1807 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: OperatorApi (6 blocks, 246-2732). The bar is 500 significant lines; this is 1307 over it, 3.61× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: client/database_branches.rs mirrord/operator/src/client/database_branches.rs— FileTooLong — 1797 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 1297 over it, 3.59× 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: socket/mod.rs mirrord/layer-win/src/hooks/socket/mod.rs— FileTooLong — 1505 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 1005 over it, 3.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.
FileTooLong: file/hooks.rs mirrord/layer/src/file/hooks.rs— FileTooLong — 1296 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 78 free functions. The bar is 500 significant lines; this is 796 over it, 2.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/config.rs mirrord/cli/src/config.rs— FileTooLong — 1014 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 514 over it, 2.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/entrypoint.rs mirrord/agent/src/entrypoint.rs— FileTooLong — 917 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 417 over it, 1.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ui/server.rs mirrord/cli/src/ui/server.rs— FileTooLong — 897 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 39 free functions. The bar is 500 significant lines; this is 397 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/preview.rs mirrord/cli/src/preview.rs— FileTooLong — 896 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 396 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: socket/ops.rs mirrord/layer/src/socket/ops.rs— FileTooLong — 836 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 336 over it, 1.67× 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: feature/database_branches.rs mirrord/config/src/feature/database_branches.rs— FileTooLong — 822 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 322 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: db_branching/branch_database.rs mirrord/operator/src/crd/db_branching/branch_database.rs— FileTooLong — 806 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 306 over it, 1.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: proxies/files.rs mirrord/intproxy/src/proxies/files.rs— FileTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: FilesProxy (4 blocks, 438-1258). The bar is 500 significant lines; this is 294 over it, 1.59× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/main.rs mirrord/cli/src/main.rs— FileTooLong — 755 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 255 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: preview_envs/view.rs mirrord/tui/src/screens/preview_envs/view.rs— FileTooLong — 744 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 244 over it, 1.49× 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: screens/databases.rs mirrord/tui/src/screens/databases.rs— FileTooLong — 732 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 232 over it, 1.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/port_forward.rs mirrord/cli/src/port_forward.rs— FileTooLong — 728 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 228 over it, 1.46× 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: targets/form.rs mirrord/tui/src/screens/targets/form.rs— FileTooLong — 713 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 213 over it, 1.43× 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: proxies/incoming.rs mirrord/intproxy/src/proxies/incoming.rs— FileTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: IncomingProxy (3 blocks, 184-1034). The bar is 500 significant lines; this is 186 over it, 1.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/error.rs mirrord/cli/src/error.rs— FileTooLong — 682 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 75% of them inside a single declaration: CliError (4 blocks, 254-980). The bar is 500 significant lines; this is 182 over it, 1.36× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/file.rs mirrord/agent/src/file.rs— FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 91% of them inside a single declaration: FileManager (3 blocks, 99-1026). The bar is 500 significant lines; this is 172 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/lib.rs mirrord/intproxy/src/lib.rs— FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 76% of them inside a single declaration: IntProxy (2 blocks, 129-992). The bar is 500 significant lines; this is 161 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: src/crd.rs mirrord/operator/src/crd.rs— FileTooLong — 645 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 145 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/lib.rs mirrord/config/src/lib.rs— FileTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 77% of them inside a single declaration: LayerConfig (3 blocks, 330-1415). The bar is 500 significant lines; this is 139 over it, 1.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: socket/hooks.rs mirrord/layer/src/socket/hooks.rs— FileTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 32 free functions. The bar is 500 significant lines; this is 90 over it, 1.18× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: src/config.rs mirrord/up/src/config.rs— FileTooLong — 574 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 74 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FunctionTooLong: App.App packages/monitor/src/App.tsx:55— FunctionTooLong — App runs 353 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 253 over it, 3.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord::preview::preview_start mirrord/cli/src/preview.rs:106— FunctionTooLong — mirrord::preview::preview_start runs 312 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 212 over it, 3.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord_layer::file::hooks::enable_file_hooks mirrord/layer/src/file/hooks.rs:1592— FunctionTooLong — mirrord_layer::file::hooks::enable_file_hooks runs 302 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 202 over it, 3.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.
FunctionTooLong: SessionSidebar.SessionSidebar packages/monitor/src/components/SessionSidebar.tsx:88— FunctionTooLong — SessionSidebar runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord_layer_win::hooks::socket::initialize_hooks mirrord/layer-win/src/hooks/socket/mod.rs:2025— FunctionTooLong — mirrord_layer_win::hooks::socket::initialize_hooks runs 228 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 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ChaosRuleForm.ChaosRuleForm packages/monitor/src/components/chaos/ChaosRuleForm.tsx:57— FunctionTooLong — ChaosRuleForm runs 223 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 123 over it, 2.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: EventStream.EventStream packages/monitor/src/components/EventStream.tsx:58— FunctionTooLong — EventStream runs 199 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 99 over it, 1.99× 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: mirrord_layer_win::hooks::files::ops::query_info::info mirrord/layer-win/src/hooks/files/ops/query_info.rs:76— FunctionTooLong — mirrord_layer_win::hooks::files::ops::query_info::info runs 182 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 82 over it, 1.82× 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: Wizard.Wizard packages/wizard/src/components/Wizard.tsx:50— FunctionTooLong — Wizard runs 175 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 75 over it, 1.75× 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: SessionDetail.SessionDetail packages/monitor/src/components/SessionDetail.tsx:35— FunctionTooLong — SessionDetail runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× 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: mirrord::main mirrord/cli/src/main.rs:1027— FunctionTooLong — mirrord::main runs 162 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 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord_layer::socket::hooks::enable_socket_hooks mirrord/layer/src/socket/hooks.rs:681— FunctionTooLong — mirrord_layer::socket::hooks::enable_socket_hooks runs 161 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: useChaosRules.useChaosRules packages/monitor/src/hooks/useChaosRules.ts:102— FunctionTooLong — useChaosRules runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SubscribeEventsTable.SubscribeEventsTable packages/monitor/src/components/SubscribeEventsTable.tsx:145— FunctionTooLong — SubscribeEventsTable runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) 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: PreviewDiagnostics.PreviewDiagnostics packages/monitor/src/components/PreviewDiagnostics.tsx:40— FunctionTooLong — PreviewDiagnostics runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) 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: mirrord::preview::preview_status mirrord/cli/src/preview.rs:600— FunctionTooLong — mirrord::preview::preview_status runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord::external_proxy::proxy mirrord/cli/src/external_proxy.rs:69— FunctionTooLong — mirrord::external_proxy::proxy runs 143 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 43 over it, 1.43× 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: mirrord::connection::try_connect_using_operator mirrord/cli/src/connection.rs:75— FunctionTooLong — mirrord::connection::try_connect_using_operator 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.
FunctionTooLong: mirrord_layer_win::hooks::files::initialize_hooks mirrord/layer-win/src/hooks/files/mod.rs:354— FunctionTooLong — mirrord_layer_win::hooks::files::initialize_hooks 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: mirrord_agent::entrypoint::start_agent mirrord/agent/src/entrypoint.rs:955— FunctionTooLong — mirrord_agent::entrypoint::start_agent 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.
FunctionTooLong: OperatorSessionDetail.OperatorSessionDetail packages/monitor/src/components/OperatorSessionDetail.tsx:74— FunctionTooLong — OperatorSessionDetail runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord::internal_proxy::proxy mirrord/cli/src/internal_proxy.rs:287— FunctionTooLong — mirrord::internal_proxy::proxy runs 131 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 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: mirrord::db_branches::destroy_command mirrord/cli/src/db_branches.rs:466— FunctionTooLong — mirrord::db_branches::destroy_command runs 127 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 27 over it, 1.27× 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: mirrord_tui::screens::queues::details_lines mirrord/tui/src/screens/queues.rs:731— FunctionTooLong — mirrord_tui::screens::queues::details_lines 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: mirrord_layer_win::hooks::files::ops::open::handle mirrord/layer-win/src/hooks/files/ops/open.rs:93— FunctionTooLong — mirrord_layer_win::hooks::files::ops::open::handle runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: OperatorApi.prepare_branch_dbs mirrord/operator/src/client.rs:701— MethodTooLong — prepare_branch_dbs runs 343 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 243 over it, 3.43× 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: LayerConfig.verify mirrord/config/src/lib.rs:848— MethodTooLong — verify runs 244 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 144 over it, 2.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FilesProxy.file_request mirrord/intproxy/src/proxies/files.rs:604— MethodTooLong — file_request runs 199 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 99 over it, 1.99× 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: FilesProxy.file_response mirrord/intproxy/src/proxies/files.rs:900— MethodTooLong — file_response runs 178 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 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StatusCommandHandler.handle mirrord/cli/src/operator/status.rs:203— MethodTooLong — handle runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: UnifiedDatabaseBranchParams.new mirrord/operator/src/client/database_branches.rs:1394— MethodTooLong — new runs 143 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 43 over it, 1.43× 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: TrafficTunnels.handle_event mirrord/protocol-api/src/client/tunnels.rs:400— MethodTooLong — handle_event runs 143 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 43 over it, 1.43× 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: PreviewEnvsScreen.handle_event mirrord/tui/src/screens/preview_envs.rs:118— MethodTooLong — handle_event runs 141 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 41 over it, 1.41× 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: PortForwarder.handle_msg_from_agent mirrord/cli/src/port_forward.rs:215— MethodTooLong — handle_msg_from_agent 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.
MethodTooLong: OperatorApi.prepare_session mirrord/operator/src/client.rs:1519— MethodTooLong — prepare_session runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: OutgoingProxy.run mirrord/intproxy/src/proxies/outgoing.rs:785— MethodTooLong — run runs 118 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 18 over it, 1.18× 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: ResolvedTarget.assert_valid_mirrord_target mirrord/kube/src/resolved.rs:419— MethodTooLong — assert_valid_mirrord_target 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: FileManager.handle_message mirrord/agent/src/file.rs:119— MethodTooLong — handle_message runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MirrordExecution.spawn_agent_and_intproxy mirrord/cli/src/execution.rs:607— MethodTooLong — spawn_agent_and_intproxy runs 113 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 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IncomingProxy.handle_chunked_request mirrord/intproxy/src/proxies/incoming.rs:474— MethodTooLong — handle_chunked_request runs 113 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 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TcpStealerApi.handle_client_message mirrord/agent/src/steal/api.rs:487— MethodTooLong — handle_client_message 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.
MethodTooLong: DebuggerType.get_ports mirrord/layer-lib/src/debugger_ports.rs:155— MethodTooLong — get_ports runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: SettingsForm.draw mirrord/tui/src/screens/targets/form.rs:618— MethodTooLong — draw runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Metrics.new mirrord/agent/src/metrics.rs:102— MethodTooLong — new 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: RuntimeData.from_pod mirrord/kube/src/api/runtime.rs:116— MethodTooLong — from_pod 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: IntProxy.handle_agent_message mirrord/intproxy/src/lib.rs:711— MethodTooLong — handle_agent_message 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.
MethodTooLong: OperatorApi.should_copy_target mirrord/operator/src/client.rs:1996— MethodTooLong — should_copy_target 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.
MethodTooLong: MirrordExecution.start_internal mirrord/cli/src/execution.rs:235— MethodTooLong — start_internal runs 101 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 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (7 lines × 2) mirrord/agent/src/file.rs:368— mirrord/agent/src/file.rs:368-374 | mirrord/agent/src/file.rs:396-402 — both copies are in the same file, so extract the 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) mirrord/cli/src/ci.rs:99— mirrord/cli/src/ci.rs:99-105 | mirrord/cli/src/operator/session.rs:43-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) mirrord/cli/src/config.rs:721— mirrord/cli/src/config.rs:721-727 | mirrord/cli/src/config.rs:1558-1564 — both copies are in the same file, so extract the 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) mirrord/cli/src/db_branches.rs:362— mirrord/cli/src/db_branches.rs:362-368 | mirrord/cli/src/db_branches.rs:470-476 — both copies are in the same file, so extract the 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) mirrord/operator/src/crd/db_branching/mysql.rs:87— mirrord/operator/src/crd/db_branching/mysql.rs:87-93 | mirrord/operator/src/crd/db_branching/pg.rs:92-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 (7 lines × 2) mirrord/operator/src/crd/db_branching/mysql.rs:95— mirrord/operator/src/crd/db_branching/mysql.rs:95-101 | mirrord/operator/src/crd/db_branching/pg.rs:100-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) mirrord/protocol-api/src/client/outgoing.rs:227— mirrord/protocol-api/src/client/outgoing.rs:227-233 | mirrord/protocol-api/src/client/outgoing.rs:265-271 — both copies are in the same file, so extract the 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) mirrord/protocol-api/src/client/simple_request.rs:126— mirrord/protocol-api/src/client/simple_request.rs:126-132 | mirrord/protocol-api/src/client/simple_request.rs:166-172 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/databases.rs:99— mirrord/tui/src/screens/databases.rs:99-105 | mirrord/tui/src/screens/queues.rs:98-104 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) mirrord/agent/iptables/src/mesh.rs:104— mirrord/agent/iptables/src/mesh.rs:104-110 | mirrord/agent/iptables/src/standard.rs:52-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) mirrord/agent/src/outgoing/seqpacket.rs:177— mirrord/agent/src/outgoing/seqpacket.rs:177-183 | mirrord/agent/src/outgoing/udp.rs:149-155 — before extracting anything, compare `mirrord/agent/src/outgoing/seqpacket.rs` and `mirrord/agent/src/outgoing/udp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) mirrord/cli/src/config.rs:734— mirrord/cli/src/config.rs:734-741 | mirrord/cli/src/config.rs:1571-1577 — both copies are in the same file, so extract the 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) mirrord/operator/src/client/database_branches.rs:2407— mirrord/operator/src/client/database_branches.rs:2407-2413 | mirrord/operator/src/client/database_branches.rs:2463-2469 — both copies are in the same file, so extract the 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) xtask/src/tasks/cli.rs:96— xtask/src/tasks/cli.rs:96-102 | xtask/src/tasks/layer.rs:209-215 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
ClassTooLong: OperatorApi mirrord/operator/src/client.rs:246— ClassTooLong — 1635 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 40 methods, 6 blocks, lines 246-2732. The bar is 400 significant lines; this is 1235 over it, 4.09× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FileManager mirrord/agent/src/file.rs:99— ClassTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 37 methods, 3 blocks, lines 99-1026. The bar is 400 significant lines; this is 212 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: UnifiedBranchParams mirrord/operator/src/client/database_branches.rs:1784— ClassTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 13 methods, 2 blocks, lines 1784-2503. The bar is 400 significant lines; this is 210 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: IncomingProxy mirrord/intproxy/src/proxies/incoming.rs:184— ClassTooLong — 565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 184-1034. The bar is 400 significant lines; this is 165 over it, 1.41× 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: ResolvedTarget mirrord/kube/src/resolved.rs:43— ClassTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 4 blocks, lines 43-856. The bar is 400 significant lines; this is 133 over it, 1.33× 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: FilesProxy mirrord/intproxy/src/proxies/files.rs:438— ClassTooLong — 531 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, 4 blocks, lines 438-1258. The bar is 400 significant lines; this is 131 over it, 1.33× 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: CliError mirrord/cli/src/error.rs:254— ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 4 blocks, lines 254-980. The bar is 400 significant lines; this is 110 over it, 1.28× 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: IntProxy mirrord/intproxy/src/lib.rs:129— ClassTooLong — 501 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 129-992. The bar is 400 significant lines; this is 101 over it, 1.25× 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: LayerConfig mirrord/config/src/lib.rs:330— ClassTooLong — 492 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 330-1415. The bar is 400 significant lines; this is 92 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OutgoingProxy mirrord/intproxy/src/proxies/outgoing.rs:214— ClassTooLong — 469 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, 3 blocks, lines 214-951. The bar is 400 significant lines; this is 69 over it, 1.17× 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: TargetsScreen mirrord/tui/src/screens/targets.rs:97— ClassTooLong — 444 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 3 blocks, lines 97-786. The bar is 400 significant lines; this is 44 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: MirrordExecution mirrord/cli/src/execution.rs:94— ClassTooLong — 442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 9 methods, 2 blocks, lines 94-884. The bar is 400 significant lines; this is 42 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: TcpStealerApi mirrord/agent/src/steal/api.rs:54— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 8 methods, 3 blocks, lines 54-669. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (10 lines × 2) mirrord/cli/src/ci.rs:440— mirrord/cli/src/ci.rs:440-449 | mirrord/cli/src/ci.rs:563-572 — both copies are in the same file, so extract the 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) mirrord/cli/src/config.rs:574— mirrord/cli/src/config.rs:574-583 | mirrord/cli/src/config.rs:1462-1471 — both copies are in the same file, so extract the 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) mirrord/cli/src/local_redis.rs:197— mirrord/cli/src/local_redis.rs:197-206 | mirrord/cli/src/local_redis.rs:245-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) mirrord/cli/src/port_forward.rs:375— mirrord/cli/src/port_forward.rs:375-384 | mirrord/cli/src/port_forward.rs:706-715 — both copies are in the same file, so extract the 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) mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:47— mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:47-56 | mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:109-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) mirrord/layer/src/file/open_dirs.rs:245— mirrord/layer/src/file/open_dirs.rs:245-254 | mirrord/layer/src/file/open_dirs.rs:283-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) mirrord/layer/src/file/ops.rs:426— mirrord/layer/src/file/ops.rs:426-435 | mirrord/layer/src/file/ops.rs:452-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) mirrord/layer/src/file/hooks.rs:649— mirrord/layer/src/file/hooks.rs:649-658 | mirrord/layer/src/file/hooks.rs:676-685 — both copies are in the same file, so extract the 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) mirrord/layer-win/src/hooks/files/ops/read.rs:229— mirrord/layer-win/src/hooks/files/ops/read.rs:229-238 | mirrord/layer-win/src/hooks/files/ops/set_info.rs:74-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) mirrord/tui/src/screens/databases.rs:1082— mirrord/tui/src/screens/databases.rs:1082-1091 | mirrord/tui/src/screens/terminal/panel.rs:129-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) mirrord/tui/src/screens/targets/browser.rs:484— mirrord/tui/src/screens/targets/browser.rs:484-493 | mirrord/tui/src/screens/targets/plan.rs:135-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) mirrord/utils-win/src/modules.rs:365— mirrord/utils-win/src/modules.rs:365-374 | mirrord/utils-win/src/modules.rs:388-397 — both copies are in the same file, so extract the 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) mirrord/agent/iptables/src/mesh/istio.rs:196— mirrord/agent/iptables/src/mesh/istio.rs:196-205 | mirrord/agent/iptables/src/standard.rs:60-69 — 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) mirrord/kube/src/error.rs:154— mirrord/kube/src/error.rs:154-159 | mirrord/kube/src/error.rs:176-181 — both copies are in the same file, so extract the 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) mirrord/layer/src/file/ops.rs:470— mirrord/layer/src/file/ops.rs:470-475 | mirrord/layer/src/file/ops.rs:484-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) mirrord/layer/src/file/hooks.rs:1443— mirrord/layer/src/file/hooks.rs:1443-1448 | mirrord/layer/src/file/hooks.rs:1475-1480 — both copies are in the same file, so extract the 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) mirrord/layer-win/src/hooks/socket/mod.rs:794— mirrord/layer-win/src/hooks/socket/mod.rs:794-799 | mirrord/layer/src/socket/ops.rs:687-692 — 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) mirrord/protocol-api/src/client/simple_request.rs:119— mirrord/protocol-api/src/client/simple_request.rs:119-124 | mirrord/protocol-api/src/client/simple_request.rs:159-164 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/queues.rs:143— mirrord/tui/src/screens/queues.rs:143-148 | mirrord/tui/src/screens/queues.rs:248-253 — both copies are in the same file, so extract the 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) mirrord/agent/src/outgoing/seqpacket.rs:225— mirrord/agent/src/outgoing/seqpacket.rs:225-230 | mirrord/agent/src/outgoing/udp.rs:197-202 — before extracting anything, compare `mirrord/agent/src/outgoing/seqpacket.rs` and `mirrord/agent/src/outgoing/udp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) mirrord/tui/src/screens/databases.rs:555— mirrord/tui/src/screens/databases.rs:555-560 | mirrord/tui/src/screens/queues.rs:562-567 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) mirrord/agent/src/incoming/mirror_handle.rs:85— mirrord/agent/src/incoming/mirror_handle.rs:85-90 | mirrord/agent/src/incoming/steal_handle.rs:87-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) mirrord/layer-lib/src/mutex.rs:11— mirrord/layer-lib/src/mutex.rs:11-16 | mirrord/sip/src/codesign.rs:146-151 — 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) mirrord/cli/src/execution.rs:804— mirrord/cli/src/execution.rs:804-809 | mirrord/layer/src/lib.rs:502-507 — 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) mirrord/layer/src/file/hooks.rs:1384— mirrord/layer/src/file/hooks.rs:1384-1389 | mirrord/layer/src/file/hooks.rs:1412-1417 — both copies are in the same file, so extract the 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) mirrord/agent/src/outgoing/router.rs:152— mirrord/agent/src/outgoing/router.rs:152-164 | mirrord/agent/src/outgoing/router.rs:185-197 — both copies are in the same file, so extract the 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) mirrord/agent/src/steal/api.rs:547— mirrord/agent/src/steal/api.rs:547-559 | mirrord/agent/src/steal/api.rs:574-586 — both copies are in the same file, so extract the 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) mirrord/layer/src/socket/ops.rs:774— mirrord/layer/src/socket/ops.rs:774-786 | mirrord/layer/src/socket/ops.rs:892-904 — both copies are in the same file, so extract the 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) mirrord/operator/src/client.rs:1531— mirrord/operator/src/client.rs:1531-1543 | mirrord/operator/src/client.rs:1847-1859 — both copies are in the same file, so extract the 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) mirrord/protocol-io/src/lib.rs:128— mirrord/protocol-io/src/lib.rs:128-140 | mirrord/protocol-io/src/lib.rs:151-163 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/databases.rs:130— mirrord/tui/src/screens/databases.rs:130-142 | mirrord/tui/src/screens/queues.rs:125-137 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) mirrord/tui/src/screens/databases.rs:319— mirrord/tui/src/screens/databases.rs:319-331 | mirrord/tui/src/screens/queues.rs:294-306 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) mirrord/tui/src/screens/databases.rs:921— mirrord/tui/src/screens/databases.rs:921-933 | mirrord/tui/src/screens/databases.rs:945-957 — both copies are in the same file, so extract the 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) mirrord/layer-go/src/linux_aarch64.rs:25— mirrord/layer-go/src/linux_aarch64.rs:25-37 | mirrord/layer-go/src/linux_x64.rs:680-692 — 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) mirrord/operator/src/crd.rs:1251— mirrord/operator/src/crd.rs:1251-1263 | mirrord/operator/src/crd/rabbitmq.rs:99-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) mirrord/agent/src/incoming/connection/http.rs:214— mirrord/agent/src/incoming/connection/http.rs:214-224 | mirrord/agent/src/incoming/connection/http.rs:450-460 — both copies are in the same file, so extract the 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) mirrord/agent/src/outgoing/seqpacket.rs:186— mirrord/agent/src/outgoing/seqpacket.rs:186-196 | mirrord/agent/src/outgoing/udp.rs:158-168 — before extracting anything, compare `mirrord/agent/src/outgoing/seqpacket.rs` and `mirrord/agent/src/outgoing/udp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) mirrord/agent/src/outgoing/seqpacket.rs:199— mirrord/agent/src/outgoing/seqpacket.rs:199-209 | mirrord/agent/src/outgoing/udp.rs:171-181 — before extracting anything, compare `mirrord/agent/src/outgoing/seqpacket.rs` and `mirrord/agent/src/outgoing/udp.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) mirrord/auth/src/credentials.rs:360— mirrord/auth/src/credentials.rs:360-370 | mirrord/auth/src/credentials.rs:390-400 — both copies are in the same file, so extract the 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) mirrord/operator/src/client.rs:1549— mirrord/operator/src/client.rs:1549-1559 | mirrord/operator/src/client.rs:1871-1887 — both copies are in the same file, so extract the 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) mirrord/operator/src/client.rs:2280— mirrord/operator/src/client.rs:2280-2290 | mirrord/operator/src/client.rs:2318-2328 — both copies are in the same file, so extract the 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) mirrord/protocol-api/src/client/retrying.rs:154— mirrord/protocol-api/src/client/retrying.rs:154-164 | mirrord/protocol-api/src/client/retrying.rs:180-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) mirrord/tui/src/screens/databases.rs:339— mirrord/tui/src/screens/databases.rs:339-349 | mirrord/tui/src/screens/queues.rs:314-324 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) mirrord/tui/src/screens/targets/browser.rs:545— mirrord/tui/src/screens/targets/browser.rs:545-555 | mirrord/tui/src/screens/targets/plan.rs:179-189 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) mirrord/intproxy/src/proxies/incoming/http_gateway.rs:113— mirrord/intproxy/src/proxies/incoming/http_gateway.rs:113-123 | mirrord/intproxy/src/proxies/incoming/http_gateway.rs:142-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.
Off the main sequence: mirrord-jaq — mirrord-jaq: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: mirrord-nightly-polyfill — mirrord-nightly-polyfill: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: mirrord-session-monitor-protocol — mirrord-session-monitor-protocol: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Off the main sequence: mirrord-sessions-manager-protocol — mirrord-sessions-manager-protocol: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Off the main sequence: mirrord-sip — mirrord-sip: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: mirrord-protocol — mirrord-protocol: abstractness 0.01, instability 0.07, distance 0.92 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
Off the main sequence: mirrord-progress — mirrord-progress: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: mirrord-agent-env — mirrord-agent-env: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
Off the main sequence: mirrord-analytics — mirrord-analytics: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
Off the main sequence: mirrord-intproxy-protocol — mirrord-intproxy-protocol: abstractness 0.10, instability 0.14, distance 0.76 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
mirrord::preview::preview_start (cognitive 42) mirrord/cli/src/preview.rs:106— mirrord::preview::preview_start has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (24 pts), match/switch 5 (13 pts), loops 3 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord::ui::chaos_command (cognitive 36) mirrord/cli/src/ui.rs:268— mirrord::ui::chaos_command has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 6 (11 pts), loops 2 (4 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.
mirrord::preview::preview_status (cognitive 32) mirrord/cli/src/preview.rs:600— mirrord::preview::preview_status has cognitive complexity 32 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 7 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
mirrord::external_proxy::proxy (cognitive 29) mirrord/cli/src/external_proxy.rs:69— mirrord::external_proxy::proxy has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 5 (13 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord::internal_proxy::db_portforwards::extract_portforward_configs (cognitive 25) mirrord/cli/src/internal_proxy/db_portforwards.rs:278— mirrord::internal_proxy::db_portforwards::extract_portforward_configs has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (10 pts), boolean chains 2, loops 1 (nesting depth added 13). 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.
mirrord::connection::try_connect_using_operator (cognitive 24) mirrord/cli/src/connection.rs:75— mirrord::connection::try_connect_using_operator has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord::db_branches::destroy_command (cognitive 23) mirrord/cli/src/db_branches.rs:466— mirrord::db_branches::destroy_command has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord::exec (cognitive 17) mirrord/cli/src/main.rs:768— mirrord::exec has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, 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.
mirrord::ui::server::buffer_session_events (cognitive 16) mirrord/cli/src/ui/server.rs:463— mirrord::ui::server::buffer_session_events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (8 lines × 2) mirrord/cli/src/ci.rs:429— mirrord/cli/src/ci.rs:429-436 | mirrord/cli/src/ci.rs:549-556 — both copies are in the same file, so extract the 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) mirrord/cli/src/execution.rs:527— mirrord/cli/src/execution.rs:527-534 | mirrord/cli/src/execution.rs:717-724 — both copies are in the same file, so extract the 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) mirrord/layer-win/src/hooks/files/ops/query_info.rs:111— mirrord/layer-win/src/hooks/files/ops/query_info.rs:111-118 | mirrord/layer-win/src/hooks/files/ops/query_info.rs:234-241 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/databases.rs:378— mirrord/tui/src/screens/databases.rs:378-385 | mirrord/tui/src/screens/queues.rs:385-392 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) mirrord/tui/src/screens/preview_envs/view.rs:879— mirrord/tui/src/screens/preview_envs/view.rs:879-886 | mirrord/tui/src/screens/preview_envs/view.rs:970-977 — both copies are in the same file, so extract the 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) mirrord/agent/src/incoming/connection/copy_bidirectional.rs:116— mirrord/agent/src/incoming/connection/copy_bidirectional.rs:116-123 | mirrord/agent/src/incoming/connection/http_task.rs:357-364 — 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) mirrord/tui/src/screens/databases.rs:668— mirrord/tui/src/screens/databases.rs:668-675 | mirrord/tui/src/screens/queues.rs:706-713 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) mirrord/tui/src/screens/queues.rs:826— mirrord/tui/src/screens/queues.rs:826-833 | mirrord/tui/src/screens/queues.rs:886-893 — both copies are in the same file, so extract the 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) test-utils/src/lib.rs:432— test-utils/src/lib.rs:432-439 | test-utils/src/lib.rs:449-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
mirrord::preview::preview_start (cyclomatic 33) mirrord/cli/src/preview.rs:106— mirrord::preview::preview_start has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mirrord::internal_proxy::db_portforwards::extract_portforward_configs (cyclomatic 25) mirrord/cli/src/internal_proxy/db_portforwards.rs:278— mirrord::internal_proxy::db_portforwards::extract_portforward_configs has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord::preview::preview_status (cyclomatic 24) mirrord/cli/src/preview.rs:600— mirrord::preview::preview_status has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord::external_proxy::proxy (cyclomatic 21) mirrord/cli/src/external_proxy.rs:69— mirrord::external_proxy::proxy has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord::ui::chaos_command (cyclomatic 20) mirrord/cli/src/ui.rs:268— mirrord::ui::chaos_command 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.
mirrord::print_config (cyclomatic 18) mirrord/cli/src/main.rs:646— mirrord::print_config has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: mirrord::main (cyclomatic 39) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
mirrord::connection::try_connect_using_operator (cyclomatic 17) mirrord/cli/src/connection.rs:75— mirrord::connection::try_connect_using_operator 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.
mirrord::exec (cyclomatic 16) mirrord/cli/src/main.rs:768— mirrord::exec has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: mirrord::main (cyclomatic 39) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
Duplicated block (9 lines × 2) mirrord/agent/src/http/sender.rs:53— mirrord/agent/src/http/sender.rs:53-61 | mirrord/intproxy/src/proxies/incoming/http.rs:337-347 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) mirrord/cli/src/config.rs:829— mirrord/cli/src/config.rs:829-837 | mirrord/cli/src/config.rs:900-908 — both copies are in the same file, so extract the 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) mirrord/config/src/feature/database_branches/s3.rs:118— mirrord/config/src/feature/database_branches/s3.rs:118-126 | mirrord/config/src/feature/database_branches/turbopuffer.rs:209-217 — 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) mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:83— mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:83-91 | mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:149-157 — both copies are in the same file, so extract the 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) mirrord/layer/macro/src/lib.rs:31— mirrord/layer/macro/src/lib.rs:31-39 | mirrord/layer/macro/src/lib.rs:117-125 — both copies are in the same file, so extract the 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) mirrord/operator/src/crd.rs:1238— mirrord/operator/src/crd.rs:1238-1246 | mirrord/operator/src/crd/rabbitmq.rs:86-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) mirrord/agent/src/incoming/task.rs:420— mirrord/agent/src/incoming/task.rs:420-428 | mirrord/agent/src/incoming/task.rs:453-461 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) mirrord/cli/src/config.rs:506— mirrord/cli/src/config.rs:506-514 | mirrord/cli/src/config.rs:568-576 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Change coupling: execution.rs ↔ vpn.rs mirrord/cli/src/execution.rs— `mirrord/cli/src/execution.rs` and `mirrord/cli/src/vpn.rs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `a2e077fe` Remove progress; `d843ac52` Address review; `33555613` Expose the current git branch to config templating — run `git show` on any of them.
Change coupling: diagnose.rs ↔ execution.rs mirrord/cli/src/diagnose.rs— `mirrord/cli/src/diagnose.rs` and `mirrord/cli/src/execution.rs` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `a2e077fe` Remove progress; `a14444db` refactor stuff to work with the new api; `ac5eb656` wip — run `git show` on any of them.
Change coupling: db_portforwards.rs ↔ branch_database.rs mirrord/cli/src/internal_proxy/db_portforwards.rs— `mirrord/cli/src/internal_proxy/db_portforwards.rs` and `mirrord/operator/src/crd/db_branching/branch_database.rs` change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `c07e07aa` Add turbopuffer namespace branching; `478e89c4` S3 branching config; `18b47ceb` asm — run `git show` on any of them.
Change coupling: ephemeral.rs ↔ job.rs mirrord/kube/src/api/container/ephemeral.rs— `mirrord/kube/src/api/container/ephemeral.rs` and `mirrord/kube/src/api/container/job.rs` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `29c3bfbe` fix(366): fail fast on image misses (#4157); `a73fddea` Move agent container arguments from `command` to `args` (#4143); `47c0d590` Improve mirrord progress (interactive auth, message buffer) (#3470) — run `git show` on any of them.
Change coupling: connection.rs ↔ session.rs mirrord/cli/src/connection.rs— `mirrord/cli/src/connection.rs` and `mirrord/cli/src/operator/session.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `4e3509f5` Retries kube requests with a tower `Policy`. (#3564); `47c0d590` Improve mirrord progress (interactive auth, message buffer) (#3470); `50156f8d` Always run discovery when fetching operator fails (#2570) — run `git show` on any of them.
Change coupling: ops.rs ↔ go.rs mirrord/layer/src/file/ops.rs— `mirrord/layer/src/file/ops.rs` and `mirrord/layer/src/go.rs` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ef4f9bc5` Strip instrument and tracing in fn that Go hooks call into (#4423) (at that commit the file was still `mirrord/layer/src/go/mod.rs`); `6b49b015` Add hook for `rename`. (#3504) (at that commit the file was still `mirrord/layer/src/go/mod.rs`); `4c559358` Remove unnecessary deps from mirrord-layer (#3104) (at that commit the file was still `mirrord/layer/src/go/mod.rs`) — run `git show` on any of them.
Change coupling: internal_proxy.rs ↔ internal_proxy.rs mirrord/cli/src/internal_proxy.rs— `mirrord/cli/src/internal_proxy.rs` and `mirrord/config/src/internal_proxy.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `29a6db58` Make intproxy ping interval configurable (#4338); `32b6c144` Add periodic dump of connected processes for diagnostic purposes (#3506); `826e8846` Patch the Duplicate Analytics (#2639) — run `git show` on any of them.
mirrord_tui::screens::preview_envs::view::card_content (cognitive 32) mirrord/tui/src/screens/preview_envs/view.rs:1003— mirrord_tui::screens::preview_envs::view::card_content has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_tui::screens::queues::details_lines (cognitive 29) mirrord/tui/src/screens/queues.rs:731— mirrord_tui::screens::queues::details_lines has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 5 (9 pts), match/switch 5 (8 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.
mirrord_tui::screens::preview_envs::data::run (cognitive 25) mirrord/tui/src/screens/preview_envs/data.rs:62— mirrord_tui::screens::preview_envs::data::run has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (13 pts), if/else 2 (7 pts), loops 3 (5 pts) (nesting depth added 16). 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.
mirrord_tui::screens::targets::suggest::discover (cognitive 18) mirrord/tui/src/screens/targets/suggest.rs:23— mirrord_tui::screens::targets::suggest::discover has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
mirrord_tui::screens::databases::connection_source_section (cognitive 16) mirrord/tui/src/screens/databases.rs:871— mirrord_tui::screens::databases::connection_source_section has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (12 pts), if/else 1 (3 pts), match/switch 1 (nesting depth added 9). 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.
mirrord_tui::screens::databases::migrations_spec_section (cognitive 16) mirrord/tui/src/screens/databases.rs:908— mirrord_tui::screens::databases::migrations_spec_section has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 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.
Duplicated block (16 lines × 2) mirrord/analytics/src/lib.rs:363— mirrord/analytics/src/lib.rs:363-378 | mirrord/analytics/src/lib.rs:428-443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) mirrord/cli/src/session.rs:515— mirrord/cli/src/session.rs:515-530 | mirrord/tui/src/screens/terminal/sessions.rs:226-241 — 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 (16 lines × 2) mirrord/intproxy/src/proxies/incoming/http_gateway.rs:268— mirrord/intproxy/src/proxies/incoming/http_gateway.rs:268-283 | mirrord/intproxy/src/proxies/incoming/http_gateway.rs:298-313 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) mirrord/intproxy/src/proxies/incoming.rs:666— mirrord/intproxy/src/proxies/incoming.rs:666-681 | mirrord/intproxy/src/proxies/incoming.rs:684-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) mirrord/tui/src/screens/databases.rs:77— mirrord/tui/src/screens/databases.rs:77-92 | mirrord/tui/src/screens/queues.rs:76-91 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 2) mirrord/layer/macro/src/lib.rs:55— mirrord/layer/macro/src/lib.rs:55-70 | mirrord/layer/macro/src/lib.rs:141-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Low cohesion: IncomingIoWrapper (LCOM4 5) mirrord/agent/src/incoming/connection.rs:151— IncomingIoWrapper'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: SeqpacketSink (LCOM4 4) mirrord/agent/src/outgoing/seqpacket.rs:172— SeqpacketSink'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.
Low cohesion: UdpSink (LCOM4 4) mirrord/agent/src/outgoing/udp.rs:144— UdpSink'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.
Low cohesion: UnboundedBufferedSink (LCOM4 4) mirrord/agent/src/util/io/buffered.rs:101— UnboundedBufferedSink'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.
Low cohesion: AsyncEncoder (LCOM4 4) mirrord/intproxy/protocol/src/codec/codec_async.rs:27— AsyncEncoder'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.
Low cohesion: JsonProgress (LCOM4 4) mirrord/progress/src/implementations.rs:10— JsonProgress'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.
mirrord_layer_lib::socket::ops::connect_common (cognitive 28) mirrord/layer-lib/src/socket/ops.rs:306— mirrord_layer_lib::socket::ops::connect_common has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 9, match/switch 4 (6 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.
mirrord_layer_lib::debugger_ports::tokenize_argfile (cognitive 27) mirrord/layer-lib/src/debugger_ports.rs:429— mirrord_layer_lib::debugger_ports::tokenize_argfile has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 3 (10 pts), loops 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_layer_lib::process::windows::command_line::push_quoted (cognitive 23) mirrord/layer-lib/src/process/windows/command_line.rs:37— mirrord_layer_lib::process::windows::command_line::push_quoted has cognitive complexity 23 (threshold 15). Drivers by points: loops 5 (16 pts), match/switch 2 (5 pts), boolean chains 1, if/else 1 (nesting depth added 14). 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.
mirrord_layer_lib::socket::dns::reverse_dns::update_dns_reverse_mapping_bulk (cognitive 20) mirrord/layer-lib/src/socket/dns/reverse_dns.rs:34— mirrord_layer_lib::socket::dns::reverse_dns::update_dns_reverse_mapping_bulk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_layer_lib::socket::ops::connect_outgoing_common (cognitive 18) mirrord/layer-lib/src/socket/ops.rs:453— mirrord_layer_lib::socket::ops::connect_outgoing_common has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Duplicated block (14 lines × 2) mirrord/layer-go/src/linux_aarch64.rs:87— mirrord/layer-go/src/linux_aarch64.rs:87-100 | mirrord/layer-go/src/linux_aarch64.rs:131-144 — both copies are in the same file, so extract the 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) mirrord/operator/src/client/database_branches.rs:1989— mirrord/operator/src/client/database_branches.rs:1989-2002 | mirrord/operator/src/client/database_branches.rs:2434-2447 — both copies are in the same file, so extract the 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) mirrord/sip/src/lib.rs:258— mirrord/sip/src/lib.rs:258-271 | mirrord/sip/src/lib.rs:280-293 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/databases.rs:61— mirrord/tui/src/screens/databases.rs:61-74 | mirrord/tui/src/screens/queues.rs:52-65 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14 lines × 2) xtask/src/tasks/cli.rs:108— xtask/src/tasks/cli.rs:108-121 | xtask/src/tasks/cli.rs:158-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.
Duplicated block (12 lines × 2) mirrord/kube/src/api/kubernetes/seeker.rs:278— mirrord/kube/src/api/kubernetes/seeker.rs:278-289 | mirrord/kube/src/api/kubernetes/seeker.rs:326-337 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) mirrord/layer/src/file/open_dirs.rs:96— mirrord/layer/src/file/open_dirs.rs:96-107 | mirrord/layer/src/file/open_dirs.rs:128-139 — both copies are in the same file, so extract the 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) mirrord/layer/src/file/hooks.rs:704— mirrord/layer/src/file/hooks.rs:704-715 | mirrord/layer/src/file/hooks.rs:734-745 — both copies are in the same file, so extract the 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) mirrord/layer-win/src/hooks/socket/mod.rs:274— mirrord/layer-win/src/hooks/socket/mod.rs:274-285 | mirrord/layer-win/src/hooks/socket/mod.rs:298-309 — both copies are in the same file, so extract the 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) mirrord/tui/src/screens/databases.rs:356— mirrord/tui/src/screens/databases.rs:356-367 | mirrord/tui/src/screens/queues.rs:363-374 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) mirrord/config/src/feature/split_queues.rs:655— mirrord/config/src/feature/split_queues.rs:655-662 | mirrord/tui/src/screens/targets/model.rs:315-319 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) mirrord/layer/src/go.rs:128— mirrord/layer/src/go.rs:128-132 | mirrord/layer/src/go.rs:202-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) mirrord/intproxy/src/proxies/outgoing/interceptor/read_queue.rs:134— mirrord/intproxy/src/proxies/outgoing/interceptor/read_queue.rs:134-138 | mirrord/intproxy/src/proxies/outgoing/interceptor/write_queue.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.
Duplicated block (5 lines × 2) mirrord/cli/src/config.rs:728— mirrord/cli/src/config.rs:728-733 | mirrord/cli/src/config.rs:1565-1569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) mirrord/cli/src/container/sidecar.rs:329— mirrord/cli/src/container/sidecar.rs:329-333 | mirrord/cli/src/ui/daemon.rs:333-337 — 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.
AC2 · Forms & labels· <Select> field component without a label · ×4
<Select> field component without a label packages/monitor/src/components/SubscribeEventsTable.tsx:202— This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label packages/wizard/src/components/steps/AddNewFilter.tsx:61— This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label packages/wizard/src/components/steps/TargetTab.tsx:277— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
<Select> field component without a label packages/wizard/src/components/steps/TargetTab.tsx:301— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
mirrord_layer_win::hooks::files::ops::query_info::info (cyclomatic 23) mirrord/layer-win/src/hooks/files/ops/query_info.rs:76— mirrord_layer_win::hooks::files::ops::query_info::info has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mirrord_layer_win::hooks::socket::bind_detour_impl (cyclomatic 19) mirrord/layer-win/src/hooks/socket/mod.rs:326— mirrord_layer_win::hooks::socket::bind_detour_impl 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.
mirrord_layer_win::hooks::files::ops::set_info::handle (cyclomatic 18) mirrord/layer-win/src/hooks/files/ops/set_info.rs:67— mirrord_layer_win::hooks::files::ops::set_info::handle has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
mirrord_layer_win::hooks::files::ops::open::handle (cyclomatic 16) mirrord/layer-win/src/hooks/files/ops/open.rs:93— mirrord_layer_win::hooks::files::ops::open::handle has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FixmeComment mirrord/intproxy/src/proxies/outgoing/chaos.rs:114— // FIXME: `after` is ignored, the error is always delivered immediately. Restore the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment mirrord/intproxy/src/proxies/outgoing/chaos.rs:127— // FIXME: The correct implementation of connect latency relies on layer — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment mirrord/intproxy/src/session_monitor/chaos/rules.rs:421— // FIXME: kept for compatibility, but ignored by intproxy. See — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
FixmeComment mirrord/intproxy/src/session_monitor/chaos/rules.rs:631— // FIXME: kept for compatibility, but ignored by intproxy. See — 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.
mirrord_layer_win::hooks::files::ops::query_info::info (cognitive 55) mirrord/layer-win/src/hooks/files/ops/query_info.rs:76— mirrord_layer_win::hooks::files::ops::query_info::info has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (51 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 31). Of this number, 48 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_layer_win::hooks::files::ops::set_info::handle (cognitive 36) mirrord/layer-win/src/hooks/files/ops/set_info.rs:67— mirrord_layer_win::hooks::files::ops::set_info::handle has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (33 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 22). Of this number, 32 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_layer_win::hooks::socket::bind_detour_impl (cognitive 26) mirrord/layer-win/src/hooks/socket/mod.rs:326— mirrord_layer_win::hooks::socket::bind_detour_impl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 4 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
mirrord_layer_win::hooks::socket::connectex_detour (cognitive 23) mirrord/layer-win/src/hooks/socket/mod.rs:1034— mirrord_layer_win::hooks::socket::connectex_detour has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 3 (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.
D30 · Dependency Vulnerabilities· Medium advisory (unmaintained) · ×4
Duplicated block (9 lines × 3) mirrord/operator/src/client/database_branches.rs:201— mirrord/operator/src/client/database_branches.rs:201-209 | mirrord/operator/src/client/database_branches.rs:363-371 | mirrord/operator/src/client/database_branches.rs:526-534 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) mirrord/agent/src/steal/api.rs:536— mirrord/agent/src/steal/api.rs:536-544 | mirrord/agent/src/steal/api.rs:562-570 | mirrord/agent/src/steal/api.rs:589-598 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) mirrord/cli/src/config.rs:1541— mirrord/cli/src/config.rs:1541-1549 | mirrord/cli/src/config.rs:1685-1694 | mirrord/cli/src/config.rs:1711-1719 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 3) mirrord/operator/src/client/database_branches.rs:64— mirrord/operator/src/client/database_branches.rs:64-72 | mirrord/operator/src/client/database_branches.rs:227-235 | mirrord/operator/src/client/database_branches.rs:389-397 — 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.
TargetsScreen::handle_event (cyclomatic 28) mirrord/tui/src/screens/targets.rs:664— TargetsScreen::handle_event has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TargetsScreen::draw (cyclomatic 19) mirrord/tui/src/screens/targets.rs:552— TargetsScreen::draw 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.
TargetsScreen::run (cyclomatic 16) mirrord/tui/src/screens/targets.rs:152— TargetsScreen::run has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TargetsScreen::handle_event (cognitive 35) mirrord/tui/src/screens/targets.rs:664— TargetsScreen::handle_event has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 9 (22 pts), if/else 10 (11 pts), boolean chains 2 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
TargetsScreen::draw (cognitive 26) mirrord/tui/src/screens/targets.rs:552— TargetsScreen::draw has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, match/switch 4, 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.
TargetsScreen::run (cognitive 24) mirrord/tui/src/screens/targets.rs:152— TargetsScreen::run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 4 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 7). 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.
Duplicated block (17 lines × 2) mirrord/intproxy/src/proxies/files.rs:362— mirrord/intproxy/src/proxies/files.rs:362-378 | mirrord/protocol-api/src/file_ext.rs:209-225 — 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 (17 lines × 2) xtask/src/main.rs:182— xtask/src/main.rs:182-198 | xtask/src/main.rs:216-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 (17 lines × 2) mirrord/layer/macro/src/lib.rs:72— mirrord/layer/macro/src/lib.rs:72-88 | mirrord/layer/macro/src/lib.rs:167-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) mirrord/kube/src/resolved.rs:425— mirrord/kube/src/resolved.rs:425-439 | mirrord/kube/src/resolved.rs:491-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.
Duplicated block (15 lines × 2) mirrord/layer/src/socket/hooks.rs:235— mirrord/layer/src/socket/hooks.rs:235-249 | mirrord/layer/src/socket/hooks.rs:260-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) xtask/src/tasks/layer.rs:221— xtask/src/tasks/layer.rs:221-235 | xtask/src/tasks/layer.rs:265-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) mirrord/agent/src/outgoing.rs:113— mirrord/agent/src/outgoing.rs:113-125 | mirrord/agent/src/outgoing.rs:135-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) mirrord/config/src/feature/fs/mode.rs:95— mirrord/config/src/feature/fs/mode.rs:95-107 | mirrord/config/src/feature/fs/mode.rs:115-126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12–13 lines × 2) mirrord/intproxy/src/failover_strategy.rs:227— mirrord/intproxy/src/failover_strategy.rs:227-238 | mirrord/intproxy/src/lib.rs:505-517 — 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.
Outbound HTTP without resilience mirrord/analytics/src/lib.rs:564— `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. 3 of the 6 files that make outbound calls are unbounded; the first 3 are listed.
Outbound HTTP without resilience mirrord/sessions-manager/client/src/control_plane.rs:143— `reqwest::Client::builder(` 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 xtask/src/tasks/sip_binaries.rs:30— `reqwest::blocking::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Duplicated block (11 lines × 2 locations) packages/monitor/src/components/ConnectOperatorModal.tsx:161— packages/monitor/src/components/ConnectOperatorModal.tsx:161 · packages/monitor/src/components/ConnectOperatorModal.tsx:227 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (11 lines × 2 locations) packages/monitor/src/components/chaos/BreakPopover.tsx:113— packages/monitor/src/components/chaos/BreakPopover.tsx:113 · packages/monitor/src/components/chaos/BreakPopover.tsx:125 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (11 lines × 2 locations) packages/wizard/src/components/JsonUtils.tsx:409— packages/wizard/src/components/JsonUtils.tsx:409 · packages/wizard/src/components/JsonUtils.tsx:602 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
LayerConfig::verify (cyclomatic 53) mirrord/config/src/lib.rs:848— LayerConfig::verify has cyclomatic complexity 53 (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.
LayerConfig::verify_for_preview_env (cyclomatic 21) mirrord/config/src/lib.rs:1228— LayerConfig::verify_for_preview_env has cyclomatic complexity 21 (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.
SettingsForm::handle_key (cyclomatic 33) mirrord/tui/src/screens/targets/form.rs:420— SettingsForm::handle_key has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SettingsForm::draw (cyclomatic 21) mirrord/tui/src/screens/targets/form.rs:618— SettingsForm::draw 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.
FilesProxy::file_request (cyclomatic 28) mirrord/intproxy/src/proxies/files.rs:604— FilesProxy::file_request has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: FileRequest::agent_lost_response (cyclomatic 29) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
FilesProxy::file_response (cyclomatic 17) mirrord/intproxy/src/proxies/files.rs:900— FilesProxy::file_response 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. This is NOT this file's highest cyclomatic complexity: FileRequest::agent_lost_response (cyclomatic 29) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
ClientConnectionHandler::start (cyclomatic 23) mirrord/agent/src/entrypoint.rs:538— ClientConnectionHandler::start has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ClientConnectionHandler::handle_client_message (cyclomatic 22) mirrord/agent/src/entrypoint.rs:638— ClientConnectionHandler::handle_client_message has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord_layer_lib::socket::ops::connect_common (cyclomatic 23) mirrord/layer-lib/src/socket/ops.rs:306— mirrord_layer_lib::socket::ops::connect_common has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
mirrord_layer_lib::debugger_ports::tokenize_argfile (cyclomatic 17) mirrord/layer-lib/src/debugger_ports.rs:429— mirrord_layer_lib::debugger_ports::tokenize_argfile has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord_tui::screens::queues::details_lines (cyclomatic 21) mirrord/tui/src/screens/queues.rs:731— mirrord_tui::screens::queues::details_lines has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: QueuesScreen::handle_event (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
mirrord_tui::screens::targets::suggest::discover (cyclomatic 17) mirrord/tui/src/screens/targets/suggest.rs:23— mirrord_tui::screens::targets::suggest::discover has cyclomatic complexity 17 (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.
OperatorApi::prepare_branch_dbs (cognitive 77) mirrord/operator/src/client.rs:701— OperatorApi::prepare_branch_dbs has cognitive complexity 77 (threshold 15). Drivers by points: if/else 31 (44 pts), loops 11 (26 pts), boolean chains 5, match/switch 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperatorApi::prepare_session (cognitive 21) mirrord/operator/src/client.rs:1519— OperatorApi::prepare_session has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 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.
LayerConfig::verify (cognitive 60) mirrord/config/src/lib.rs:848— LayerConfig::verify has cognitive complexity 60 (threshold 15). Drivers by points: if/else 38 (46 pts), boolean chains 7, loops 2 (4 pts), match/switch 3 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
LayerConfig::verify_for_preview_env (cognitive 21) mirrord/config/src/lib.rs:1228— LayerConfig::verify_for_preview_env has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (19 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.
SettingsForm::handle_key (cognitive 48) mirrord/tui/src/screens/targets/form.rs:420— SettingsForm::handle_key has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 8 (21 pts), boolean chains 6 (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.
SettingsForm::draw (cognitive 40) mirrord/tui/src/screens/targets/form.rs:618— SettingsForm::draw has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (29 pts), match/switch 4 (8 pts), loops 2 (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.
FilesProxy::file_request (cognitive 37) mirrord/intproxy/src/proxies/files.rs:604— FilesProxy::file_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 6 (12 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FilesProxy::file_response (cognitive 21) mirrord/intproxy/src/proxies/files.rs:900— FilesProxy::file_response has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ResolvedTarget::get_env (cognitive 32) mirrord/kube/src/resolved.rs:797— ResolvedTarget::get_env has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (12 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResolvedTarget::assert_valid_mirrord_target (cognitive 16) mirrord/kube/src/resolved.rs:419— ResolvedTarget::assert_valid_mirrord_target has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HttpFilter::matches (cognitive 28) mirrord/agent/src/http/filter.rs:109— HttpFilter::matches has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (10 pts), loops 3 (6 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HttpFilter::fmt (cognitive 19) mirrord/protocol/src/tcp.rs:414— HttpFilter::fmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
GenericBranchConfig::verify_var_references (cognitive 26) mirrord/config/src/feature/database_branches/generic.rs:417— GenericBranchConfig::verify_var_references has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GenericBranchConfig::verify (cognitive 24) mirrord/config/src/feature/database_branches/generic.rs:264— GenericBranchConfig::verify has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, loops 3, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IncomingProxy::handle_message (cognitive 21) mirrord/intproxy/src/proxies/incoming.rs:737— IncomingProxy::handle_message has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 2 (5 pts), loops 2 (5 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
IncomingProxy::handle_chunked_request (cognitive 19) mirrord/intproxy/src/proxies/incoming.rs:474— IncomingProxy::handle_chunked_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). 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.
utils_win::diagnostics::report::build_session_archive (cognitive 19) mirrord/utils-win/src/diagnostics/report.rs:659— utils_win::diagnostics::report::build_session_archive has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
utils_win::diagnostics::dialog::window_proc (cognitive 19) mirrord/utils-win/src/diagnostics/dialog.rs:275— utils_win::diagnostics::dialog::window_proc has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 9). 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.
TooManyMethods: OperatorApi mirrord/operator/src/client.rs:246— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FileManager mirrord/agent/src/file.rs:99— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) mirrord/operator/src/client.rs:705— mirrord/operator/src/client.rs:705-1205 | mirrord/operator/src/client/database_branches.rs:62-156 | mirrord/operator/src/client/database_branches.rs:225-319 | mirrord/operator/src/client/database_branches.rs:387-481 | mirrord/operator/src/client/database_branches.rs:1051-1179 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) mirrord/operator/src/client/database_branches.rs:62— mirrord/operator/src/client/database_branches.rs:62-156 | mirrord/operator/src/client/database_branches.rs:225-319 | mirrord/operator/src/client/database_branches.rs:387-481 | mirrord/operator/src/client/database_branches.rs:1051-1179 | mirrord/operator/src/client/database_branches.rs:1296-1357 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) mirrord/cli/src/db_branches.rs:75— mirrord/cli/src/db_branches.rs:75-103 | mirrord/cli/src/db_branches.rs:113-135 | mirrord/cli/src/db_branches.rs:145-167 | mirrord/cli/src/db_branches.rs:177-199 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) mirrord/protocol-api/src/client/simple_request.rs:84— mirrord/protocol-api/src/client/simple_request.rs:84-106 | mirrord/protocol-api/src/client/simple_request.rs:116-140 | mirrord/protocol-api/src/client/simple_request.rs:150-180 | mirrord/protocol-api/src/client/simple_request.rs:190-221 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (25 lines × 2) mirrord/cli/src/ci.rs:399— mirrord/cli/src/ci.rs:399-423 | mirrord/cli/src/ci.rs:514-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25 lines × 2) mirrord/tui/src/screens/databases.rs:198— mirrord/tui/src/screens/databases.rs:198-222 | mirrord/tui/src/screens/queues.rs:203-227 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19 lines × 2) mirrord/layer-lib/src/socket/ops.rs:631— mirrord/layer-lib/src/socket/ops.rs:631-649 | mirrord/layer/src/socket/ops.rs:967-985 — 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 (19 lines × 2) mirrord/tui/src/screens/databases.rs:505— mirrord/tui/src/screens/databases.rs:505-523 | mirrord/tui/src/screens/queues.rs:512-530 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) mirrord/cli/src/execution.rs:536— mirrord/cli/src/execution.rs:536-553 | mirrord/cli/src/execution.rs:738-755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 2) mirrord/layer/src/file/hooks.rs:954— mirrord/layer/src/file/hooks.rs:954-971 | mirrord/layer/src/file/hooks.rs:979-996 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 3) mirrord/operator/src/client/database_branches.rs:78— mirrord/operator/src/client/database_branches.rs:78-92 | mirrord/operator/src/client/database_branches.rs:241-255 | mirrord/operator/src/client/database_branches.rs:403-417 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (15 lines × 3) mirrord/operator/src/client/database_branches.rs:181— mirrord/operator/src/client/database_branches.rs:181-195 | mirrord/operator/src/client/database_branches.rs:343-357 | mirrord/operator/src/client/database_branches.rs:506-520 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (14–15 lines × 2) mirrord/operator/src/client/database_branches.rs:1156— mirrord/operator/src/client/database_branches.rs:1156-1169 | mirrord/operator/src/client/database_branches.rs:1333-1347 — both copies are in the same file, so extract the 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–15 lines × 2) mirrord/layer/macro/src/lib.rs:40— mirrord/layer/macro/src/lib.rs:40-54 | mirrord/layer/macro/src/lib.rs:126-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) mirrord/cli/src/db_branches.rs:502— mirrord/cli/src/db_branches.rs:502-514 | mirrord/cli/src/db_branches.rs:573-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 2) mirrord/tui/src/screens/databases.rs:230— mirrord/tui/src/screens/databases.rs:230-243 | mirrord/tui/src/screens/queues.rs:235-247 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) mirrord/agent/src/util/io/timeout.rs:51— mirrord/agent/src/util/io/timeout.rs:51-61 | mirrord/agent/src/util/io/timeout.rs:73-83 | mirrord/agent/src/util/io/timeout.rs:88-98 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11 lines × 3) mirrord/operator/src/client/database_branches.rs:168— mirrord/operator/src/client/database_branches.rs:168-178 | mirrord/operator/src/client/database_branches.rs:330-340 | mirrord/operator/src/client/database_branches.rs:493-503 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–10 lines × 2) mirrord/cli/src/external_proxy.rs:101— mirrord/cli/src/external_proxy.rs:101-110 | mirrord/cli/src/main.rs:847-854 — 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–10 lines × 2) mirrord/tui/src/screens/preview_envs/view.rs:655— mirrord/tui/src/screens/preview_envs/view.rs:655-664 | mirrord/tui/src/screens/preview_envs/view.rs:690-697 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8–9 lines × 2) mirrord/cli/src/external_proxy.rs:106— mirrord/cli/src/external_proxy.rs:106-114 | mirrord/cli/src/internal_proxy.rs:349-356 — 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–9 lines × 2) mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:59— mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:59-66 | mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:121-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 4) mirrord/kube/src/resolved.rs:438— mirrord/kube/src/resolved.rs:438-442 | mirrord/kube/src/resolved.rs:504-508 | mirrord/kube/src/resolved.rs:562-566 | mirrord/kube/src/resolved.rs:611-615 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 4) mirrord/protocol-api/src/client/simple_request.rs:85— mirrord/protocol-api/src/client/simple_request.rs:85-89 | mirrord/protocol-api/src/client/simple_request.rs:117-121 | mirrord/protocol-api/src/client/simple_request.rs:157-161 | mirrord/protocol-api/src/client/simple_request.rs:195-199 — 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.
Sync-over-async blocking mirrord/agent/src/task.rs:47— `spawn` 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.
Sync-over-async blocking mirrord/cli/src/local_redis.rs:115— `start` 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.
Duplicated block (14 lines × 2 locations) packages/wizard/src/components/JsonUtils.tsx:566— packages/wizard/src/components/JsonUtils.tsx:566 · packages/wizard/src/components/JsonUtils.tsx:588 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (14 lines × 2 locations) packages/wizard/src/components/steps/ConfigTabs.tsx:128— packages/wizard/src/components/steps/ConfigTabs.tsx:128 · packages/wizard/src/components/steps/TargetTab.tsx:236 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) packages/monitor/src/api.ts:171— packages/monitor/src/api.ts:171 · packages/monitor/src/api.ts:190 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) packages/monitor/src/components/EmptySessionState.tsx:59— packages/monitor/src/components/EmptySessionState.tsx:59 · packages/monitor/src/components/EmptySessionState.tsx:74 — both copies are in the same file, so extract the 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 locations) packages/monitor/src/hooks/useChaosRules.ts:237— packages/monitor/src/hooks/useChaosRules.ts:237 · packages/monitor/src/hooks/useChaosRules.ts:280 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 2 locations) packages/wizard/src/components/JsonUtils.tsx:58— packages/wizard/src/components/JsonUtils.tsx:58 · packages/wizard/src/components/JsonUtils.tsx:280 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) packages/monitor/src/api.ts:270— packages/monitor/src/api.ts:270 · packages/monitor/src/api.ts:285 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (9 lines × 2 locations) packages/wizard/src/components/JsonUtils.tsx:363— packages/wizard/src/components/JsonUtils.tsx:363 · packages/wizard/src/components/JsonUtils.tsx:383 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
AC2 · Forms & labels· <SearchInput> field component without a label · ×1
<SearchInput> field component without a label packages/monitor/src/components/SessionSidebar.tsx:213— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels· <Textarea> field component without a label · ×1
<Textarea> field component without a label packages/monitor/src/components/chaos/RequestChaosTypeDialog.tsx:60— This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels· <RadioGroup> field component without a label · ×1
<RadioGroup> field component without a label packages/wizard/src/components/steps/NetworkTab.tsx:292— This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure· Page without a main landmark · ×1
Page without a main landmark REDACTED:2— No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 60 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
App.App (cyclomatic 54) packages/monitor/src/App.tsx:55— App.App has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 9 of the 54 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 254, 129, 184, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
OperatorApi::prepare_branch_dbs (cyclomatic 49) mirrord/operator/src/client.rs:701— OperatorApi::prepare_branch_dbs has cyclomatic complexity 49 (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.
TargetTab.TargetTab (cyclomatic 47) packages/wizard/src/components/steps/TargetTab.tsx:52— TargetTab.TargetTab has cyclomatic complexity 47 (threshold 15). Of this number, 26 points are the body's own statements and 21 belong to 14 function literals inside it that branch. 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.
Wizard.Wizard (cyclomatic 38) packages/wizard/src/components/Wizard.tsx:50— Wizard.Wizard has cyclomatic complexity 38 (threshold 15). Of this number, 17 points are the body's own statements and 21 belong to 7 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PreviewEnvsScreen::handle_event (cyclomatic 37) mirrord/tui/src/screens/preview_envs.rs:118— PreviewEnvsScreen::handle_event has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
OutgoingProxy::run (cyclomatic 36) mirrord/intproxy/src/proxies/outgoing.rs:785— OutgoingProxy::run has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
EventStream.EventStream (cyclomatic 34) packages/monitor/src/components/EventStream.tsx:58— EventStream.EventStream has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 177, 256, 139, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
DatabaseBranchConfig::copy_mode (cyclomatic 33) mirrord/config/src/feature/database_branches.rs:609— DatabaseBranchConfig::copy_mode has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
JsonUtils.readCurrentFilters (cyclomatic 33) packages/wizard/src/components/JsonUtils.tsx:325— JsonUtils.readCurrentFilters has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Input::handle_key (cyclomatic 32) mirrord/tui/src/screens/targets/form.rs:256— Input::handle_key has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TrafficTunnels::handle_event (cyclomatic 31) mirrord/protocol-api/src/client/tunnels.rs:400— TrafficTunnels::handle_event 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.
SessionSidebar.SessionSidebar (cyclomatic 31) packages/monitor/src/components/SessionSidebar.tsx:88— SessionSidebar.SessionSidebar has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ConfigFlags::new (cyclomatic 28) mirrord/config/derive/src/config/flag.rs:66— ConfigFlags::new has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
TcpStealerApi::handle_client_message (cyclomatic 27) mirrord/agent/src/steal/api.rs:487— TcpStealerApi::handle_client_message 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.
PortForwarder::handle_msg_from_agent (cyclomatic 27) mirrord/cli/src/port_forward.rs:215— PortForwarder::handle_msg_from_agent has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
App::handle_event (cyclomatic 27) mirrord/tui/src/app.rs:379— App::handle_event has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PreviewDiagnostics.PreviewDiagnostics (cyclomatic 27) packages/monitor/src/components/PreviewDiagnostics.tsx:40— PreviewDiagnostics.PreviewDiagnostics has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
useChaosRules.useChaosRules (cyclomatic 26) packages/monitor/src/hooks/useChaosRules.ts:102— useChaosRules.useChaosRules has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 10 function literals inside it that branch (lines 144, 120, 222, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
SessionDetail.SessionDetail (cyclomatic 24) packages/monitor/src/components/SessionDetail.tsx:35— SessionDetail.SessionDetail has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 103, 49, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
JsonUtils.updateConfigFilter (cyclomatic 24) packages/wizard/src/components/JsonUtils.tsx:428— JsonUtils.updateConfigFilter has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
TargetConfig::collect_analytics (cyclomatic 23) mirrord/config/src/target.rs:702— TargetConfig::collect_analytics has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
UnifiedDatabaseBranchParams::new (cyclomatic 23) mirrord/operator/src/client/database_branches.rs:1394— UnifiedDatabaseBranchParams::new has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
StatusCommandHandler::handle (cyclomatic 20) mirrord/cli/src/operator/status.rs:203— StatusCommandHandler::handle 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.
GenericBranchConfig::verify (cyclomatic 20) mirrord/config/src/feature/database_branches/generic.rs:264— GenericBranchConfig::verify 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.
IntProxy::handle_agent_message (cyclomatic 20) mirrord/intproxy/src/lib.rs:711— IntProxy::handle_agent_message has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord_layer::socket::ops::bind (cyclomatic 20) mirrord/layer/src/socket/ops.rs:173— mirrord_layer::socket::ops::bind 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.
DebuggerType::get_ports (cyclomatic 20) mirrord/layer-lib/src/debugger_ports.rs:155— DebuggerType::get_ports 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.
Interceptor::run (cyclomatic 19) mirrord/intproxy/src/proxies/outgoing/interceptor.rs:110— Interceptor::run has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord_kube::api::container::job::create_job_agent (cyclomatic 19) mirrord/kube/src/api/container/job.rs:41— mirrord_kube::api::container::job::create_job_agent 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.
ClientTask::handle_server_message (cyclomatic 19) mirrord/protocol-api/src/client/task.rs:301— ClientTask::handle_server_message has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Browser::handle_key (cyclomatic 19) mirrord/tui/src/screens/targets/browser.rs:301— Browser::handle_key has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
mirrord_up::process::supervise_with_second_signal (cyclomatic 19) mirrord/up/src/process.rs:343— mirrord_up::process::supervise_with_second_signal has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
HttpFilter::matches (cyclomatic 18) mirrord/agent/src/http/filter.rs:109— HttpFilter::matches has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ExecParams::as_env_vars (cyclomatic 18) mirrord/cli/src/config.rs:493— ExecParams::as_env_vars has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
IncomingProxy::handle_message (cyclomatic 18) mirrord/intproxy/src/proxies/incoming.rs:737— IncomingProxy::handle_message has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SubscribeEventsTable.SubscribeEventsTable (cyclomatic 18) packages/monitor/src/components/SubscribeEventsTable.tsx:145— SubscribeEventsTable.SubscribeEventsTable has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 183, 177, 170, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
ResolvedTarget::assert_valid_mirrord_target (cyclomatic 17) mirrord/kube/src/resolved.rs:419— ResolvedTarget::assert_valid_mirrord_target 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.
utils_win::diagnostics::dialog::window_proc (cyclomatic 17) mirrord/utils-win/src/diagnostics/dialog.rs:275— utils_win::diagnostics::dialog::window_proc 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.
EventRow.EventRow (cyclomatic 17) packages/monitor/src/components/events/EventRow.tsx:22— EventRow.EventRow has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
JsonUtils.updateConfigPorts (cyclomatic 17) packages/wizard/src/components/JsonUtils.tsx:621— JsonUtils.updateConfigPorts has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ProtocolAndAddressFilter::matches (cyclomatic 16) mirrord/layer-lib/src/socket.rs:697— ProtocolAndAddressFilter::matches has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ContextNamespacePicker.NamespaceCombobox (cyclomatic 16) packages/monitor/src/components/ContextNamespacePicker.tsx:96— ContextNamespacePicker.NamespaceCombobox has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
OperatorSessionDetail.OperatorSessionDetail (cyclomatic 16) packages/monitor/src/components/OperatorSessionDetail.tsx:74— OperatorSessionDetail.OperatorSessionDetail has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Repeated repair: mirrord/cli/src/pitm.rs mirrord/cli/src/pitm.rs:91— mirrord/cli/src/pitm.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is mirrord::pitm::run_as_java_launcher at line 91), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(cli): give pitm a per-build layer path”; “fix(layer): kill the injected child on Windows via a job object”; “Fix broken windows tests (#4422)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-02..2026-09-30, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-02 01:59:33 +00:00' --until='2026-09-30 01:59:33 +00:00' --full-history --no-merges -- mirrord/cli/src/pitm.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.
HackComment mirrord/cli/src/prefetch.rs:439— // HACK ideally this would be handled by protocol-api — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
OutgoingProxy::run (cognitive 72) mirrord/intproxy/src/proxies/outgoing.rs:785— OutgoingProxy::run has cognitive complexity 72 (threshold 15). Drivers by points: match/switch 10 (34 pts), if/else 8 (33 pts), loops 2 (5 pts) (nesting depth added 52). 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.
App.App (cognitive 62) packages/monitor/src/App.tsx:55— App.App has cognitive complexity 62 (threshold 15). Drivers by points: if/else 26 (27 pts), ternaries 14 (23 pts), boolean chains 10, error handling 1, loops 1 (nesting depth added 10). Most of this is not in the body itself: 13 of the 62 points are its own statements and the rest belongs to 27 function literals inside it that branch (lines 254, 129, 184, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TrafficTunnels::handle_event (cognitive 59) mirrord/protocol-api/src/client/tunnels.rs:400— TrafficTunnels::handle_event has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 5 (12 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PortForwarder::handle_msg_from_agent (cognitive 55) mirrord/cli/src/port_forward.rs:215— PortForwarder::handle_msg_from_agent has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 11 (30 pts), if/else 7 (25 pts) (nesting depth added 37). 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.
TcpStealerApi::handle_client_message (cognitive 46) mirrord/agent/src/steal/api.rs:487— TcpStealerApi::handle_client_message has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (38 pts), match/switch 3 (5 pts), loops 1 (3 pts) (nesting depth added 27). 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.
TcpMirrorApi::next (cognitive 44) mirrord/agent/src/mirror.rs:97— TcpMirrorApi::next has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (35 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Wizard.Wizard (cognitive 42) packages/wizard/src/components/Wizard.tsx:50— Wizard.Wizard has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 14, if/else 9 (11 pts), match/switch 1 (nesting depth added 8). Most of this is not in the body itself: 14 of the 42 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 117, 85, 99, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FullResponseFut::poll (cognitive 40) mirrord/protocol-api/src/client/tunnels/streams.rs:275— FullResponseFut::poll has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 4 (13 pts), loops 2 (6 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatusCommandHandler::handle (cognitive 38) mirrord/cli/src/operator/status.rs:203— StatusCommandHandler::handle has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 8 (15 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionSidebar.SessionSidebar (cognitive 38) packages/monitor/src/components/SessionSidebar.tsx:88— SessionSidebar.SessionSidebar has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 11 (19 pts), boolean chains 14, if/else 5 (nesting depth added 8). Of this number, 30 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DebuggerType::get_ports (cognitive 36) mirrord/layer-lib/src/debugger_ports.rs:155— DebuggerType::get_ports has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 7 (14 pts), boolean chains 3 (nesting depth added 14). 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.
mirrord_kube::api::container::job::create_job_agent (cognitive 35) mirrord/kube/src/api/container/job.rs:41— mirrord_kube::api::container::job::create_job_agent has cognitive complexity 35 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 4 (10 pts), boolean chains 2, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TargetConfig::collect_analytics (cognitive 34) mirrord/config/src/target.rs:702— TargetConfig::collect_analytics has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
useChaosRules.useChaosRules (cognitive 34) packages/monitor/src/hooks/useChaosRules.ts:102— useChaosRules.useChaosRules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (21 pts), ternaries 5 (7 pts), boolean chains 3, loops 2, error handling 1 (nesting depth added 8). Most of this is not in the body itself: 0 of the 34 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 144, 120, 222, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
TargetTab.TargetTab (cognitive 32) packages/wizard/src/components/steps/TargetTab.tsx:52— TargetTab.TargetTab has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, ternaries 11, if/else 6. Of this number, 19 points are the body's own statements and 13 belong to 14 function literals inside it that branch. 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.
PreviewDiagnostics.PreviewDiagnostics (cognitive 31) packages/monitor/src/components/PreviewDiagnostics.tsx:40— PreviewDiagnostics.PreviewDiagnostics has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 8, if/else 7 (nesting depth added 6). Of this number, 23 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalConnectionTask::run (cognitive 29) mirrord/cli/src/port_forward.rs:849— LocalConnectionTask::run has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 9 (20 pts), if/else 2 (8 pts), loops 1 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
mirrord_up::process::supervise_with_second_signal (cognitive 29) mirrord/up/src/process.rs:343— mirrord_up::process::supervise_with_second_signal has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 8 (14 pts), if/else 10 (13 pts), loops 2 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DatabaseBranchConfig::copy_mode (cognitive 28) mirrord/config/src/feature/database_branches.rs:609— DatabaseBranchConfig::copy_mode has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 14 (28 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Interceptor::run (cognitive 26) mirrord/intproxy/src/proxies/outgoing/interceptor.rs:110— Interceptor::run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 4 (9 pts), boolean chains 2, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClientConnectionHandler::start (cognitive 25) mirrord/agent/src/entrypoint.rs:538— ClientConnectionHandler::start has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 11 (20 pts), if/else 2 (4 pts), loops 1 (nesting depth added 11). 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.
TcpProxyTask::run (cognitive 25) mirrord/intproxy/src/proxies/incoming/tcp_proxy.rs:145— TcpProxyTask::run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventStream.EventStream (cognitive 25) packages/monitor/src/components/EventStream.tsx:58— EventStream.EventStream has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, ternaries 7 (8 pts), if/else 2 (nesting depth added 1). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 177, 256, 139, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Browser::rows (cognitive 24) mirrord/tui/src/screens/targets/browser.rs:202— Browser::rows has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConfigFlags::new (cognitive 23) mirrord/config/derive/src/config/flag.rs:66— ConfigFlags::new has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, match/switch 4 (9 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
mirrord_layer::socket::ops::bind (cognitive 23) mirrord/layer/src/socket/ops.rs:173— mirrord_layer::socket::ops::bind has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HttpGatewayTask::run (cognitive 22) mirrord/intproxy/src/proxies/incoming/http_gateway.rs:367— HttpGatewayTask::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatabaseBranchParams::new (cognitive 22) mirrord/operator/src/client/database_branches.rs:551— DatabaseBranchParams::new has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (7 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.
JsonUtils.updateConfigFilter (cognitive 22) packages/wizard/src/components/JsonUtils.tsx:428— JsonUtils.updateConfigFilter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, ternaries 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MirrordCi::prepare_container_command (cognitive 21) mirrord/cli/src/ci.rs:457— MirrordCi::prepare_container_command has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 3 (7 pts) (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
App::handle_event (cognitive 20) mirrord/tui/src/app.rs:379— App::handle_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 5 (9 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TerminalScreen::draw (cognitive 20) mirrord/tui/src/screens/terminal.rs:240— TerminalScreen::draw has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PidWatch::run (cognitive 20) mirrord/utils-win/src/diagnostics/monitor/server.rs:352— PidWatch::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), 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.
ExecParams::as_env_vars (cognitive 19) mirrord/cli/src/config.rs:493— ExecParams::as_env_vars has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (17 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.
ProtocolAndAddressFilter::matches (cognitive 19) mirrord/layer-lib/src/socket.rs:697— ProtocolAndAddressFilter::matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 5). 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.
PingPong::run (cognitive 19) mirrord/intproxy/src/ping_pong.rs:86— PingPong::run has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 11). 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.
mirrord_operator::client::database_branches::create_branches (cognitive 19) mirrord/operator/src/client/database_branches.rs:1046— mirrord_operator::client::database_branches::create_branches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Input::handle_key (cognitive 19) mirrord/tui/src/screens/targets/form.rs:256— Input::handle_key has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, match/switch 3 (5 pts) (nesting depth added 6). 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.
RedirectorTask::handle_initialized_connection (cognitive 18) mirrord/agent/src/incoming/task.rs:259— RedirectorTask::handle_initialized_connection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (6 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FailoverStrategy::run_with_termination (cognitive 18) mirrord/intproxy/src/failover_strategy.rs:181— FailoverStrategy::run_with_termination has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 3 (5 pts), loops 3, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UnifiedDatabaseBranchParams::new (cognitive 18) mirrord/operator/src/client/database_branches.rs:1394— UnifiedDatabaseBranchParams::new has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 4 (7 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AsyncDecoder::poll_next (cognitive 17) mirrord/intproxy/protocol/src/codec/codec_async.rs:168— AsyncDecoder::poll_next has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (14 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.
LayerInitializer::run (cognitive 17) mirrord/intproxy/src/layer_initializer.rs:142— LayerInitializer::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (8 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.
SinglePortForwarder::into_retry_future (cognitive 17) mirrord/kube/src/api/kubernetes/portforwarder.rs:151— SinglePortForwarder::into_retry_future has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LayerManagedProcess::add_mirrord_env_vars (cognitive 17) mirrord/layer-lib/src/process/windows/execution/mod.rs:149— LayerManagedProcess::add_mirrord_env_vars has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 5). 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.
mirrord_protocol_io::websocket::run_writer (cognitive 17) mirrord/protocol-io/src/websocket.rs:327— mirrord_protocol_io::websocket::run_writer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
JsonUtils.readCurrentFilters (cognitive 17) packages/wizard/src/components/JsonUtils.tsx:325— JsonUtils.readCurrentFilters has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (6 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
TcpStealerTask::handle_stolen_traffic (cognitive 16) mirrord/agent/src/steal/task.rs:145— TcpStealerTask::handle_stolen_traffic has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (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.
ConnInfo::connection_string (cognitive 16) mirrord/cli/src/internal_proxy/db_portforwards.rs:208— ConnInfo::connection_string has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 5). 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.
ShardedMap::for_each (cognitive 16) mirrord/layer-win/src/managed/sharded_map.rs:225— ShardedMap::for_each has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (11 pts), match/switch 1 (3 pts), if/else 1 (2 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PreviewEnvsScreen::handle_event (cognitive 16) mirrord/tui/src/screens/preview_envs.rs:118— PreviewEnvsScreen::handle_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 5 (8 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UpConfig::collect_analytics (cognitive 16) mirrord/up/src/config.rs:930— UpConfig::collect_analytics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 2 (4 pts), loops 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.
EventBuffer.absorb (cognitive 16) packages/monitor/src/eventBuffer.ts:29— EventBuffer.absorb has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), ternaries 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D22 · Internal API Consistency· Redundant methods with nearly identical names and likely identical functionality (mutating vs immutable builder pattern). The distinction is unclear from signatures alone and suggests a copy-paste error or incomplete refactoring. · ×1
Redundant methods with nearly identical names and likely identical functionality (mutating vs immutable builder pattern). The distinction is unclear from signatures alone and suggests a copy-paste error or incomplete refactoring. — Remove `override_env_mut` if `override_env` already handles mutation, or rename to clearly distinguish intent (e.g., `override_env_immutable` vs `override_env_in_place`). (signatures: ConfigContext.override_env(key: K, value: V): Self | ConfigContext.override_env_mut(key: K, value: V))
D22 · Internal API Consistency· Ambiguous naming for cleanup operations. It is unclear if `cleanup_verified` performs a stricter check, returns different error types, or is simply a redundant alias. · ×1
Ambiguous naming for cleanup operations. It is unclear if `cleanup_verified` performs a stricter check, returns different error types, or is simply a redundant alias. — Rename `cleanup_verified` to `cleanup_and_verify` or `cleanup_strict` to clarify the additional behavior, or remove if it is identical to `cleanup`. (signatures: SafeIpTables.cleanup(): IPTablesResult | SafeIpTables.cleanup_verified(): IPTablesResult)
TooManyFields: ConnectParams mirrord/operator/src/client/connect_params.rs:25— TooManyFields — 41 stored fields beside 1 method. The bar is 30 stored fields; this is 11 over it, 1.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
D4 · Code Duplication· Near-duplicate member family (3 members, 35 shared lines) · ×1
Near-duplicate member family (3 members, 35 shared lines) mirrord/operator/src/client/database_branches.rs:167— mirrord/operator/src/client/database_branches.rs:167-214 | mirrord/operator/src/client/database_branches.rs:329-376 | mirrord/operator/src/client/database_branches.rs:492-539 — These 3 members are variants of one another: a block of 35 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 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 3 times.
Near-duplicate member pair (60 shared lines) mirrord/operator/src/client.rs:1530— mirrord/operator/src/client.rs:1530-1681 | mirrord/operator/src/client.rs:1837-1956 — These two members are variants of one another: 60 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (44 shared lines) mirrord/cli/src/execution.rs:458— mirrord/cli/src/execution.rs:458-572 | mirrord/cli/src/execution.rs:612-776 — These two members are variants of one another: 44 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (43 shared lines) mirrord/cli/src/ci.rs:369— mirrord/cli/src/ci.rs:369-452 | mirrord/cli/src/ci.rs:466-575 — These two members are variants of one another: 43 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (27 shared lines) mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:46— mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:46-96 | mirrord/kube/src/api/kubernetes/rollout/workload_ref.rs:108-162 — These two members are variants of one another: 27 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Edited copy of a member (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) mirrord/kube/src/api/kubernetes/seeker.rs:273— mirrord/kube/src/api/kubernetes/seeker.rs:273-305 | mirrord/kube/src/api/kubernetes/seeker.rs:322-352 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) mirrord/operator/src/client/database_branches.rs:1806— mirrord/operator/src/client/database_branches.rs:1806-1851 | mirrord/operator/src/client/database_branches.rs:1861-1902 | mirrord/operator/src/client/database_branches.rs:1912-1953 | mirrord/operator/src/client/database_branches.rs:1962-2002 | mirrord/operator/src/client/database_branches.rs:2012-2053 | mirrord/operator/src/client/database_branches.rs:2063-2102 | mirrord/operator/src/client/database_branches.rs:2112-2151 | mirrord/operator/src/client/database_branches.rs:2160-2199 | mirrord/operator/src/client/database_branches.rs:2209-2248 | mirrord/operator/src/client/database_branches.rs:2257-2305 — These 10 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 10 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 10 times.
Duplicated block (49 lines × 2) mirrord/tui/src/screens/databases.rs:386— mirrord/tui/src/screens/databases.rs:386-434 | mirrord/tui/src/screens/queues.rs:393-441 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (36 lines × 2) mirrord/operator/src/client.rs:1569— mirrord/operator/src/client.rs:1569-1604 | mirrord/operator/src/client.rs:1892-1927 — both copies are in the same file, so extract the 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 (34 lines × 2) mirrord/cli/src/port_forward.rs:1049— mirrord/cli/src/port_forward.rs:1049-1082 | mirrord/layer-lib/src/setup.rs:331-364 — 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 (30–31 lines × 2) mirrord/tui/src/screens/databases.rs:246— mirrord/tui/src/screens/databases.rs:246-275 | mirrord/tui/src/screens/queues.rs:259-289 — before extracting anything, compare `mirrord/tui/src/screens/databases.rs` and `mirrord/tui/src/screens/queues.rs` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 246 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (27–29 lines × 2) mirrord/cli/src/preview.rs:608— mirrord/cli/src/preview.rs:608-636 | mirrord/cli/src/preview.rs:830-856 — both copies are in the same file, so extract the 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 (27–28 lines × 2) mirrord/layer/src/socket/ops.rs:1050— mirrord/layer/src/socket/ops.rs:1050-1076 | mirrord/layer/src/socket/ops.rs:1142-1169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (25–27 lines × 2) mirrord/cli/src/preview.rs:866— mirrord/cli/src/preview.rs:866-892 | mirrord/cli/src/preview.rs:991-1015 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20–22 lines × 2) mirrord/layer/src/socket/ops.rs:1086— mirrord/layer/src/socket/ops.rs:1086-1107 | mirrord/layer/src/socket/ops.rs:1185-1204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 3) mirrord/operator/src/client/database_branches.rs:94— mirrord/operator/src/client/database_branches.rs:94-113 | mirrord/operator/src/client/database_branches.rs:257-276 | mirrord/operator/src/client/database_branches.rs:419-438 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (19 lines × 4) mirrord/operator/src/client/database_branches.rs:1833— mirrord/operator/src/client/database_branches.rs:1833-1851 | mirrord/operator/src/client/database_branches.rs:1935-1953 | mirrord/operator/src/client/database_branches.rs:2035-2053 | mirrord/operator/src/client/database_branches.rs:2084-2102 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (16–19 lines × 3) mirrord/operator/src/client/database_branches.rs:2345— mirrord/operator/src/client/database_branches.rs:2345-2363 | mirrord/operator/src/client/database_branches.rs:2414-2429 | mirrord/operator/src/client/database_branches.rs:2470-2485 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (18–19 lines × 2) mirrord/cli/src/execution.rs:463— mirrord/cli/src/execution.rs:463-481 | mirrord/cli/src/execution.rs:613-630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (18 lines × 4) mirrord/cli/src/db_branches.rs:86— mirrord/cli/src/db_branches.rs:86-103 | mirrord/cli/src/db_branches.rs:118-135 | mirrord/cli/src/db_branches.rs:150-167 | mirrord/cli/src/db_branches.rs:182-199 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (17–18 lines × 2) mirrord/cli/src/config.rs:1685— mirrord/cli/src/config.rs:1685-1702 | mirrord/cli/src/config.rs:1711-1727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13–14 lines × 4) mirrord/operator/src/client/database_branches.rs:132— mirrord/operator/src/client/database_branches.rs:132-145 | mirrord/operator/src/client/database_branches.rs:295-308 | mirrord/operator/src/client/database_branches.rs:457-470 | mirrord/operator/src/client/database_branches.rs:1152-1164 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (13 lines × 5) mirrord/operator/src/client/database_branches.rs:117— mirrord/operator/src/client/database_branches.rs:117-129 | mirrord/operator/src/client/database_branches.rs:280-292 | mirrord/operator/src/client/database_branches.rs:442-454 | mirrord/operator/src/client/database_branches.rs:1137-1149 | mirrord/operator/src/client/database_branches.rs:1313-1325 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12–13 lines × 4) mirrord/operator/src/client/database_branches.rs:102— mirrord/operator/src/client/database_branches.rs:102-114 | mirrord/operator/src/client/database_branches.rs:265-277 | mirrord/operator/src/client/database_branches.rs:427-439 | mirrord/operator/src/client/database_branches.rs:1123-1134 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (11–12 lines × 5) mirrord/operator/src/client/database_branches.rs:136— mirrord/operator/src/client/database_branches.rs:136-146 | mirrord/operator/src/client/database_branches.rs:299-309 | mirrord/operator/src/client/database_branches.rs:461-471 | mirrord/operator/src/client/database_branches.rs:1155-1165 | mirrord/operator/src/client/database_branches.rs:1332-1343 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10–12 lines × 2) mirrord/cli/src/data/global_config.rs:259— mirrord/cli/src/data/global_config.rs:259-270 | mirrord/cli/src/data/global_config.rs:299-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10–11 lines × 2) mirrord/intproxy/src/failover_strategy.rs:215— mirrord/intproxy/src/failover_strategy.rs:215-224 | mirrord/intproxy/src/lib.rs:469-479 — 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–10 lines × 4) mirrord/operator/src/client.rs:1161— mirrord/operator/src/client.rs:1161-1168 | mirrord/operator/src/client.rs:1171-1178 | mirrord/operator/src/client.rs:1179-1187 | mirrord/operator/src/client/database_branches.rs:1123-1132 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 9) mirrord/operator/src/client/database_branches.rs:1813— mirrord/operator/src/client/database_branches.rs:1813-1821 | mirrord/operator/src/client/database_branches.rs:1866-1874 | mirrord/operator/src/client/database_branches.rs:1917-1925 | mirrord/operator/src/client/database_branches.rs:1966-1974 | mirrord/operator/src/client/database_branches.rs:2017-2025 | mirrord/operator/src/client/database_branches.rs:2067-2075 | mirrord/operator/src/client/database_branches.rs:2116-2124 | mirrord/operator/src/client/database_branches.rs:2164-2172 | mirrord/operator/src/client/database_branches.rs:2269-2277 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8–9 lines × 6) mirrord/operator/src/client/database_branches.rs:1965— mirrord/operator/src/client/database_branches.rs:1965-1972 | mirrord/operator/src/client/database_branches.rs:2066-2073 | mirrord/operator/src/client/database_branches.rs:2115-2122 | mirrord/operator/src/client/database_branches.rs:2163-2170 | mirrord/operator/src/client/database_branches.rs:2212-2219 | mirrord/operator/src/client/database_branches.rs:2267-2275 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (7–9 lines × 2) mirrord/cli/src/ui/server/v2.rs:466— mirrord/cli/src/ui/server/v2.rs:466-474 | mirrord/cli/src/ui/server/v2.rs:583-589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 3) mirrord/layer-win/src/hooks/socket/mod.rs:252— mirrord/layer-win/src/hooks/socket/mod.rs:252-258 | mirrord/layer-win/src/hooks/socket/mod.rs:276-282 | mirrord/layer-win/src/hooks/socket/mod.rs:300-306 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 3) mirrord/agent/iptables/src/mesh/exclusion.rs:44— mirrord/agent/iptables/src/mesh/exclusion.rs:44-49 | mirrord/agent/iptables/src/output.rs:93-98 | mirrord/agent/iptables/src/prerouting.rs:44-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (8 lines × 3) mirrord/tui/src/screens/preview_envs/view.rs:536— mirrord/tui/src/screens/preview_envs/view.rs:536-543 | mirrord/tui/src/screens/preview_envs/view.rs:563-570 | mirrord/tui/src/screens/preview_envs/view.rs:649-656 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 5) mirrord/kube/src/resolved.rs:438— mirrord/kube/src/resolved.rs:438-442 | mirrord/kube/src/resolved.rs:504-508 | mirrord/kube/src/resolved.rs:562-566 | mirrord/kube/src/resolved.rs:611-615 | mirrord/kube/src/resolved.rs:633-637 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (5 lines × 3) mirrord/cli/src/config.rs:517— mirrord/cli/src/config.rs:517-521 | mirrord/cli/src/config.rs:726-730 | mirrord/cli/src/config.rs:1563-1567 — 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — packages/monitor/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
Duplication concentrated across 3 sibling directories (5 clone groups) packages/monitor/eslint.config.js:1— 5 duplicated blocks under packages/ have copies in at least two of the sibling directories monitor, ui, wizard — 0 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplicated block (26 lines × 3 locations) packages/wizard/src/components/JsonUtils.tsx:432— packages/wizard/src/components/JsonUtils.tsx:432 · packages/wizard/src/components/JsonUtils.tsx:621 · packages/wizard/src/components/JsonUtils.tsx:709 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (26 lines × 2 locations) packages/wizard/src/components/steps/TargetTab.tsx:339— packages/wizard/src/components/steps/TargetTab.tsx:339 · packages/wizard/src/components/steps/TargetTab.tsx:450 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication· Duplicated block with local edits (18 matched lines × 2 locations) · ×1
Duplicated block with local edits (18 matched lines × 2 locations) packages/monitor/src/components/ContextNamespacePicker.tsx:40— packages/monitor/src/components/ContextNamespacePicker.tsx:40 · packages/monitor/src/components/ContextNamespacePicker.tsx:129 — the two spans are one implementation copied and then locally edited — 95 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (17 lines × 2 locations) packages/wizard/src/components/steps/TargetTab.tsx:386— packages/wizard/src/components/steps/TargetTab.tsx:386 · packages/wizard/src/components/steps/TargetTab.tsx:488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2 locations) packages/wizard/src/components/JsonUtils.tsx:649— packages/wizard/src/components/JsonUtils.tsx:649 · packages/wizard/src/components/JsonUtils.tsx:737 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication· Duplicated block with local edits (15 matched lines × 2 locations) · ×1
Duplicated block with local edits (15 matched lines × 2 locations) packages/monitor/src/components/AppHeader.tsx:61— packages/monitor/src/components/AppHeader.tsx:61 · packages/monitor/src/components/ContextNamespacePicker.tsx:237 — the two spans are one implementation copied and then locally edited — 97 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (15 lines × 2 locations) packages/monitor/src/components/FunnelHero.tsx:95— packages/monitor/src/components/FunnelHero.tsx:95 · packages/monitor/src/components/SessionSidebar.tsx:525 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (13 lines × 4 locations) packages/wizard/src/components/JsonUtils.tsx:76— packages/wizard/src/components/JsonUtils.tsx:76 · packages/wizard/src/components/JsonUtils.tsx:457 · packages/wizard/src/components/JsonUtils.tsx:646 · packages/wizard/src/components/JsonUtils.tsx:734 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (12 lines × 3 locations) packages/wizard/src/components/steps/LearningSteps.tsx:58— packages/wizard/src/components/steps/LearningSteps.tsx:58 · packages/wizard/src/components/steps/LearningSteps.tsx:70 · packages/wizard/src/components/steps/LearningSteps.tsx:82 — all 3 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
Duplicated block (10 lines × 2 locations) packages/wizard/src/components/steps/TargetTab.tsx:319— packages/wizard/src/components/steps/TargetTab.tsx:319 · packages/wizard/src/components/steps/TargetTab.tsx:437 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (9 lines × 4 locations) packages/monitor/src/components/chaos/ChaosRuleForm.tsx:208— packages/monitor/src/components/chaos/ChaosRuleForm.tsx:208 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:217 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:226 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:266 — all 4 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (8 lines × 2 locations) packages/monitor/src/components/OperatorSessionDetail.tsx:42— packages/monitor/src/components/OperatorSessionDetail.tsx:42 · packages/monitor/src/utils.ts:102 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (8 lines × 3 locations) packages/wizard/src/components/JsonUtils.tsx:334— packages/wizard/src/components/JsonUtils.tsx:334 · packages/wizard/src/components/JsonUtils.tsx:567 · packages/wizard/src/components/JsonUtils.tsx:589 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) packages/monitor/src/components/chaos/ChaosRuleForm.tsx:230— packages/monitor/src/components/chaos/ChaosRuleForm.tsx:230 · packages/monitor/src/components/chaos/ChaosRuleForm.tsx:270 — all 2 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
Duplicated block (5 lines × 2 locations) packages/monitor/src/hooks/useChaosRules.ts:222— packages/monitor/src/hooks/useChaosRules.ts:222 · packages/monitor/src/hooks/useChaosRules.ts:246 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Complex function TargetTab (cyclomatic 30, cognitive 28) packages/wizard/src/components/steps/TargetTab.tsx:52— TargetTab has cyclomatic complexity 30 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function SessionSidebar (cyclomatic 23, cognitive 22) packages/monitor/src/components/SessionSidebar.tsx:88— SessionSidebar has cyclomatic complexity 23 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updateConfigFilter (cyclomatic 22, cognitive 23) packages/wizard/src/components/JsonUtils.tsx:428— updateConfigFilter has cyclomatic complexity 22 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function PreviewDiagnostics (cyclomatic 20, cognitive 20) packages/monitor/src/components/PreviewDiagnostics.tsx:40— PreviewDiagnostics has cyclomatic complexity 20 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function OperatorSessionDetail (cyclomatic 19, cognitive 18) packages/monitor/src/components/OperatorSessionDetail.tsx:74— OperatorSessionDetail has cyclomatic complexity 19 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Wizard (cyclomatic 19, cognitive 16) packages/wizard/src/components/Wizard.tsx:50— Wizard has cyclomatic complexity 19 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 17, cognitive 14) packages/wizard/src/components/JsonUtils.tsx:330— (anonymous) has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updateConfigPorts (cyclomatic 17, cognitive 14) packages/wizard/src/components/JsonUtils.tsx:621— updateConfigPorts has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function EventRow (cyclomatic 16, cognitive 14) packages/monitor/src/components/events/EventRow.tsx:22— EventRow has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function EventStream (cyclomatic 15, cognitive 11) packages/monitor/src/components/EventStream.tsx:58— EventStream has cyclomatic complexity 15 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function NetworkTab (cyclomatic 14, cognitive 13) packages/wizard/src/components/steps/NetworkTab.tsx:149— NetworkTab has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function updateConfigPortMapping (cyclomatic 14, cognitive 12) packages/wizard/src/components/JsonUtils.tsx:706— updateConfigPortMapping has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function NamespaceCombobox (cyclomatic 14, cognitive 11) packages/monitor/src/components/ContextNamespacePicker.tsx:96— NamespaceCombobox has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 12, cognitive 11) packages/wizard/src/components/JsonUtils.tsx:175— (anonymous) has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function timeout (cyclomatic 11, cognitive 11) packages/monitor/src/App.tsx:254— timeout has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Widget (cyclomatic 11, cognitive 10) packages/monitor/src/components/Widget.tsx:17— Widget has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function App (cyclomatic 11, cognitive 9) packages/monitor/src/App.tsx:55— App has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function describe (cyclomatic 11, cognitive 8) packages/monitor/src/subscribeEvents.ts:68— describe has cyclomatic complexity 11 and cognitive complexity 8; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function parseEvent (cyclomatic 11, cognitive 4) packages/monitor/src/components/events/parseEvent.ts:14— parseEvent has cyclomatic complexity 11 and cognitive complexity 4; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Dead file (~158 LoC) REDACTED— no import path from any entry point (9 application, 12 tooling, 34 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Unused dependency 'express' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'portfinder' — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency '@eslint/js' — Declared in packages/monitor/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 13 significant file(s) lose their only recent owner: mirrord/utils-win/src/diagnostics/report.rs, mirrord/utils-win/src/diagnostics/monitor/server.rs, mirrord/utils-win/src/diagnostics/dialog.rs, mirrord/utils-win/src/diagnostics/crash.rs, mirrord/utils-win/src/modules.rs, mirrord/utils-win/src/diagnostics/monitor.rs, mirrord/layer-win/src/diagnostics.rs, mirrord/utils-win/src/diagnostics/dialog/theme.rs (+5 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: mirrord/layer-win/src/hooks/files/ops/read.rs, mirrord/layer-win/src/hooks/files/ops/query_info.rs, mirrord/layer-win/src/hooks/files/ops/set_info.rs, mirrord/layer-win/src/hooks/files/ops/open.rs, mirrord/layer-win/src/hooks/files/ops/stubs.rs, mirrord/layer-win/src/managed/registry.rs, mirrord/layer-win/src/iocp/mod.rs, mirrord/layer-win/src/hooks/files/ops/close.rs (+1 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 9 significant file(s) lose their only recent owner: mirrord/intproxy/src/proxies/incoming/http.rs, mirrord/agent/iptables/src/mesh/istio.rs, mirrord/cli/src/extract.rs, mirrord/agent/iptables/src/mesh/exclusion.rs, mirrord/agent/iptables/src/output.rs, mirrord/layer/src/turbo.rs, mirrord/session-monitor-client/src/request_builder.rs, mirrord/agent/iptables/src/standard.rs (+1 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 6 significant file(s) lose their only recent owner: mirrord/protocol-api/src/client/simple_request.rs, mirrord/agent/src/util/io/throttle.rs, mirrord/intproxy/protocol/src/codec/codec_async.rs, mirrord/sip/src/bundle.rs, mirrord/console/src/async_logger.rs, mirrord/intproxy/protocol/src/macros.rs. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #5 — If anonymized user #5 becomes unavailable, 5 significant file(s) lose their only recent owner: packages/monitor/src/components/SettingsDialog.tsx, packages/monitor/src/components/EmptySessionState.tsx, packages/monitor/src/components/events/EventRow.tsx, packages/wizard/src/components/Homepage.tsx, packages/monitor/src/components/events/eventConfig.ts. Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #6 — If anonymized user #6 becomes unavailable, 4 significant file(s) lose their only recent owner: mirrord/agent/src/http/share_link.rs, mirrord/cli/src/preview/multicluster.rs, mirrord/tls-util/src/error.rs, mirrord/tls-util/src/read_pem.rs. Pair on, review, or document these before any departure.
Silent fallback default on Err mirrord/cli/src/main.rs:1267— `prompt_outdated_version` turns every `Err` into `true` — 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 mirrord/progress/src/lib.rs:22— `utm_medium` turns every `Err` into `"plugin".to_owned()` — 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 mirrord/session-monitor-client/src/lib.rs:104— `session_endpoints` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err mirrord/tui/src/screens/targets/suggest.rs:154— `complete_path` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err mirrord/tui/src/screens/targets/launch.rs:97— `lingering_sessions` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
Silent fallback default on Err mirrord/tui/src/screens/terminal/panel.rs:119— `uptime` turns every `Err` into `"unknown".to_owned()` — 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.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (52 single-owned of 506 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 506 of the 728 production source files in this repository met that bar). They are anonymized user #7 (2 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
Documentation: no contributor guidance README.md— The root README has no guidance for contributors. Add a Contributing section covering PR/merge process, code of conduct, and any required tools.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 4 of 43 project(s) overshoot their size bounds, lowering Project Cohesion to 8.1/10. The most over is `mirrord/config` (18922 LoC, 162 public types across 8 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.
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 506 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 506 of the 728 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: medschool/src/types.rs. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
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.
P10 · Library API & versioning· Large public API surface · ×1
Large public API surface — 874/1157 types (76%) 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.
Logging is not universal — Only 28/31 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `mirrord/layer-tests`, `packages/wizard`, `xtask`.
P4 · Deployment & Rollback· No rollback/health safety · ×1
No rollback/health safety — Deployment automation exists and the service already exposes health probe endpoints (healthz/livez/readyz or a container healthcheck), but no manifest in this repository wires them into readiness/liveness probes, a rolling-update strategy, lifecycle hooks or a migration job — a bad release is harder to detect and reverse. If that wiring lives in a separate ops/Helm repository, document the pointer here so release safety is evidenced.
Duplicated predicate mirrord/cli/src/operator/session.rs:118— `status.code == 404 && status.reason.contains("parse")` appears character-identically in 2 files — mirrord/cli/src/operator/session.rs, mirrord/cli/src/session.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.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a0f053-10cd-7fa1-abf1-0c0f8c40d62f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 70 · Warnings: 696 · Recommendations: 29 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 30-09-2026 @ 03:19 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.