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

alphaXiv/OpenResearch

Measured 17 November 2026, 12:00 UTC, at code version 3b912e5

First survey, so nothing to compare with yet
CAI score 57.6out of 100 At risk

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

A large codebase: 269,307 lines of product code in 5 projects, tests not counted · Estimated rebuild effort: about 2.0 person-years · Weakest lens: Production Readiness, 55.0

Findings by how serious they are

77 critical 1690 serious 96 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 12:00 UTC

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

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

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

80of 80 dimensions measured by tools.
1828of 1863 findings point to an exact file and line, so you can open each one in the code. The other 35 concern the repository as a whole, such as missing documentation.
80dimensions across 9 lenses, read from 269,307 lines of product code in 5 projects.
Chapters

Executive summary

alphaXiv/OpenResearch is rated At risk because critical security findings are open. It scores 57.6 out of 100, which the At risk rating leaves unchanged. We judged it as a preview release, against a lower bar.

Production Readiness, at 55.0, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is protecting outgoing calls with timeouts, worth about 1.8 points. Automating dependency updates comes next, worth about 1.7 points.

Eleven weaknesses in the code could be used by an attacker. Nine known security holes in the packages the code depends on can be used by attackers, and five controls can't be used without a mouse. Fixing the weaknesses the scanner points to, updating the vulnerable packages and making the controls work with a keyboard would close these risks. The two pipeline steps that run downloads without checking them need each download checked against a known checksum first. The place where the code runs text as code or as a command needs a direct call instead. The three sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 269,307 lines, about €300,000 to rebuild.

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

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

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 94%Tests 6%
Rebuild cost: about €300,000 · Estimate
Cost to rebuild€98,000 to €490,000, for 1,635 to 5,185 hours of work, about 2.0 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 269,307 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
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.
Raises the score by about 1.8 points · Medium effort · Outbound HTTP resilience
2
Enable Dependabot/Renovate or a dependency-review gate.
Raises the score by about 1.7 points · Medium effort · Security & performance tooling
3
Keep a changelog (e.g.
Keep-a-Changelog) recording what shipped in each release.
Raises the score by about 1.5 points · Medium effort · Release Hygiene

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €300,000 to build again, about 2.0 person-years of work. Its weakest lens is Production Readiness, at 55.0 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
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. Of all the actions in this report, it raises the score most for the work it takes: about 1.8 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 12% on every change. The history of the code shows how much it changes: about 408,816 lines over the last 90 days, which is about 1,657,976 lines a year. At that pace, the extra work comes to an estimated 229.4 to 1376.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch openresearch-cli openresearch-cli orx-host orx-host openresearch-cli->orx-host orx-host-proto orx-host-proto openresearch-cli->orx-host-proto openresearch-launcher openresearch-launcher orx-host->orx-host-proto orx-ui orx-ui

Architecture: which parts of the code depend on which

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

327 modules, with 601 dependencies between them. 3 loops run through 54 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 openresearch_cli.commands.file_serve2 openresearch_cli.config3 openresearch_cli.local.harness.options4 openresearch_cli.local.model5 openresearch_cli.store.telemetry6 orx_host_proto7 openresearch_cli.engine.transport8 openresearch_cli.jobs9 openresearch_cli.jobs.ssh.prepared10 openresearch_cli.local.opencode_signin11 ui.src.components12 openresearch_cli.engine.handle13 openresearch_cli.local.harness.detect14 openresearch_cli.local.opencode15 ui.src.api16 openresearch_cli.local.harness.claude17 openresearch_cli.store18 ui.src19 openresearch_cli.engine20 openresearch_cli.local.claude21 openresearch_cli.engine.adapters.ssh22 openresearch_cli.engine.adapters.openresearch23 openresearch_cli.jobs.ssh24 openresearch_cli.jobs.ssh.service25 openresearch_cli.local.chat26 openresearch_cli.local.harness27 openresearch_cli.local.acp28 openresearch_cli.local.harness.codex29 openresearch_cli.local.acp.host30 openresearch_cli.client31 openresearch_cli.commands.compute32 openresearch_cli.jobs.huggingface33 openresearch_cli34 openresearch_cli.local.overleaf_live35 openresearch_cli.commands.up.api_v236 openresearch_cli.commands.up.compute_settings37 openresearch_cli.commands.up.harness_setup38 openresearch_cli.compute39 openresearch_cli.telemetry40 openresearch_cli.commands.up
1 openresearch_cli.commands.file_serve
2 openresearch_cli.config
3 openresearch_cli.local.harness.options
4 openresearch_cli.local.model
5 openresearch_cli.store.telemetry
6 orx_host_proto
7 openresearch_cli.engine.transport33
8 openresearch_cli.jobs1
9 openresearch_cli.jobs.ssh.prepared1
10 openresearch_cli.local.opencode_signin1
11 ui.src.components40
12 openresearch_cli.engine.handle1
13 openresearch_cli.local.harness.detect211
14 openresearch_cli.local.opencode121
15 ui.src.api4
16 openresearch_cli.local.harness.claude214384
17 openresearch_cli.store341211
18 ui.src36
19 openresearch_cli.engine12310
20 openresearch_cli.local.claude2211
21 openresearch_cli.engine.adapters.ssh13111711
22 openresearch_cli.engine.adapters.openresearch2322156111
23 openresearch_cli.jobs.ssh21111
24 openresearch_cli.jobs.ssh.service13
25 openresearch_cli.local.chat222118213
26 openresearch_cli.local.harness4129
27 openresearch_cli.local.acp12
28 openresearch_cli.local.harness.codex213131104
29 openresearch_cli.local.acp.host3
30 openresearch_cli.client111
31 openresearch_cli.commands.compute111
32 openresearch_cli.jobs.huggingface1111
33 openresearch_cli22
34 openresearch_cli.local.overleaf_live41
35 openresearch_cli.commands.up.api_v21211623131
36 openresearch_cli.commands.up.compute_settings11111
37 openresearch_cli.commands.up.harness_setup111111
38 openresearch_cli.compute71132
39 openresearch_cli.telemetry2111
40 openresearch_cli.commands.up11111110314511321115
Uses a module listed above itPart of a loopThe module itself
1 openresearch_cli.commands.file_serve2 openresearch_cli.config3 openresearch_cli.local.harness.options4 openresearch_cli.local.model5 openresearch_cli.store.telemetry6 orx_host_proto7 openresearch_cli.engine.transport8 openresearch_cli.jobs9 openresearch_cli.jobs.ssh.prepared10 openresearch_cli.local.opencode_signin11 ui.src.components12 openresearch_cli.engine.handle13 openresearch_cli.local.harness.detect14 openresearch_cli.local.opencode15 ui.src.api16 openresearch_cli.local.harness.claude17 openresearch_cli.store18 ui.src19 openresearch_cli.engine20 openresearch_cli.local.claude21 openresearch_cli.engine.adapters.ssh22 openresearch_cli.engine.adapters.openresearch23 openresearch_cli.jobs.ssh24 openresearch_cli.jobs.ssh.service25 openresearch_cli.local.chat26 openresearch_cli.local.harness27 openresearch_cli.local.acp28 openresearch_cli.local.harness.codex29 openresearch_cli.local.acp.host30 openresearch_cli.client31 openresearch_cli.commands.compute32 openresearch_cli.jobs.huggingface33 openresearch_cli34 openresearch_cli.local.overleaf_live35 openresearch_cli.commands.up.api_v236 openresearch_cli.commands.up.compute_settings37 openresearch_cli.commands.up.harness_setup38 openresearch_cli.compute39 openresearch_cli.telemetry40 openresearch_cli.commands.upopenresearch_cli.commands.file_serve1openresearch_cli.config2openresearch_cli.local.harness.options3openresearch_cli.local.model4openresearch_cli.store.telemetry5orx_host_proto6openresearch_cli.engine.transport7openresearch_cli.jobs8openresearch_cli.jobs.ssh.prepared9openresearch_cli.local.opencode_signin10ui.src.components11openresearch_cli.engine.handle12openresearch_cli.local.harness.detect13openresearch_cli.local.opencode14ui.src.api15openresearch_cli.local.harness.claude16openresearch_cli.store17ui.src18openresearch_cli.engine19openresearch_cli.local.claude20openresearch_cli.engine.adapters.ssh21openresearch_cli.engine.adapters.openresearch22openresearch_cli.jobs.ssh23openresearch_cli.jobs.ssh.service24openresearch_cli.local.chat25openresearch_cli.local.harness26openresearch_cli.local.acp27openresearch_cli.local.harness.codex28openresearch_cli.local.acp.host29openresearch_cli.client30openresearch_cli.commands.compute31openresearch_cli.jobs.huggingface32openresearch_cli33openresearch_cli.local.overleaf_live34openresearch_cli.commands.up.api_v235openresearch_cli.commands.up.compute_settings36openresearch_cli.commands.up.harness_setup37openresearch_cli.compute38openresearch_cli.telemetry39openresearch_cli.commands.up4033111401211121421438434121136123102211131117112322156111211111322211821341291221313110431111111111224112116231311111111111171132211111111110314511321115+287 more modules (most-connected shown)

At a glance — Code Health · 66.2 · Adequate · gated by D1, D2 ·

At a glance — Architecture · 86.7 · Adequate · gated by D26 ·

At a glance — Maturity · 62.0 · Adequate · gated by D15, M2 ·

At a glance — Readiness · 55.0 · Adequate · gated by P7 ·

At a glance — Security · 73.1 · Adequate · gated by D29 ·

At a glance — Event-Driven · 59.4 · Adequate ·

At a glance — Event Sourcing · 100.0 · Exemplary ·

At a glance — Accessibility · 56.8 · Adequate · gated by AC4 ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection39High / Critical
A03:2025 — Software Supply Chain Failures27High / Critical

Roadmap

Top priorities: 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; Enable Dependabot/Renovate or a dependency-review gate; Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.

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

Do thisHelpsEffortDimension
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.+1.8 ptsMediumOutbound HTTP resilience
Enable Dependabot/Renovate or a dependency-review gate.+1.7 ptsMediumSecurity & performance tooling
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+1.5 ptsMediumRelease Hygiene
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+1.1 ptsMediumKeyboard semantics
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with Cargo.toml.+0.6 ptsLowADR Quality
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.+1.1 ptsMediumObservability
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+1.0 ptsMediumVisual & motion safety
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+0.9 ptsMediumText alternatives

File quality

Per-file score 0–10 — a quality signature. Of 257 files carrying findings, judged against the Preview bar: 2% slop · 8% mixed · 90% near-clean.

FileScoreBandWorst signal
REDACTED1.6SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED1.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
src/commands/up.rs2.5SlopChange Coupling: Boundary-crossing change coupling: up.rs ↔ hf.rs
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
ui/src/components/ChatPanel.tsx5.5MixedCyclomatic Complexity: ChatPanel.ChatPanel (cyclomatic 301)
src/client.rs5.5MixedGod Classes: FileTooLong: src/client.rs
src/plane/local_plane.rs5.5MixedCyclomatic Complexity: ApiClient::logs_to (cyclomatic 28)
ui/src/App.tsx5.5MixedCyclomatic Complexity: App.App (cyclomatic 229)
src/jobs/mod.rs5.8MixedChange Coupling: Boundary-crossing change coupling: mod.rs ↔ localrun.rs
REDACTED5.8MixedStatic Analysis (SAST): Medium: REDACTED
ui/src/components/ExperimentsTable.tsx5.9MixedCyclomatic Complexity: ExperimentsTable.ExperimentsTable (cyclomatic 29)

How the grades work

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

Critical — 77

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

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

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

Could not be resolved — 11

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 80 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 80 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D19D20D24D26D28D29D30D34D35D36D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX8AX9C2ED1ES1ES2GD1IC1M1M2M3M4P1P2P3P4P6P7PF3R1R10R2R3R4R6R7R8R9S1X1X12X13X14X15X16X17X18X2X21X22X25X27X28X29X30X5

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1e961-5816-7cb2-ba3c-ad08a3e9b986.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for ui/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D10 Test Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 921 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 39 test source file(s) (.rs, .py) 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the dependency install for ui/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the node:test suite in ui/ was NOT MEASURED: the dependency install for ui/ failed in the analyzer sandbox (ERR_PNPM_BROKEN_LOCKFILE  The lockfile at "REDACTED" is broken: expected a single document in the stream, but found more), so the suite never ran. This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `ui/src/api.ts`, `ui/src/components/AddAgentDialog.tsx`, `ui/src/components/HarnessLogo.tsx`, `ui/src/queries/chatStore.ts`, `ui/src/useProjectWorkspace.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. A program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. (rule: missing-tool). The renderer reported: the dev server (`npm run dev` in ui/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> orx-ui@0.1.0 dev / > vite / sh: 1: vite: not found" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev` in ui/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> orx-ui@0.1.0 dev / > vite / sh: 1: vite: not found" No runtime evidence was gathered.
  • C2 Access Controls — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • ED1 Handler temporal coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 453 further occurrence(s) are not listed individually; the score already reflects all 493.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • PF3 Async & latency hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 79 further occurrence(s) are not listed individually; the score already reflects all 119.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 205 further occurrence(s) are not listed individually; the score already reflects all 245.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • X19 Unrestored process-global state — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • X5 Nullable reference types — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 196 further occurrence(s) are not listed individually; the score already reflects all 236.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • 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.
  • 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: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

331 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ChatPanel.ChatPanel at 301. A further 4 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 openresearch_cli::local::files::content_type_for_path at 65 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: src/local/files.rs (openresearch_cli::local::files::content_type_for_path at 65), ui/src/components/FileTypeIcon.tsx (FileTypeIcon.glyphFor at 24), src/jobs/slurm.rs (openresearch_cli::jobs::slurm::sbatch_option at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

openresearch_cli::commands::app::imp::run_event_loop (cyclomatic 112) · ×99src/commands/app.rs:1026
ChatHost::send_message_showing (cyclomatic 88) · ×6src/local/chat/mod.rs:5988
Engine::commit (cyclomatic 55) · ×6src/engine/reconcile.rs:433
ChatPanel.ChatPanel::send (cyclomatic 120) · ×5ui/src/components/ChatPanel.tsx:6975
orx_host::wrapper::wrap (cyclomatic 49) · ×5crates/orx-host/src/wrapper.rs:15

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

What to do

  1. Bring the 6 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with ChatPanel.ChatPanel (cyclomatic 301), AddAgentDialog.AddAgentDialog (cyclomatic 297), FileViewer.FileViewer (cyclomatic 248). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 6 together lifts Cyclomatic Complexity from 2.0 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

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

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

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

436 method(s) exceeded the cognitive complexity threshold of 15; the worst was ChatPanel.ChatPanel at 287.

openresearch_cli::local::harness::claude::apply_event (cognitive 196) · ×164src/local/harness/claude.rs:2169
ChatHost::send_message_showing (cognitive 140) · ×11src/local/chat/mod.rs:5988
orx_host::wrapper::state (cognitive 75) · ×9crates/orx-host/src/wrapper.rs:716
Engine::commit (cognitive 69) · ×7src/engine/reconcile.rs:433
ChatPanel.ChatPanel::send (cognitive 146) · ×6ui/src/components/ChatPanel.tsx:6975

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

What to do

  1. Bring the 39 bodies over 60 down to 60 or less in Cognitive Complexity — start with ChatPanel.ChatPanel (cognitive 287), Actor::run (cognitive 263), ChatPanel.computeToolActivity (cognitive 257). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 39 together lifts Cognitive Complexity from 2.0 to about 4.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.7 / 10Strong✓ Tool-verified

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

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

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

219 god class(es) detected.

FunctionTooLong: api.createApi · ×99ui/src/api.ts:2035
FileTooLong: commands/up.rs · ×72src/commands/up.rs
MethodTooLong: ChatHost.send_message_showing · ×27src/local/chat/mod.rs:5988
ClassTooLong: Store · ×14REDACTED:940
TooManyMethods: Store · ×4REDACTED:940

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

What to do

  1. Resolve the 99 FunctionTooLong finding(s) in God Classes — start with SettingsPage.tsx (11), up.rs (5), claude.rs (4). — One of this dimension's main actionable groups (99 warning-level).
  2. Resolve the 72 FileTooLong finding(s) in God Classes — start with mod.rs (3), ssh.rs (3), codex.rs (2). — One of this dimension's main actionable groups (72 warning-level).
  3. Resolve the 27 MethodTooLong finding(s) in God Classes — start with mod.rs (10), server.rs (3), REDACTED (2). — One of this dimension's main actionable groups (27 warning-level).

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

D4 · Code Duplication9.2 / 10Stronggated by 231 serious findings✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

117 duplicated block group(s) detected. 1.9 % of the production lines (5,071 of 269,307) are in a reported copy. A further 114 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 5 of the 231 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .tsx (16% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (6 lines × 2) · ×16src/commands/up.rs:3702
Duplicated block (9 lines × 2) · ×13src/commands/remote_host.rs:201
Duplicated block (7 lines × 2) · ×13crates/orx-host/src/legacy.rs:113
Edited copy of a member (7 corresponding lines) · ×12src/local/agent_profiles.rs:235
Duplicated block (8 lines × 2) · ×12src/local/chat/mod.rs:5580

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

What to do

  1. Resolve the 16 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED (6), up.rs (2), compute.rs. — One of this dimension's main actionable groups (16 warning-level).
  2. Resolve the 13 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with remote_host.rs (2), modal.rs (2), demo.rs (2). — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 13 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with up.rs (2), auth.rs (2), legacy.rs. — One of this dimension's main actionable groups (13 warning-level).

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

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

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

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

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

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

5 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 4 of the 5 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: orx-host-proto

What to do

  1. Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

1 of 117 classes have LCOM4 above 3.

Low cohesion: ApiClient (LCOM4 4)src/plane/local_plane.rs:531

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with local_plane.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D10 · Test Quality10.0 / 10Stronggated by 1 serious finding✓ 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.

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

0 skipped, 1 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 921 tests. Measured on the JavaScript/TypeScript suite only — at least 39 test source file(s) (.rs, .py) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: aggregate accepts intentional skips and successful selected jobsscripts/ci-changes.test.mjs:55

What to do

  1. Resolve the 1 No assertions finding(s) in Test Quality — start with ci-changes.test.mjs. — One of this dimension's main actionable groups (1 warning-level).

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

D12 · Dependency Hygiene8.9 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

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

Outdated: anyhow · ×22

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 539 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots3.6 / 10Weak✓ Tool-verified

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

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

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

Top hotspots: ui/src/components/ChatPanel.tsx (122×985=120170); ui/src/App.tsx (75×631=47325); ui/src/components/SettingsPage.tsx (77×189=14553) Repeated repair below the complexity floor: src/local/opencode_runtime.rs (10 of 14 changes were fixes); src/jobs/vercel.rs (5 of 8 changes were fixes); src/local/acp/delegated.rs (4 of 4 changes were fixes)

Hotspot: ui/src/components/ChatPanel.tsx · ×112ui/src/components/ChatPanel.tsx:5485
Repeated repair: src/local/opencode_runtime.rs · ×9src/local/opencode_runtime.rs:341

What to do

  1. Resolve the 112 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (3), claude.rs (2), codex.rs (2). — One of this dimension's main actionable groups (112 warning-level).
  2. Resolve the 9 Repeated repair finding(s) in Churn × Complexity Hotspots — start with vercel.rs (2), opencode_runtime.rs, delegated.rs. — One of this dimension's main actionable groups (9 warning-level).

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

D16 · Bus Factor9.7 / 10Exemplary✓ 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.

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

9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/local/latex_templates.rs. Counted over 355 of the 469 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 · ×2

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality7.5 / 10Strong✓ Tool-verified

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 2 documentation facets pass in full; short on: F2 example. 13 document(s) read across 6 unit(s).

Documentation: no build, run or usage examplecrates/orx-host/README.md:1

What to do

  1. 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.

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

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

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundCargo.toml:17

What to do

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

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

D24 · Comment Value10.0 9.9 / 10Exemplary○ Nothing flagged

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

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

0 of 705 judged comments only repeat the code they sit on (0.0 %). 9 comment(s) in another language or script were not judged.

doc comments repeat the namesui/src/modelSelection.ts:22

✓ On the Gold path — maintain.

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

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

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

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

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

2 of 5 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×2Cargo.toml:1

What to do

  1. Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with Cargo.toml, package.json. — One of this dimension's main actionable groups (2 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)0.3 / 10Critical✓ Tool-verified

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

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

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

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

39 finding(s): 0 critical, 15 high, 20 medium, 4 low. semgrep hit a parse error in 12 file(s) — `crates/orx-host/src/platform.rs` (line 448, lines 456–457), `src/commands/app.rs` (line 2364), `src/engine/transport/ssh.rs` (line 273), `src/jobs/ssh/service/hold.rs` (line 304), `ui/src/App.tsx`, … (+7 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 7 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

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

What to do

  1. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

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

D30 · Dependency Vulnerabilities1.3 / 10Critical✓ Tool-verified

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

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

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

23 finding(s): 1 critical, 8 high, 13 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.3 / 10Adequategated by 3 critical findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: up.rs↔settings.ts 100%; up.rs↔NewProjectForm.tsx 85%; ChatPanel.tsx↔ClosableTab.tsx 70%

Boundary-crossing change coupling: up.rs ↔ hf.rs · ×3src/commands/up.rs:1
Change coupling: mod.rs ↔ api.ts · ×7src/local/mod.rs:1
Change-coupling hub: up.rs → NewProjectForm.tsx, Onboarding.tsx, ProjectsHome.tsx, settings.ts · ×2src/commands/up.rs

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with up.rs (2), mod.rs. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 7 Change coupling finding(s) in Change Coupling — start with mod.rs, experiments.rs, App.tsx. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with up.rs, ChatPanel.tsx. — One of this dimension's main actionable groups (2 warning-level).

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 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.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives5.4 / 10Adequate✓ Tool-verified

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.

  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — agent-skills/orx-figures/assets/orx-chart.html:0
  • Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — ui/src/components/MediaPreview.tsx:85

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels7.7 / 10Strong✓ 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. (×2) — ui/src/components/GitTokenForm.tsx:41, ui/src/components/SettingsPage.tsx:2808
  • 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. — ui/src/dialog.tsx:163

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.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

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.

AC4 · Keyboard semantics3.1 / 10Weak✓ Tool-verified

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".

  • This <div role="alertdialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — ui/src/RemoteRuntime.tsx:450
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. (×4) — ui/src/components/ChatPanel.tsx:758, ui/src/components/ExpHoverCard.tsx:243, ui/src/components/SkillChips.tsx:125, …
  • This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×3) — ui/src/components/ChatPanel.tsx:790, ui/src/components/OverleafPanel.tsx:88, ui/src/components/WorkspaceTools.tsx:247
  • This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control. — ui/src/components/ClosableTab.tsx:69
  • This <div> binds mousedown, touchstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — ui/src/components/CsvTable.tsx:226
  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — ui/src/components/SkillChips.tsx:125

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety5.0 / 10Adequate✓ Tool-verified

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.

  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×5) — ui/src/components/ArtifactsTab.tsx:723, ui/src/components/ChatSearch.tsx:156, ui/src/components/ModelPicker.tsx:670, …
  • <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×2) — ui/src/components/ChatPanel.tsx:3722, ui/src/components/CodeEditor.tsx:151
  • <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). (×4) — ui/src/components/ChatPanel.tsx:4951, ui/src/components/ComposerEditor.tsx:641, ui/src/components/CsvTable.tsx:177, …
  • <div> moves — its `animate-[or-pulse_1.2s_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/src/components/ChatPanel.tsx:5233
  • <span> moves — its `animate-[or-pulse_1.2s_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/src/components/ProjectInfoCard.tsx:64
  • <span> moves — its `animate-[or-pulse_1.2s_ease-in-out_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×2) — ui/src/components/TreeView.tsx:281, ui/src/components/ui/StatusIndicator.tsx:23
  • <span> moves — its `animate-[spin_0.8s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — ui/src/components/ui/Spinner.tsx:6

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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.

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

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

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

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

C2 · Access Controls7.0 / 10Strong✓ Tool-verified

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

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

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.

What to do

  • Name the access rules — roles and permissions declared once (an enum Role/Permission, actix-web-grants #[protect(…)], axum-login's permission_required!, a casbin or oso policy) and consulted where access is checked, so the rule set is reviewable and testable on its own.
ED1 · Handler temporal coupling5.9 / 10Adequate✓ Tool-verified

Other · Event-Driven — Whether event/message handlers avoid synchronous blocking waits — a blocking wait inside a handler stalls throughput and risks deadlock.

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

  • `exec.run` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/exec.rs:171
  • `legacy.inspect` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — crates/orx-host/src/legacy.rs:41, crates/orx-host/src/legacy.rs:50
  • `src.nonce` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/lib.rs:48
  • `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::rename`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/lib.rs:73
  • `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/lib.rs:74
  • `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/lib.rs:80
  • `log.open` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — crates/orx-host/src/log.rs:10, crates/orx-host/src/log.rs:15
  • `ProcessTable.from_pids` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:180
  • `platform.signal` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:297
  • `platform.signal` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:298
  • `platform.boot_id` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:377
  • `platform.pids` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:384
  • `platform.process` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:426
  • `platform.process_uid` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/platform.rs:443
  • `Host.new` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/server.rs:40
  • `Host.new` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::set_permissions`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/server.rs:41
  • `server.file_sha` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/server.rs:1258
  • `wrapper.start_gate` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:407
  • `wrapper.cleanup` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:611
  • `wrapper.request` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:664
  • `wrapper.started_at` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:705
  • `wrapper.state` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:760
  • `wrapper.state` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:765
  • `wrapper.cancel` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — crates/orx-host/src/wrapper.rs:841
  • `alphaxiv.load` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:395
  • `alphaxiv.save` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:399
  • `alphaxiv.remove` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:405
  • `alphaxiv.lock` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:414
  • `alphaxiv.keep_forwarded` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:497
  • `alphaxiv.access` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:523
  • `alphaxiv.user_id_on_disk` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/alphaxiv.rs:699
  • `browser.is_wsl` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/browser.rs:105
  • `app.write_if_changed` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/commands/app.rs:174
  • `app.write_if_changed` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/commands/app.rs:178
  • `app.write_if_changed` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::write`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/commands/app.rs:180
  • `app.run` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `TcpListener::bind`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. (×2) — src/commands/app.rs:370, src/commands/app.rs:377
  • `compute.read_input` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`. — src/commands/compute.rs:333

What to do

  • Use the awaited twin of each blocking call, or move the work off the loop with `tokio::task::spawn_blocking` — a synchronous handler cannot simply `.await` in place.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's Rust: functions whose whole body is still `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs7.1 / 10Strong✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Rust: functions whose body is `todo!()`/`unimplemented!()` or only panics with a "not implemented" message, match arms and branches left as `todo!()`, functions that take inputs and return a constant (`Ok(())`, `None`, `Default::default()`, an empty `Vec`) or do nothing, and impls most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `wake` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — crates/orx-host/src/wrapper.rs:537
  • `revoke` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/alphaxiv.rs:450
  • `open_in_page` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/commands/app.rs:1747
  • `print_descriptor` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — src/commands/remote_host.rs:717
  • `set_up_port` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. (×3) — src/local/acp/host.rs:479, src/local/codex.rs:867, src/local/opencode.rs:725
  • `emit` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/local/chat/mod.rs:4273
  • `mark_delivery` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/local/chat/mod.rs:8674
  • `set_up_auth_token` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/local/chat/mod.rs:10028
  • `set_event_sink` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/local/overleaf_live.rs:1852
  • `set_flag` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/telemetry.rs:676
  • `detach` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — src/updates/macos_app.rs:559

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
M1 · Documentation (README)8.1 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Weak✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

M4 · Documentation accuracy8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

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

What to do

  • Reconcile the README with reality: demo/nanochat/base/README.md links to `dev/LEADERBOARD.md`, but `demo/nanochat/base/dev/LEADERBOARD.md` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability6.2 / 10Strong✓ Tool-verified

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

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

  • Only 2/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `windows/launcher`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

  • `e2e/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — e2e/package.json:12

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

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

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

P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `reqwest::Client::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. (×2) — src/net.rs:6, src/net.rs:12

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.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `readdirSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:254
  • `lstatSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:256
  • `cpSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:267
  • `copyFileSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:270
  • `linkSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:271
  • `rmSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — dev.ts:312, dev.ts:340
  • `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×6) — dev.ts:316, dev.ts:317, dev.ts:328, …
  • `readdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — dev.ts:317, dev.ts:336
  • `mkdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — dev.ts:322, dev.ts:323, dev.ts:341
  • `execFileSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:337
  • `renameSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — dev.ts:342, dev.ts:344
  • `mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — dev.ts:444, dev.ts:448
  • `existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:445
  • `readdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:449
  • `rmSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — dev.ts:451, dev.ts:456, dev.ts:462
  • `renameSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:454
  • `copyFileSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — dev.ts:458, dev.ts:463
  • `statSync` in `startUi` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:485
  • `statSync` in `callback to some` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:486
  • `writeFileSync` in `startUi` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:490
  • `existsSync` in `startup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:636
  • `mkdirSync` in `startup` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:637
  • `existsSync` in `load` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:680
  • `rmSync` in `shutdown` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:716
  • `mkdirSync` in `serve` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:812
  • `execFileSync` in `serve` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — dev.ts:823

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety6.3 / 10Adequate✓ 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.

  • 250 typed · 145 plain JS — the untyped files are scripts/build-host.mjs, scripts/build-host.test.mjs, scripts/build-linux-appimage.test.mjs, scripts/canary-manifest.mjs, scripts/canary-tag.mjs, scripts/canary-tag.test.mjs (+139 more). 1 production file(s) opt out entirely with @ts-nocheck · 0 @ts-ignore suppression(s); the opted-out files are ui/src/routeTree.gen.ts.
R10 · Code Duplication7.9 / 10Strong✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • scripts/generate-dmg-background.mjs:15 · scripts/generate-icon.mjs:14 — the two spans are one implementation copied and then locally edited — 540 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. — scripts/generate-dmg-background.mjs:15
  • ui/src/queries/chat.ts:321 · ui/src/queries/projects.ts:172 — the two spans are one implementation copied and then locally edited — 508 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. — ui/src/queries/chat.ts:321
  • ui/src/components/SettingsPage.tsx:1272 · ui/src/components/SettingsPage.tsx:3302 — the two spans are one implementation copied and then locally edited — 309 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. — ui/src/components/SettingsPage.tsx:1272
  • ui/src/components/ProjectTerminal.tsx:34 · ui/src/components/SshConnectTerminal.tsx:220 — the two spans are one implementation copied and then locally edited — 305 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. — ui/src/components/ProjectTerminal.tsx:34
  • ui/src/components/ChatPanel.tsx:2391 · ui/src/components/ChatPanel.tsx:2431 — 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. — ui/src/components/ChatPanel.tsx:2391
  • ui/src/components/SkillsTab.tsx:375 · ui/src/components/SkillsTab.tsx:477 — 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. — ui/src/components/SkillsTab.tsx:375
  • ui/src/components/SkillsTab.tsx:412 · ui/src/components/SkillsTab.tsx:504 — 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. — ui/src/components/SkillsTab.tsx:412
  • ui/src/components/SettingsPage.tsx:4344 · ui/src/components/SettingsPage.tsx:4374 — 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. — ui/src/components/SettingsPage.tsx:4344
  • ui/src/components/SettingsPage.tsx:3208 · ui/src/components/SettingsPage.tsx:3323 — 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. — ui/src/components/SettingsPage.tsx:3208
  • ui/src/App.tsx:2224 · ui/src/components/ArtifactsTab.tsx:685 — 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. — ui/src/App.tsx:2224
  • ui/src/components/ChatPanel.tsx:1025 · ui/src/components/ChatPanel.tsx:1249 — 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. — ui/src/components/ChatPanel.tsx:1025
  • ui/src/components/ChatPanel.tsx:8761 · ui/src/components/ChatPanel.tsx:8780 — 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. — ui/src/components/ChatPanel.tsx:8761
  • ui/src/components/ChatPanel.tsx:7190 · ui/src/components/ChatPanel.tsx:7298 — 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. — ui/src/components/ChatPanel.tsx:7190
  • ui/src/components/ModelPicker.tsx:1125 · ui/src/components/WorkspaceTools.tsx:204 — the two spans are one implementation copied and then locally edited — 95 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. — ui/src/components/ModelPicker.tsx:1125
  • ui/src/components/ModelPicker.tsx:765 · ui/src/components/ModelPicker.tsx:923 — the two spans are one implementation copied and then locally edited — 170 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. — ui/src/components/ModelPicker.tsx:765
  • ui/src/components/SettingsPage.tsx:1469 · ui/src/components/SettingsPage.tsx:3244 — the two spans are one implementation copied and then locally edited — 164 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. — ui/src/components/SettingsPage.tsx:1469
  • ui/src/components/Onboarding.tsx:344 · ui/src/components/Onboarding.tsx:373 — the two spans are one implementation copied and then locally edited — 100 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. — ui/src/components/Onboarding.tsx:344
  • ui/src/components/SettingsPage.tsx:4849 · ui/src/components/SettingsPage.tsx:4899 — 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. — ui/src/components/SettingsPage.tsx:4849
  • ui/src/components/ArtifactsTab.tsx:652 · ui/src/components/WorktreeTab.tsx:203 — 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. — ui/src/components/ArtifactsTab.tsx:652
  • ui/src/components/SettingsPage.tsx:1428 · ui/src/components/SettingsPage.tsx:3202 · ui/src/components/SettingsPage.tsx:3317 — 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. — ui/src/components/SettingsPage.tsx:1428
  • ui/src/components/tourGeometry.ts:115 · ui/src/components/tourGeometry.ts:129 — the two spans are one implementation copied and then locally edited — 79 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. — ui/src/components/tourGeometry.ts:115
  • ui/src/queries/overleaf.ts:25 · ui/src/queries/overleaf.ts:59 — all 2 copies are in the same file, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — ui/src/queries/overleaf.ts:25
  • ui/src/components/ChatPanel.tsx:2904 · ui/src/components/ChatPanel.tsx:2944 — 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. — ui/src/components/ChatPanel.tsx:2904
  • ui/src/components/ChatPanel.tsx:7207 · ui/src/components/ChatPanel.tsx:7324 — 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. — ui/src/components/ChatPanel.tsx:7207
  • ui/src/components/MediaPreview.tsx:66 · ui/src/components/MediaPreview.tsx:79 — 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. — ui/src/components/MediaPreview.tsx:66
  • ui/src/components/ChatPanel.tsx:1477 · ui/src/components/ChatPanel.tsx:1517 — 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. — ui/src/components/ChatPanel.tsx:1477
  • ui/src/components/NewProjectForm.tsx:500 · ui/src/components/NewProjectForm.tsx:555 — 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. — ui/src/components/NewProjectForm.tsx:500
  • ui/src/components/SkillsTab.tsx:270 · ui/src/components/SkillsTab.tsx:313 — 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. — ui/src/components/SkillsTab.tsx:270
  • ui/src/queries/chat.ts:383 · ui/src/queries/chat.ts:397 — 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. — ui/src/queries/chat.ts:383
  • ui/src/api.ts:2369 · ui/src/api.ts:2384 — 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. — ui/src/api.ts:2369
  • ui/src/api.ts:2449 · ui/src/api.ts:2499 — 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. — ui/src/api.ts:2449
  • ui/src/components/ArtifactsTab.tsx:320 · ui/src/components/ArtifactsTab.tsx:404 — 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. — ui/src/components/ArtifactsTab.tsx:320
  • ui/src/components/ChatPanel.tsx:3543 · ui/src/components/ChatPanel.tsx:3555 — all 2 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. — ui/src/components/ChatPanel.tsx:3543
  • ui/src/components/ChatPanel.tsx:6402 · ui/src/components/ChatPanel.tsx:7079 — 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. — ui/src/components/ChatPanel.tsx:6402
  • ui/src/components/ComposerEditor.tsx:136 · ui/src/components/MentionMenu.tsx:29 — 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. — ui/src/components/ComposerEditor.tsx:136
  • ui/src/components/MentionMenu.tsx:57 · ui/src/components/SkillMenu.tsx:15 — the two spans are one implementation copied and then locally edited — 71 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. — ui/src/components/MentionMenu.tsx:57
  • ui/src/components/PdfPreview.tsx:186 · ui/src/components/PdfPreview.tsx:207 — 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. — ui/src/components/PdfPreview.tsx:186
  • ui/src/components/RemoteStopDialog.tsx:28 · ui/src/components/RemoteStopDialog.tsx:41 — 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. — ui/src/components/RemoteStopDialog.tsx:28
  • ui/src/components/SettingsPage.tsx:2144 · ui/src/components/SettingsPage.tsx:2426 — 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. — ui/src/components/SettingsPage.tsx:2144
  • ui/src/components/SkillsTab.tsx:153 · ui/src/components/SshConfigDialog.tsx:62 — 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. — ui/src/components/SkillsTab.tsx:153

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.
R2 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

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.

  • ChatPanel has cyclomatic complexity 326 and cognitive complexity 275; 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. — ui/src/components/ChatPanel.tsx:5485
  • App has cyclomatic complexity 253 and cognitive complexity 226; 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. — ui/src/App.tsx:254
  • NewProjectForm has cyclomatic complexity 202 and cognitive complexity 147; 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. — ui/src/components/NewProjectForm.tsx:63
  • FileViewer has cyclomatic complexity 183 and cognitive complexity 136; 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. — ui/src/components/FileViewer.tsx:142
  • computeToolActivity has cyclomatic complexity 176 and cognitive complexity 272; 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. — ui/src/components/ChatPanel.tsx:1545
  • AddAgentDialog has cyclomatic complexity 164 and cognitive complexity 165; 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. — ui/src/components/AddAgentDialog.tsx:270
  • send has cyclomatic complexity 129 and cognitive complexity 173; 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. — ui/src/components/ChatPanel.tsx:6975
  • ModelPicker has cyclomatic complexity 104 and cognitive complexity 87; 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. — ui/src/components/ModelPicker.tsx:300
  • harnessRow has cyclomatic complexity 81 and cognitive complexity 67; 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. — ui/src/components/SettingsPage.tsx:610
  • Onboarding has cyclomatic complexity 73 and cognitive complexity 66; 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. — ui/src/components/Onboarding.tsx:64
  • OpenResearchSection has cyclomatic complexity 73 and cognitive complexity 53; 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. — ui/src/components/SettingsPage.tsx:2502
  • RemoteSetup has cyclomatic complexity 61 and cognitive complexity 54; 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. — ui/src/RemoteRuntime.tsx:159
  • ChatSearch has cyclomatic complexity 56 and cognitive complexity 45; 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. — ui/src/components/ChatSearch.tsx:21
  • ExpHoverCard has cyclomatic complexity 55 and cognitive complexity 53; 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. — ui/src/components/ExpHoverCard.tsx:131
  • UsageMenu has cyclomatic complexity 55 and cognitive complexity 51; 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. — ui/src/components/UsageMenu.tsx:28
  • GitTab has cyclomatic complexity 55 and cognitive complexity 44; 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. — ui/src/components/SettingsPage.tsx:4414
  • parsePane has cyclomatic complexity 53 and cognitive complexity 50; 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. — ui/src/workspaceState.ts:54
  • PromptCard has cyclomatic complexity 52 and cognitive complexity 70; 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. — ui/src/components/ChatPanel.tsx:3242
  • (anonymous) has cyclomatic complexity 52 and cognitive complexity 46; 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. — ui/src/components/SettingsPage.tsx:1848
  • VercelSection has cyclomatic complexity 52 and cognitive complexity 41; 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. — ui/src/components/SettingsPage.tsx:1512
  • WorktreeTab has cyclomatic complexity 45 and cognitive complexity 44; 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. — ui/src/components/WorktreeTab.tsx:45
  • HarnessSetup has cyclomatic complexity 42 and cognitive complexity 33; 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. — ui/src/components/HarnessSetupDialog.tsx:48
  • enter has cyclomatic complexity 41 and cognitive complexity 75; 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. — ui/src/markdownLivePreview.ts:257
  • alphaxivActivity has cyclomatic complexity 41 and cognitive complexity 42; 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. — ui/src/components/ChatPanel.tsx:1967
  • AcpHarnessDialog has cyclomatic complexity 39 and cognitive complexity 34; 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. — ui/src/components/AcpHarnessDialog.tsx:15
  • OptionPicker has cyclomatic complexity 37 and cognitive complexity 31; 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. — ui/src/components/ModelPicker.tsx:989
  • Brand has cyclomatic complexity 36 and cognitive complexity 33; 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. — ui/src/components/Header.tsx:42
  • RunContactNotice has cyclomatic complexity 35 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. — ui/src/components/RunContactNotice.tsx:78
  • navigateKeyboardList has cyclomatic complexity 34 and cognitive complexity 37; 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. — ui/src/keyboardNavigation.ts:3
  • WorkspaceConnection has cyclomatic complexity 34 and cognitive complexity 31; 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. — ui/src/components/WorkspaceConnection.tsx:64
  • AgentList has cyclomatic complexity 34 and cognitive complexity 27; 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. — ui/src/components/SettingsPage.tsx:419
  • shellWords has cyclomatic complexity 33 and cognitive complexity 55; 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. — REDACTED:41
  • questionReplies has cyclomatic complexity 33 and cognitive complexity 39; 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. — ui/src/chatRendering.ts:68
  • visit has cyclomatic complexity 33 and cognitive complexity 37; 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. — e2e/lint.ts:37
  • OverleafPanel has cyclomatic complexity 32 and cognitive complexity 38; 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. — ui/src/components/OverleafPanel.tsx:239
  • ToolGroup has cyclomatic complexity 32 and cognitive complexity 35; 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. — ui/src/components/ChatPanel.tsx:2816
  • TerminalView has cyclomatic complexity 32 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. — ui/src/components/DetailDrawer.tsx:93
  • resize has cyclomatic complexity 31 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. — REDACTED:189
  • HfSection has cyclomatic complexity 31 and cognitive complexity 24; 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. — ui/src/components/SettingsPage.tsx:3302
  • commandRunIds has cyclomatic complexity 30 and cognitive complexity 58; 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. — ui/src/components/ChatPanel.tsx:1430
R3 · Large Files6.7 / 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.

  • ui/src/components/ChatPanel.tsx has 8585 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/ChatPanel.tsx:1
  • ui/src/components/SettingsPage.tsx has 4782 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/SettingsPage.tsx:1
  • ui/src/api.ts has 3045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/api.ts:1
  • ui/src/App.tsx has 2621 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/App.tsx:1
  • ui/src/components/ModelPicker.tsx has 1268 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/ModelPicker.tsx:1
  • ui/src/components/AddAgentDialog.tsx has 1203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/AddAgentDialog.tsx:1
  • dev.ts has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — dev.ts:1
  • ui/src/components/FileViewer.tsx has 947 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/FileViewer.tsx:1
  • ui/src/queries/settings.ts has 891 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/queries/settings.ts:1
  • ui/src/components/ArtifactsTab.tsx has 765 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/ArtifactsTab.tsx:1
  • ui/src/components/ComposerEditor.tsx has 667 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/ComposerEditor.tsx:1
  • ui/src/components/NewProjectForm.tsx has 639 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/NewProjectForm.tsx:1
  • ui/src/components/TreeView.tsx has 617 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/TreeView.tsx:1
  • ui/src/markdownLivePreview.ts has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/markdownLivePreview.ts:1
  • ui/src/RemoteRuntime.tsx has 532 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/RemoteRuntime.tsx:1
  • REDACTED has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • ui/src/components/SkillsTab.tsx has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/SkillsTab.tsx:1
  • ui/src/components/Onboarding.tsx has 502 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/Onboarding.tsx:1
  • ui/src/components/ModelList.tsx has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/ModelList.tsx:1
  • ui/src/components/HarnessLogo.tsx has 461 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/components/HarnessLogo.tsx:1
  • ui/src/events.ts has 458 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ui/src/events.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.8 / 10Exemplary✓ 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.

  • ui/tests/abandonRun.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/abandonRun.test.mjs:5
  • ui/tests/accountChip.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/accountChip.test.mjs:6
  • ui/tests/acp.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/acp.test.mjs:5
  • ui/tests/acpOnboarding.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/acpOnboarding.test.mjs:4
  • ui/tests/acpPermission.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/acpPermission.test.mjs:6
  • ui/tests/addAgentDialog.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/addAgentDialog.test.mjs:5
  • ui/tests/agentSwitches.test.mjs:105 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/agentSwitches.test.mjs:105
  • ui/tests/alphaxivToolRows.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/alphaxivToolRows.test.mjs:5
  • ui/tests/artifactsFilter.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/artifactsFilter.test.mjs:4
  • ui/tests/autoReviewer.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/autoReviewer.test.mjs:4
  • ui/tests/chat.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/chat.mjs:6
  • ui/tests/chatApiError.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/chatApiError.test.mjs:5
  • ui/tests/chatSearchKeyboard.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/chatSearchKeyboard.test.mjs:4
  • ui/tests/closeDialog.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/closeDialog.test.mjs:4
  • ui/tests/composerFocus.test.mjs:7 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/composerFocus.test.mjs:7
  • ui/tests/composerIme.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/composerIme.test.mjs:6
  • ui/tests/createdChatNavigation.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/createdChatNavigation.test.mjs:4
  • ui/tests/detailDrawer.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/detailDrawer.test.mjs:5
  • ui/tests/experimentLineageView.test.mjs:7 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/experimentLineageView.test.mjs:7
  • ui/tests/failedComposerRecovery.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/failedComposerRecovery.test.mjs:5
  • ui/tests/githubSyncSettings.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/githubSyncSettings.test.mjs:4
  • ui/tests/i18nCatalog.test.mjs:13 imports '../project.inlang', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/i18nCatalog.test.mjs:13
  • ui/tests/inlineHtmlFigure.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/inlineHtmlFigure.test.mjs:5
  • ui/tests/modelFeed.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/modelFeed.test.mjs:4
  • ui/tests/modelPickerKeyboard.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/modelPickerKeyboard.test.mjs:4
  • ui/tests/onboarding.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/onboarding.test.mjs:5
  • ui/tests/openResearchSshKey.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/openResearchSshKey.test.mjs:6
  • ui/tests/overlayActions.test.mjs:8 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/overlayActions.test.mjs:8
  • ui/tests/pendingPlan.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/pendingPlan.test.mjs:4
  • ui/tests/projectDelete.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/projectDelete.test.mjs:6
  • ui/tests/queryConsumers.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/queryConsumers.test.mjs:6
  • ui/tests/quickSetupDialog.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/quickSetupDialog.test.mjs:5
  • ui/tests/remoteAgentSetup.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/remoteAgentSetup.test.mjs:6
  • ui/tests/remoteRepair.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/remoteRepair.test.mjs:4
  • ui/tests/runContactNotice.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/runContactNotice.test.mjs:6
  • ui/tests/runLabels.test.mjs:12 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/runLabels.test.mjs:12
  • ui/tests/sharedProjects.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/sharedProjects.test.mjs:6
  • ui/tests/sideChatDraft.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/sideChatDraft.test.mjs:5
  • ui/tests/sidebar-focus.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/sidebar-focus.test.mjs:4
  • ui/tests/slurmSettings.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — ui/tests/slurmSettings.test.mjs:5

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
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.

  • This repository declares test tooling, and the ✓ above records that declaration — but ui/tests/abandonRun.test.mjs and 47 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — ui/tests/abandonRun.test.mjs:5
R7 · Dead Code9.8 / 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 22 application, 14 tooling and 143 test entry point(s) detected in this repo. Gate removals on `npm run typecheck` — an undetected custom entry would make these reachable.
  • no import path from any entry point (22 application, 14 tooling, 143 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 (×3) — REDACTED, scripts/canary-manifest.mjs, scripts/canary-tag.mjs
  • Nothing imports this binding — it is safe to review for removal. (×3) — ui/src/components/FileTypeIcon.tsx:9, ui/src/components/GitDiff.tsx:239, ui/src/components/tourGeometry.ts:15

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Exemplary✓ Tool-verified

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 ui/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. — ui/package.json:63
  • Every import is type-only — move it to devDependencies. — ui/src/markdownLivePreview.ts:22

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.0 / 10Strong✓ Tool-verified

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.

  • ui/src/components/AddAgentDialog.tsx → ui/src/components/LocalModelSetup.tsx → ui/src/components/ModelPicker.tsx → ui/src/components/pickerAgents.tsx → ui/src/components/AddAgentDialog.tsx (one verified cycle inside a mutually-dependent group of 5 files) — ui/src/components/AddAgentDialog.tsx:30

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture9.5 / 10Exemplary✓ Tool-verified

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

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

  • Set: Content-Security-Policy, Cross-Origin-Opener-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−0.5 on this card.) The server: `axum::serve(` (src/plane/local_plane.rs:627).

What to do

  • Add Strict-Transport-Security beside the headers the Rust server already sets.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X12 · Unreachable branch8.0 / 10Strong✓ Tool-verified

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

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

  • `std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o700)) ?;` follows `{ return Err(anyhow !("Source snapshot directory {} is not owned by the curre…` (line 160) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — src/compute.rs:166
  • `std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o700)) ?;` follows `{ return Err(anyhow !("SSH service directory has a different owner")); }` (line 123) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run. — src/jobs/ssh/service/mod.rs:126

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.4 / 10Critical✓ Tool-verified

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

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

  • `nativeOptions` is exported, takes a document from its caller (line 42) and hands it to `choices`, which calls itself at line 36 (`choices`) with a piece of `values` — and nowhere in `choices` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `choices` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ui/src/acp.ts:36
  • `subtreeOf` is exported and takes `node: HistoryNode` from its caller, and it calls itself at line 125 (`subtreeOf`) with a piece of `node` — and nowhere in `subtreeOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `subtreeOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — ui/src/components/experimentLineageModel.ts:125
  • `acquire_turn` is public, takes a document from its caller (line 1310) and hands it to `stop_reason`, which calls itself at line 543 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `stop_reason` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/claude.rs:543
  • `advertised_models` is public, takes a document from its caller (line 234) and hands it to `choices`, which calls itself at line 238 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `choices` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/harness/acp.rs:238
  • `find_part_mut` is public and takes `parts: &'a mut[WirePart]` from its caller, and it calls itself at line 647 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `find_part_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/chat/mod.rs:647
  • `resume_persisted_queues` is public and takes a `ChatHost` as its receiver from its caller, and it recurses at line 4617 through `drain_queue` and back with a piece of the document (and at line 5058, line 5069, line 5172) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `resume_persisted_queues` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/chat/mod.rs:4617
  • `set_up_port` is public and takes a `ChatHost` as its receiver from its caller, and it calls itself at line 3958 with a piece of the document (and at line 3959, line 3960) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_up_port` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/chat/mod.rs:3958
  • `subscribe` is public and takes a `ChatHost` as its receiver from its caller, and it calls itself at line 4270 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `subscribe` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/chat/mod.rs:4270
  • `interrupt` is public and takes a `ChatHost` as its receiver from its caller, and it recurses at line 7023 through `stop_delegates`, `stop_delegates_of_stopped`, `stop_turn` and back with a piece of the document (and at line 7099, line 7150, line 7167, line 7191) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `interrupt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/local/chat/mod.rs:7023
  • `cancel` is public and takes a `Runtime` as its receiver from its caller, and it calls itself at line 1132 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `cancel` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/engine/runtime.rs:1132
  • `cleanup` is public and takes a `Runtime` as its receiver from its caller, and it calls itself at line 1152 with a piece of the document (and at line 1162) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `cleanup` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/engine/runtime.rs:1152
  • `request` is public and takes a `Ssh` as its receiver from its caller, and it calls itself at line 117 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `request` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/engine/adapters/ssh.rs:117

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness7.0 / 10Strong✓ Tool-verified

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

  • `_guard` (line 861) is a synchronous lock guard, and it is still alive at the `.await` on line 887: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(_guard);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`. — src/compute.rs:861
  • `snapshot` (line 189) is a transaction this function owns and never releases: no `commit()` (or a deliberate `rollback()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a transaction that is dropped rolls back, so every write made through it is silently undone. Release it where the work ends. — src/store/search.rs:189
  • `tx` (line 355) is a transaction released by `commit()` (or a deliberate `rollback()`) only on the path that reaches line 412; the `return` on line 361 leaves before that with a success value, and on that path a transaction that is dropped rolls back, so every write made through it is silently undone. Release it before that `return` too (or return an error there, if the early exit is a failure). — REDACTED:355
  • `std::mem::forget(lock)` (line 786) takes `lock` out of Rust's ownership: its `Drop` never runs, so whatever it holds — a descriptor, a socket, a buffer, a lock — is never given back, and nothing can give it back later because the value is gone. Let it drop (or call its explicit close) where its work ends; if the handle must outlive this function, turn it into a raw handle with `into_raw`/`into_raw_fd` and reclaim it with the matching `from_raw` when the owner is done. — src/commands/app.rs:786

What to do

  • Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
X2 · Cancellation propagation8.7 / 10Strong✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 7/9 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `finishOnboarding` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — dev.ts:507
  • `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — dev.ts:509

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`. In Rust, where a guard or permit releases when it is dropped, whether a release written BY HAND — `add_permits` after a forgotten permit, `force_unlock` after a leaked guard, a raw lock's `unlock` — matches the state the function's own acquisitions put the primitive in: not after a try or timed acquire whose failure does not leave, not from a cleanup set up before an acquire that can fail, not skipped by a `?`, `return`, `break` or `continue`, and not on top of a guard that still releases itself.

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

X25 · Inert configuration knob7.4 / 10Strong✓ Tool-verified

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

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

  • `Sandbox.machine_type` is offered as a configuration-file option, so whoever configures the program can set it — but the only production code that touches it writes it to a log or the terminal. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:190
  • `Sandbox.created_by` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:191
  • `Sandbox.failed_at` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:199
  • `Sandbox.provider_instance_id` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:201
  • `SshKeyEnvelope.ssh_key` is offered as a configuration-file option, so whoever configures the program can set it — but the only production code that touches it writes it to a log or the terminal. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:242
  • `Paper.first_publication_date` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `published_at`, and nothing reads that either. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/client.rs:1219
  • `AgentsCommand::Label.emoji` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/agents.rs:23
  • `AgentsCommand::Label.color` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/agents.rs:26
  • `AgentsCommand::Label.clear_name` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/agents.rs:29
  • `AgentsCommand::Label.clear_logo` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/agents.rs:32
  • `AgentsCommand::AddEndpoint.key_env` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/agents.rs:52
  • `ModelFeed.featured` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/up/model_feed.rs:26
  • `Lookup.ip` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/up/network.rs:22
  • `Lookup.is_hosting` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `is_datacenter`, and nothing reads that either. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/up/network.rs:23
  • `RemoteUiPreferences.theme` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/commands/up_remote.rs:61
  • `WirePrompt.synthesized` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/chat/mod.rs:792
  • `RateLimitWindow.window_duration_mins` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `minutes`, and nothing reads that either. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/harness/codex.rs:598
  • `Credits.balance` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/harness/codex.rs:608
  • `ModelInfo.service_tiers` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/harness/detect.rs:162
  • `ModelInfo.image_input` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/harness/detect.rs:165
  • `HarnessOptions.default_reasoning_level` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/local/harness/options.rs:189
  • `UpArgs.no_agent` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/main.rs:825
  • `FeedbackArgs.details` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/main.rs:916
  • `Settings.orx_binary_path` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing. — src/telemetry.rs:132

What to do

  • Each finding names the spans that disagree — the knob the caller supplies and the site that ignores it, whether by re-spelling its default, by falling back under the wrong key, by parsing with no format provider at all, or by printing under whatever culture the host supplies. Confirm from those spans, then decide which of the two the type meant: read the knob at the named site, or drop the knob so the signature stops advertising something the type cannot feel. Leaving both is the one option that cannot be right.
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

X5 · Nullable reference types9.5 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Rust's absent values are handled rather than forced — `Option` and `Result` make absence a value the caller must handle in every crate, and each `.unwrap()` or `.expect()` that no guard on its path proves present is a panic the first time the value is `None` or `Err`.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • `std::env::var("CARGO_MANIFEST_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:76
  • `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:79
  • `std::fs::write(&rc,format!("1 ICON \"{escaped}\"\n"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:81
  • `embed_resource::compile(&rc,embed_resource::NONE).manifest_required()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:84
  • `std::path::absolute(directory)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:93
  • `std::env::var_os("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×2) — build.rs:118, build.rs:138
  • `path.file_name()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:118
  • `std::fs::write(&snapshot,bytes)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:119
  • `writeln!(generated,"({host_os:?}, {arch:?}, {sha:?}, include_bytes!({snapshot:?}).as_slice()),")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:130
  • `std::fs::write(PathBuf::from(std::env::var_os("OUT_DIR").unwrap()).join("host_binaries.rs"),generated,)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — build.rs:141
  • `std::env::var("CARGO_MANIFEST_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — windows/launcher/build.rs:7
  • `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — windows/launcher/build.rs:10
  • `std::fs::write(&rc,format!("1 ICON \"{escaped}\"\n"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — windows/launcher/build.rs:12
  • `embed_resource::compile(&rc,embed_resource::NONE).manifest_required()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — windows/launcher/build.rs:15
  • `crate::net::remote_client().build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). (×3) — src/client.rs:273, src/telemetry.rs:692, src/updates.rs:126
  • `crate::net::remote_client().connect_timeout(std::time::Duration::from_secs(20)).read_timeout(std::time::Duration::from_secs(30)).build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `paper_pdf_http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/client.rs:1330
  • `path.parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `open_lifecycle_lock_in` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:72
  • `self.engine_host(&alias,&root)?` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `engine_hosts` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — REDACTED:5543
  • `Version::parse(env!("CARGO_PKG_VERSION"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `current_version` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/updates.rs:121
  • `parent_exp.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_experiment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/plane/local_plane.rs:402
  • `events.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `logs_to` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/plane/local_plane.rs:1032
  • `process.child.stdin.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `test_connection` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/acp.rs:370
  • `process.child.stdout.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `test_connection` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/acp.rs:372
  • `labels.entry(id.to_string()).or_insert_with(||json!({})).as_object_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `label` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:262
  • `root.parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `prepare_home_in` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:473
  • `root.parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `remove` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:551
  • `entry.as_object_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `reconcile` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:613
  • `found.as_object_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `reconcile` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:621
  • `entry.as_object_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `profile_entry` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:669
  • `crate::local::harness::resolve_entry(&mut entry,configured.as_deref())` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `profile_entry` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_profiles.rs:695
  • `text` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `rendered` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_text.rs:46
  • `line.split(" #").next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `command_variants` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_text.rs:192
  • `line.split(" >").next()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `command_variants` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_text.rs:193
  • `v[open..].find([']',')'])` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `command_variants` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/agent_text.rs:201
  • `std::fs::create_dir_all(&base)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scratch` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/files.rs:654
  • `std::fs::create_dir_all(&outside)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scratch` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/files.rs:655
  • `std::fs::write(outside.join("secret.txt"),"secret")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `scratch` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`). — src/local/files.rs:656

What to do

  • Each row is a forced `Option`/`Result` no guard on its path proves present. Handle the absent case where it arises rather than forcing it: `?` to hand it to the caller, `if let` / `match` / `let … else` to branch on it, `unwrap_or` / `unwrap_or_default` / `unwrap_or_else` where a default is right. Where the value genuinely cannot be absent, say so in a way a reader can check from the line: test it first (`if x.is_none() { return … }`), look the key up with `contains_key` or the index against `len()`, or construct the value so it cannot be absent.

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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

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

LensScoreRatingImpact
Code Health66.2Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture86.7Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity62.0Adequate — gated by D15, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness55.0Adequate — gated by P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security73.1Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven59.4AdequateAcceptable, with room to improve.
Event Sourcing100.0ExemplaryStrongest area.
Accessibility56.8Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 21 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 46 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; this repository's Python 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.
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — AX6 reached only 22% of this repository's production lines — rust (206,959 lines), c (16 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev` in ui/) exited before it served a page. Likely cause (our sandbox): a program the dev server needs is not installed in our sandbox image. This is a limit of our sandbox, not of your repository. Last output: "> orx-ui@0.1.0 dev / > vite / sh: 1: vite: not found" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency does not read html yet; not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. 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"]`.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 5 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • 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 — JavaScript/TypeScript suite
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 27 value object(s); 6 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 — no mutating command handlers or message consumers detected — idempotency check not applicable
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • 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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X19 Unrestored process-global state — X19 reached only 22% of this repository's production lines — rust (206,959 lines), c (16 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 22% of this repository's production lines — rust (206,959 lines), c (16 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 22% of this repository's production lines — rust (206,959 lines), c (16 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 77 finding(s)
ED1 · Handler temporal coupling · Blocking call on the event loop · ×40
  • Blocking call on the event loop: exec.run calls `thread::sleep` crates/orx-host/src/exec.rs:171 — `exec.run` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: legacy.inspect calls `std::fs::read_to_string` crates/orx-host/src/legacy.rs:41 — `legacy.inspect` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: legacy.inspect calls `std::fs::read_to_string` crates/orx-host/src/legacy.rs:50 — `legacy.inspect` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: src.nonce calls `File::open` crates/orx-host/src/lib.rs:48 — `src.nonce` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: src.publish_bytes calls `std::fs::rename` crates/orx-host/src/lib.rs:73 — `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::rename`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: src.publish_bytes calls `File::open` crates/orx-host/src/lib.rs:74 — `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: src.publish_bytes calls `std::fs::remove_file` crates/orx-host/src/lib.rs:80 — `src.publish_bytes` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: log.open calls `File::open` crates/orx-host/src/log.rs:10 — `log.open` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: log.open calls `File::open` crates/orx-host/src/log.rs:15 — `log.open` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: ProcessTable.from_pids calls `thread::sleep` crates/orx-host/src/platform.rs:180 — `ProcessTable.from_pids` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.signal calls `std::fs::read` crates/orx-host/src/platform.rs:297 — `platform.signal` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.signal calls `std::fs::remove_file` crates/orx-host/src/platform.rs:298 — `platform.signal` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::remove_file`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.boot_id calls `std::fs::read_to_string` crates/orx-host/src/platform.rs:377 — `platform.boot_id` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.pids calls `std::fs::read_dir` crates/orx-host/src/platform.rs:384 — `platform.pids` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_dir`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.process calls `std::fs::read_to_string` crates/orx-host/src/platform.rs:426 — `platform.process` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: platform.process_uid calls `std::fs::read_to_string` crates/orx-host/src/platform.rs:443 — `platform.process_uid` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: Host.new calls `std::fs::create_dir_all` crates/orx-host/src/server.rs:40 — `Host.new` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::create_dir_all`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: Host.new calls `std::fs::set_permissions` crates/orx-host/src/server.rs:41 — `Host.new` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::set_permissions`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: server.file_sha calls `File::open` crates/orx-host/src/server.rs:1258 — `server.file_sha` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.start_gate calls `thread::sleep` crates/orx-host/src/wrapper.rs:407 — `wrapper.start_gate` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `thread::sleep`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.cleanup calls `std::fs::read_to_string` crates/orx-host/src/wrapper.rs:611 — `wrapper.cleanup` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.request calls `File::open` crates/orx-host/src/wrapper.rs:664 — `wrapper.request` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `File::open`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.started_at calls `std::fs::metadata` crates/orx-host/src/wrapper.rs:705 — `wrapper.started_at` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.state calls `std::fs::read_to_string` crates/orx-host/src/wrapper.rs:760 — `wrapper.state` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::read_to_string`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • Blocking call on the event loop: wrapper.state calls `std::fs::metadata` crates/orx-host/src/wrapper.rs:765 — `wrapper.state` runs on the async event loop (it is async, an actor or framework handler, a hand-written `poll`, or called from one) and makes the blocking call `std::fs::metadata`: while it blocks, the loop's worker thread serves nothing else, so every task, message and request scheduled on it waits — and a blocking wait on a future that needs that worker can deadlock. Use the awaited twin (`tokio::time::sleep(..).await`, `tokio::fs`, an async channel/client), or move the work off the loop with `tokio::task::spawn_blocking`.
  • + 15 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · High CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×4
  • Hover-only interaction on <div> ui/src/components/ChatPanel.tsx:758 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> ui/src/components/ExpHoverCard.tsx:243 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> ui/src/components/SkillChips.tsx:125 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
  • Hover-only interaction on <div> ui/src/components/TreeView.tsx:248 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: up.rs ↔ hf.rs src/commands/up.rs:1 — `src/commands/up.rs` (context commands) and `src/local/hf.rs` (context local) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `63d7c9d3` OR-351 Configure Slurm cpus/mem defaults from the CLI and record them…; `9077038f` OR-367 Record who requested each run cancel (#598); `35c68706` OR-304: Compute CLI, custom instructions, and Slurm recovery (#429) — run `git show` on any of them.
  • Boundary-crossing change coupling: up.rs ↔ localrun.rs src/commands/up.rs:1 — `src/commands/up.rs` (context commands) and `src/local/localrun.rs` (context local) sit in DIFFERENT parts of the tree yet change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `63d7c9d3` OR-351 Configure Slurm cpus/mem defaults from the CLI and record them…; `9077038f` OR-367 Record who requested each run cancel (#598); `d7fd6362` Fix uploaded skill provenance and local run boundaries (#458) — run `git show` on any of them.
  • Boundary-crossing change coupling: mod.rs ↔ localrun.rs src/jobs/mod.rs:1 — `src/jobs/mod.rs` (context jobs) and `src/local/localrun.rs` (context local) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `29dcdc04` Configurable remote storage root for SSH and Slurm (OR-510) (#754); `63d7c9d3` OR-351 Configure Slurm cpus/mem defaults from the CLI and record them…; `35c68706` OR-304: Compute CLI, custom instructions, and Slurm recovery (#429) — run `git show` on any of them.
AC2 · Forms & labels · <input> without a programmatic label · ×2
  • <input> without a programmatic label ui/src/components/GitTokenForm.tsx:41 — 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 ui/src/components/SettingsPage.tsx:2808 — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <svg role="img"> without an accessible name · ×1
  • <svg role="img"> without an accessible name agent-skills/orx-figures/assets/orx-chart.html — An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby.
AC4 · Keyboard semantics · Click handler on a <span> nested inside <button> · ×1
  • Click handler on a <span> nested inside <button> ui/src/components/ClosableTab.tsx:69 — This <span> carries its own click handler, but it sits inside a <button> that performs a different action. A keyboard user reaches the <button> and activating it runs the <button>'s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a <button> from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the <button> and make it a sibling <button>, so each action has its own control.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×1
  • Double-click handler on a non-interactive <div> ui/src/components/CsvTable.tsx:226 — This <div> binds mousedown, touchstart and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) ui/src/components/AddAgentDialog.tsx:30 — ui/src/components/AddAgentDialog.tsx → ui/src/components/LocalModelSetup.tsx → ui/src/components/ModelPicker.tsx → ui/src/components/pickerAgents.tsx → ui/src/components/AddAgentDialog.tsx (one verified cycle inside a mutually-dependent group of 5 files)
Serious — 1690 finding(s)
D2 · Cognitive Complexity · openresearch_cli · ×164
  • openresearch_cli::local::harness::claude::apply_event (cognitive 196) src/local/harness/claude.rs:2169 — openresearch_cli::local::harness::claude::apply_event has cognitive complexity 196 (threshold 15). Drivers by points: if/else 53 (163 pts), match/switch 10 (22 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 124). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • openresearch_cli::commands::app::imp::run_event_loop (cognitive 134) src/commands/app.rs:1026 — openresearch_cli::commands::app::imp::run_event_loop has cognitive complexity 134 (threshold 15). Drivers by points: if/else 40 (86 pts), match/switch 15 (30 pts), loops 5 (11 pts), boolean chains 7 (nesting depth added 67). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::harness::claude::run_attempt (cognitive 108) src/local/harness/claude.rs:2850 — openresearch_cli::local::harness::claude::run_attempt has cognitive complexity 108 (threshold 15). Drivers by points: if/else 26 (68 pts), match/switch 9 (26 pts), boolean chains 8, loops 3 (6 pts) (nesting depth added 62). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::harness::codex::run_turn_app_server (cognitive 104) src/local/harness/codex.rs:3545 — openresearch_cli::local::harness::codex::run_turn_app_server has cognitive complexity 104 (threshold 15). Drivers by points: if/else 28 (65 pts), match/switch 12 (28 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::storage::scan (cognitive 85) src/local/storage.rs:283 — openresearch_cli::local::storage::scan has cognitive complexity 85 (threshold 15). Drivers by points: if/else 21 (57 pts), loops 6 (14 pts), boolean chains 9, match/switch 2 (5 pts) (nesting depth added 47). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • openresearch_cli::commands::up::relay_pty (cognitive 72) src/commands/up.rs:7511 — openresearch_cli::commands::up::relay_pty has cognitive complexity 72 (threshold 15). Drivers by points: if/else 15 (57 pts), match/switch 5 (12 pts), loops 2, boolean chains 1 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::commands::up::run (cognitive 67) src/commands/up.rs:62 — openresearch_cli::commands::up::run has cognitive complexity 67 (threshold 15). Drivers by points: if/else 33 (51 pts), boolean chains 8, match/switch 3 (5 pts), loops 2 (3 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.
  • openresearch_cli::local::harness::codex::run_turn_exec (cognitive 63) src/local/harness/codex.rs:4697 — openresearch_cli::local::harness::codex::run_turn_exec has cognitive complexity 63 (threshold 15). Drivers by points: if/else 27 (51 pts), match/switch 6 (8 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::acp::host::spawn (cognitive 62) src/local/acp/host.rs:645 — openresearch_cli::local::acp::host::spawn has cognitive complexity 62 (threshold 15). Drivers by points: if/else 27 (51 pts), boolean chains 6, match/switch 4 (5 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::commands::up::harness_setup::run (cognitive 55) src/commands/up/harness_setup.rs:203 — openresearch_cli::commands::up::harness_setup::run has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (38 pts), match/switch 5 (11 pts), boolean chains 6 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::jobs::kubernetes::prepare_docs (cognitive 54) src/jobs/kubernetes.rs:630 — openresearch_cli::jobs::kubernetes::prepare_docs has cognitive complexity 54 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 7 (9 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::commands::up_remote::connect_once (cognitive 53) src/commands/up_remote.rs:941 — openresearch_cli::commands::up_remote::connect_once has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (30 pts), match/switch 11 (16 pts), boolean chains 5, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::jobs::ssh::service::transport::connect (cognitive 52) src/jobs/ssh/service/transport.rs:111 — openresearch_cli::jobs::ssh::service::transport::connect has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (41 pts), match/switch 3 (6 pts), loops 5 (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.
  • openresearch_cli::jobs::ssh::hosts::parse (cognitive 51) src/jobs/ssh/hosts.rs:178 — openresearch_cli::jobs::ssh::hosts::parse has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (41 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::run_cli (cognitive 50) src/main.rs:1112 — openresearch_cli::run_cli has cognitive complexity 50 (threshold 15). Drivers by points: if/else 34 (47 pts), boolean chains 2, match/switch 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.
  • openresearch_cli::compute::validate_run_args (cognitive 50) src/compute.rs:652 — openresearch_cli::compute::validate_run_args has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (31 pts), boolean chains 15, loops 2, match/switch 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.
  • openresearch_cli::commands::up::agent_tools::wait (cognitive 49) src/commands/up/agent_tools.rs:528 — openresearch_cli::commands::up::agent_tools::wait has cognitive complexity 49 (threshold 15). Drivers by points: if/else 17 (35 pts), loops 4 (8 pts), boolean chains 5, match/switch 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.
  • openresearch_cli::jobs::ssh::service::run (cognitive 49) src/jobs/ssh/service/mod.rs:771 — openresearch_cli::jobs::ssh::service::run has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 4 (10 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • openresearch_cli::local::chat::subagent::snapshot (cognitive 48) src/local/chat/subagent.rs:11 — openresearch_cli::local::chat::subagent::snapshot has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 3 (8 pts), match/switch 2 (7 pts) (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.
  • openresearch_cli::commands::up::update_chat_session (cognitive 46) src/commands/up.rs:9969 — openresearch_cli::commands::up::update_chat_session has cognitive complexity 46 (threshold 15). Drivers by points: if/else 26 (43 pts), boolean chains 3 (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.
  • openresearch_cli::commands::up::api_v2::events (cognitive 46) src/commands/up/api_v2.rs:985 — openresearch_cli::commands::up::api_v2::events has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (29 pts), match/switch 4 (10 pts), boolean chains 6, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::harness::acp::apply_event (cognitive 44) src/local/harness/acp.rs:718 — openresearch_cli::local::harness::acp::apply_event has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (37 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (2 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.
  • openresearch_cli::local::harness::codex::apply_notification (cognitive 43) src/local/harness/codex.rs:2254 — openresearch_cli::local::harness::codex::apply_notification has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (42 pts), match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • openresearch_cli::local::experiments::archive_ids (cognitive 42) src/local/experiments.rs:90 — openresearch_cli::local::experiments::archive_ids has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 7 (16 pts), boolean chains 5, match/switch 1 (nesting depth added 22). 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.
  • openresearch_cli::commands::up::api_v2::read_log (cognitive 41) src/commands/up/api_v2.rs:797 — openresearch_cli::commands::up::api_v2::read_log has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 17, 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.
  • + 139 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×112
  • Hotspot: ui/src/components/ChatPanel.tsx ui/src/components/ChatPanel.tsx:5485 — ui/src/components/ChatPanel.tsx changed 122 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 985 in ChatPanel.ChatPanel at line 5485. 29 of those changes were fix/bug commits, and the other 93 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/ChatPanel.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: ui/src/App.tsx ui/src/App.tsx:254 — ui/src/App.tsx changed 75 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 631 in App.App at line 254. 12 of those changes were fix/bug commits, and the other 63 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/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: ui/src/components/SettingsPage.tsx ui/src/components/SettingsPage.tsx:419 — ui/src/components/SettingsPage.tsx changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 189 in SettingsPage.AgentList at line 419. 15 of those changes were fix/bug commits, and the other 62 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/SettingsPage.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: src/commands/up.rs src/commands/up.rs:62 — src/commands/up.rs changed 180 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in openresearch_cli::commands::up::run at line 62. 36 of those changes were fix/bug commits, and the other 144 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/commands/up.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/local/chat/mod.rs src/local/chat/mod.rs:5988 — src/local/chat/mod.rs changed 84 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in ChatHost::send_message_showing at line 5988. 21 of those changes were fix/bug commits, and the other 63 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/chat/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: ui/src/components/ModelPicker.tsx ui/src/components/ModelPicker.tsx:300 — ui/src/components/ModelPicker.tsx changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 171 in ModelPicker.ModelPicker at line 300. 4 of those changes were fix/bug commits, and the other 35 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/ModelPicker.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: ui/src/components/FileViewer.tsx ui/src/components/FileViewer.tsx:142 — ui/src/components/FileViewer.tsx changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 248 in FileViewer.FileViewer at line 142. 4 of those changes were fix/bug commits, and the other 22 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/FileViewer.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: src/commands/app.rs src/commands/app.rs:1026 — src/commands/app.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in openresearch_cli::commands::app::imp::run_event_loop at line 1026. 13 of those changes were fix/bug commits, and the other 29 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/commands/app.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: ui/src/components/NewProjectForm.tsx ui/src/components/NewProjectForm.tsx:63 — ui/src/components/NewProjectForm.tsx changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 232 in NewProjectForm.NewProjectForm at line 63. 1 of those changes was a fix/bug commit, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/NewProjectForm.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: ui/src/api.ts ui/src/api.ts:2048 — ui/src/api.ts changed 136 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in api.createApi.json at line 2048. 26 of those changes were fix/bug commits, and the other 110 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/api.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: src/local/harness/claude.rs src/local/harness/claude.rs:2169 — src/local/harness/claude.rs changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in openresearch_cli::local::harness::claude::apply_event at line 2169. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/harness/claude.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: ui/src/components/Onboarding.tsx ui/src/components/Onboarding.tsx:64 — ui/src/components/Onboarding.tsx changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 109 in Onboarding.Onboarding at line 64. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/Onboarding.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: src/local/harness/codex.rs src/local/harness/codex.rs:3545 — src/local/harness/codex.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in openresearch_cli::local::harness::codex::run_turn_app_server at line 3545. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/harness/codex.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/main.rs src/main.rs:1494 — src/main.rs changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in openresearch_cli::dispatch at line 1494. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/main.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:2844 — REDACTED changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in Store::cleanup_run_artifacts_locked at line 2844. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/compute.rs src/compute.rs:652 — src/compute.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in openresearch_cli::compute::validate_run_args at line 652. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/compute.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: ui/src/components/AddAgentDialog.tsx ui/src/components/AddAgentDialog.tsx:270 — ui/src/components/AddAgentDialog.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 297 in AddAgentDialog.AddAgentDialog at line 270. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/AddAgentDialog.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: src/local/harness/opencode.rs src/local/harness/opencode.rs:453 — src/local/harness/opencode.rs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in openresearch_cli::local::harness::opencode::found_providers at line 453. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/harness/opencode.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: ui/src/components/HarnessSetupDialog.tsx ui/src/components/HarnessSetupDialog.tsx:48 — ui/src/components/HarnessSetupDialog.tsx changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in HarnessSetupDialog.HarnessSetup at line 48. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/components/HarnessSetupDialog.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: src/commands/up_remote.rs src/commands/up_remote.rs:941 — src/commands/up_remote.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in openresearch_cli::commands::up_remote::connect_once at line 941. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/commands/up_remote.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/commands/up/harness_setup.rs src/commands/up/harness_setup.rs:203 — src/commands/up/harness_setup.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in openresearch_cli::commands::up::harness_setup::run at line 203. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/commands/up/harness_setup.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: ui/src/RemoteRuntime.tsx ui/src/RemoteRuntime.tsx:159 — ui/src/RemoteRuntime.tsx changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in RemoteRuntime.RemoteSetup at line 159. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- ui/src/RemoteRuntime.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: src/commands/compute.rs src/commands/compute.rs:338 — src/commands/compute.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in ConfigureArgs::body at line 338. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/commands/compute.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/local/claude.rs src/local/claude.rs:1310 — src/local/claude.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ClaudeHost::acquire_turn at line 1310. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/claude.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/engine/transport/mod.rs src/engine/transport/mod.rs:768 — src/engine/transport/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 103 in Actor::run at line 768. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/engine/transport/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 87 more in this group — see findings.md.
D1 · Cyclomatic Complexity · openresearch_cli · ×99
  • openresearch_cli::commands::app::imp::run_event_loop (cyclomatic 112) src/commands/app.rs:1026 — openresearch_cli::commands::app::imp::run_event_loop has cyclomatic complexity 112 (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.
  • openresearch_cli::local::harness::claude::apply_event (cyclomatic 78) src/local/harness/claude.rs:2169 — openresearch_cli::local::harness::claude::apply_event has cyclomatic complexity 78 (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.
  • openresearch_cli::local::harness::codex::run_turn_app_server (cyclomatic 56) src/local/harness/codex.rs:3545 — openresearch_cli::local::harness::codex::run_turn_app_server has cyclomatic complexity 56 (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.
  • openresearch_cli::local::harness::claude::run_attempt (cyclomatic 49) src/local/harness/claude.rs:2850 — openresearch_cli::local::harness::claude::run_attempt 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.
  • openresearch_cli::commands::up::run (cyclomatic 47) src/commands/up.rs:62 — openresearch_cli::commands::up::run has cyclomatic complexity 47 (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.
  • openresearch_cli::compute::validate_run_args (cyclomatic 46) src/compute.rs:652 — openresearch_cli::compute::validate_run_args has cyclomatic complexity 46 (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.
  • openresearch_cli::dispatch (cyclomatic 41) src/main.rs:1494 — openresearch_cli::dispatch has cyclomatic complexity 41 (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.
  • openresearch_cli::local::harness::codex::run_turn_exec (cyclomatic 41) src/local/harness/codex.rs:4697 — openresearch_cli::local::harness::codex::run_turn_exec has cyclomatic complexity 41 (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.
  • openresearch_cli::local::storage::scan (cyclomatic 40) src/local/storage.rs:283 — openresearch_cli::local::storage::scan has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::local::acp::host::spawn (cyclomatic 36) src/local/acp/host.rs:645 — openresearch_cli::local::acp::host::spawn has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::run_cli (cyclomatic 35) src/main.rs:1112 — openresearch_cli::run_cli has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: openresearch_cli::command_name (cyclomatic 37) 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.
  • openresearch_cli::commands::up_remote::connect_once (cyclomatic 35) src/commands/up_remote.rs:941 — openresearch_cli::commands::up_remote::connect_once has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::jobs::ssh::hosts::parse (cyclomatic 34) src/jobs/ssh/hosts.rs:178 — openresearch_cli::jobs::ssh::hosts::parse has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::commands::up::api_v2::read_log (cyclomatic 32) src/commands/up/api_v2.rs:797 — openresearch_cli::commands::up::api_v2::read_log has cyclomatic complexity 32 (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.
  • openresearch_cli::commands::up::harness_setup::run (cyclomatic 30) src/commands/up/harness_setup.rs:203 — openresearch_cli::commands::up::harness_setup::run has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::jobs::kubernetes::prepare_docs (cyclomatic 30) src/jobs/kubernetes.rs:630 — openresearch_cli::jobs::kubernetes::prepare_docs has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::local::harness::codex::apply_notification (cyclomatic 30) src/local/harness/codex.rs:2254 — openresearch_cli::local::harness::codex::apply_notification has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::commands::up::relay_pty (cyclomatic 29) src/commands/up.rs:7511 — openresearch_cli::commands::up::relay_pty has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::commands::up::agent_tools::call (cyclomatic 29) src/commands/up/agent_tools.rs:191 — openresearch_cli::commands::up::agent_tools::call has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::commands::up::api_v2::events (cyclomatic 29) src/commands/up/api_v2.rs:985 — openresearch_cli::commands::up::api_v2::events has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • openresearch_cli::local::harness::codex::item_to_part (cyclomatic 29) src/local/harness/codex.rs:2700 — openresearch_cli::local::harness::codex::item_to_part has cyclomatic complexity 29 (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.
  • openresearch_cli::commands::up::set_ui_state (cyclomatic 28) src/commands/up.rs:6825 — openresearch_cli::commands::up::set_ui_state has cyclomatic complexity 28 (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.
  • openresearch_cli::engine::reconcile::observed (cyclomatic 28) src/engine/reconcile.rs:57 — openresearch_cli::engine::reconcile::observed 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.
  • openresearch_cli::jobs::ssh::service::transport::connect (cyclomatic 28) src/jobs/ssh/service/transport.rs:111 — openresearch_cli::jobs::ssh::service::transport::connect 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.
  • openresearch_cli::local::overleaf_live::run_connection (cyclomatic 28) src/local/overleaf_live.rs:1530 — openresearch_cli::local::overleaf_live::run_connection 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.
  • + 74 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×99
  • FunctionTooLong: api.createApi ui/src/api.ts:2035 — FunctionTooLong — createApi runs 1023 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 923 over it, 10.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: ModelPicker.ModelPicker ui/src/components/ModelPicker.tsx:300 — FunctionTooLong — ModelPicker runs 584 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 484 over it, 5.84× 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: NewProjectForm.NewProjectForm ui/src/components/NewProjectForm.tsx:63 — FunctionTooLong — NewProjectForm runs 532 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 432 over it, 5.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: AddAgentDialog.AddAgentDialog ui/src/components/AddAgentDialog.tsx:270 — FunctionTooLong — AddAgentDialog runs 512 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 412 over it, 5.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: openresearch_cli::commands::app::imp::run_event_loop src/commands/app.rs:1026 — FunctionTooLong — openresearch_cli::commands::app::imp::run_event_loop runs 486 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 386 over it, 4.86× 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: SettingsPage.AgentList ui/src/components/SettingsPage.tsx:419 — FunctionTooLong — AgentList runs 424 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 324 over it, 4.24× 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: openresearch_cli::commands::up::router src/commands/up.rs:658 — FunctionTooLong — openresearch_cli::commands::up::router runs 351 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 251 over it, 3.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: openresearch_cli::local::demo::seed_at src/local/demo.rs:364 — FunctionTooLong — openresearch_cli::local::demo::seed_at runs 329 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 229 over it, 3.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: SettingsPage.SlurmSection ui/src/components/SettingsPage.tsx:2034 — FunctionTooLong — SlurmSection runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Onboarding.Onboarding ui/src/components/Onboarding.tsx:64 — FunctionTooLong — Onboarding runs 301 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 201 over it, 3.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.
  • FunctionTooLong: openresearch_cli::local::harness::claude::apply_event src/local/harness/claude.rs:2169 — FunctionTooLong — openresearch_cli::local::harness::claude::apply_event runs 291 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 191 over it, 2.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: settings.createSettingsQueries ui/src/queries/settings.ts:12 — FunctionTooLong — createSettingsQueries runs 277 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 177 over it, 2.77× 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: events.createEvents ui/src/events.ts:95 — FunctionTooLong — createEvents runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: LibraryPicker.SignedInLibraryPicker ui/src/components/LibraryPicker.tsx:32 — FunctionTooLong — SignedInLibraryPicker runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: openresearch_cli::local::harness::codex::run_turn_app_server src/local/harness/codex.rs:3545 — FunctionTooLong — openresearch_cli::local::harness::codex::run_turn_app_server runs 266 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 166 over it, 2.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: openresearch_cli::commands::up::run src/commands/up.rs:62 — FunctionTooLong — openresearch_cli::commands::up::run runs 265 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 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ModelList.ModelList ui/src/components/ModelList.tsx:126 — FunctionTooLong — ModelList runs 240 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 140 over it, 2.40× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: orx_host::wrapper::wrap crates/orx-host/src/wrapper.rs:15 — FunctionTooLong — orx_host::wrapper::wrap runs 235 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 135 over it, 2.35× 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: RemoteRuntime.RemoteSetup ui/src/RemoteRuntime.tsx:159 — FunctionTooLong — RemoteSetup runs 234 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: WorkspaceConnection.WorkspaceConnection ui/src/components/WorkspaceConnection.tsx:64 — FunctionTooLong — WorkspaceConnection runs 229 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 129 over it, 2.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ArtifactsTab.ArtifactsTab ui/src/components/ArtifactsTab.tsx:508 — FunctionTooLong — ArtifactsTab runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) 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: openresearch_cli::local::harness::codex::run_turn_exec src/local/harness/codex.rs:4697 — FunctionTooLong — openresearch_cli::local::harness::codex::run_turn_exec runs 225 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 125 over it, 2.25× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: openresearch_cli::local::acp::host::spawn src/local/acp/host.rs:645 — FunctionTooLong — openresearch_cli::local::acp::host::spawn runs 224 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 124 over it, 2.24× 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: SettingsPage.SshSection ui/src/components/SettingsPage.tsx:1747 — FunctionTooLong — SshSection 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: ModelPicker.OptionPicker ui/src/components/ModelPicker.tsx:989 — FunctionTooLong — OptionPicker runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 74 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×72
  • FileTooLong: commands/up.rs src/commands/up.rs — FileTooLong — 7839 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 335 free functions. The bar is 500 significant lines; this is 7339 over it, 15.68× 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: components/ChatPanel.tsx ui/src/components/ChatPanel.tsx — FileTooLong — 7151 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 6651 over it, 14.30× 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: chat/mod.rs src/local/chat/mod.rs — FileTooLong — 6755 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 125 free functions. The bar is 500 significant lines; this is 6255 over it, 13.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: REDACTED REDACTED — FileTooLong — 4744 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: Store (3 blocks, 940-6325), declaring 35 free functions. The bar is 500 significant lines; this is 4244 over it, 9.49× 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: components/SettingsPage.tsx ui/src/components/SettingsPage.tsx — FileTooLong — 4113 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3613 over it, 8.23× 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: harness/codex.rs src/local/harness/codex.rs — FileTooLong — 3006 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 124 free functions. The bar is 500 significant lines; this is 2506 over it, 6.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: src/api.ts ui/src/api.ts — FileTooLong — 2274 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1774 over it, 4.55× 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/App.tsx ui/src/App.tsx — FileTooLong — 2230 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1730 over it, 4.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: commands/up_remote.rs src/commands/up_remote.rs — FileTooLong — 2040 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 97 free functions. The bar is 500 significant lines; this is 1540 over it, 4.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: harness/claude.rs src/local/harness/claude.rs — FileTooLong — 1924 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 66 free functions. The bar is 500 significant lines; this is 1424 over it, 3.85× 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: local/git.rs src/local/git.rs — FileTooLong — 1704 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 119 free functions. The bar is 500 significant lines; this is 1204 over it, 3.41× 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: commands/app.rs src/commands/app.rs — FileTooLong — 1579 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 1079 over it, 3.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/client.rs src/client.rs — FileTooLong — 1490 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 77 free functions. The bar is 500 significant lines; this is 990 over it, 2.98× 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: up/compute_settings.rs src/commands/up/compute_settings.rs — FileTooLong — 1409 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 77 free functions. The bar is 500 significant lines; this is 909 over it, 2.82× 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/updates.rs src/updates.rs — FileTooLong — 1355 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 99 free functions. The bar is 500 significant lines; this is 855 over it, 2.71× 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: local/demo.rs src/local/demo.rs — FileTooLong — 1332 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 33 free functions. The bar is 500 significant lines; this is 832 over it, 2.66× 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: local/overleaf_live.rs src/local/overleaf_live.rs — FileTooLong — 1304 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 38 free functions. The bar is 500 significant lines; this is 804 over it, 2.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: src/server.rs crates/orx-host/src/server.rs — FileTooLong — 1167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 74% of them inside a single declaration: Host (2 blocks, 25-1167). The bar is 500 significant lines; this is 667 over it, 2.33× 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: components/ModelPicker.tsx ui/src/components/ModelPicker.tsx — FileTooLong — 1099 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 599 over it, 2.20× 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: commands/remote_host.rs src/commands/remote_host.rs — FileTooLong — 1044 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 47 free functions. The bar is 500 significant lines; this is 544 over it, 2.09× 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: local/claude.rs src/local/claude.rs — FileTooLong — 1020 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 520 over it, 2.04× 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: components/AddAgentDialog.tsx ui/src/components/AddAgentDialog.tsx — FileTooLong — 1006 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 506 over it, 2.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: engine/runtime.rs src/engine/runtime.rs — FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 83% of them inside a single declaration: Runtime (3 blocks, 179-1281). The bar is 500 significant lines; this is 470 over it, 1.94× 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: harness/opencode_v2.rs src/local/harness/opencode_v2.rs — FileTooLong — 923 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 423 over it, 1.85× 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/main.rs src/main.rs — FileTooLong — 908 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 408 over it, 1.82× 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.
  • + 47 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×40
  • Sync-over-async blocking dev.ts:254 — `readdirSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:256 — `lstatSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:267 — `cpSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:270 — `copyFileSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:271 — `linkSync` in `copyState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:312 — `rmSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:316 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:317 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:317 — `readdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:322 — `mkdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:323 — `mkdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:328 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:331 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:335 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:336 — `existsSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:336 — `readdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:337 — `execFileSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:340 — `rmSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:341 — `mkdirSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:342 — `renameSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:344 — `renameSync` in `replaceLive` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:444 — `mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:445 — `existsSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:448 — `mkdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking dev.ts:449 — `readdirSync` in `build` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · This test file cannot be loaded · ×40
  • This test file cannot be loaded ui/tests/abandonRun.test.mjs:5 — ui/tests/abandonRun.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/accountChip.test.mjs:6 — ui/tests/accountChip.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/acp.test.mjs:5 — ui/tests/acp.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/acpOnboarding.test.mjs:4 — ui/tests/acpOnboarding.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/acpPermission.test.mjs:6 — ui/tests/acpPermission.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/addAgentDialog.test.mjs:5 — ui/tests/addAgentDialog.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/agentSwitches.test.mjs:105 — ui/tests/agentSwitches.test.mjs:105 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/alphaxivToolRows.test.mjs:5 — ui/tests/alphaxivToolRows.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/artifactsFilter.test.mjs:4 — ui/tests/artifactsFilter.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/autoReviewer.test.mjs:4 — ui/tests/autoReviewer.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/chat.mjs:6 — ui/tests/chat.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/chatApiError.test.mjs:5 — ui/tests/chatApiError.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/chatSearchKeyboard.test.mjs:4 — ui/tests/chatSearchKeyboard.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/closeDialog.test.mjs:4 — ui/tests/closeDialog.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/composerFocus.test.mjs:7 — ui/tests/composerFocus.test.mjs:7 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/composerIme.test.mjs:6 — ui/tests/composerIme.test.mjs:6 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/createdChatNavigation.test.mjs:4 — ui/tests/createdChatNavigation.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/detailDrawer.test.mjs:5 — ui/tests/detailDrawer.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/experimentLineageView.test.mjs:7 — ui/tests/experimentLineageView.test.mjs:7 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/failedComposerRecovery.test.mjs:5 — ui/tests/failedComposerRecovery.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/githubSyncSettings.test.mjs:4 — ui/tests/githubSyncSettings.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/i18nCatalog.test.mjs:13 — ui/tests/i18nCatalog.test.mjs:13 imports '../project.inlang', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/inlineHtmlFigure.test.mjs:5 — ui/tests/inlineHtmlFigure.test.mjs:5 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/modelFeed.test.mjs:4 — ui/tests/modelFeed.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded ui/tests/modelPickerKeyboard.test.mjs:4 — ui/tests/modelPickerKeyboard.test.mjs:4 imports '../src/paraglide/messages.js', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • + 15 more in this group — see findings.md.
X5 · Nullable reference types · Symbol treated as nullable, then dereferenced unguarded · ×40
  • Symbol treated as nullable, then dereferenced unguarded build.rs:76 — `std::env::var("CARGO_MANIFEST_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:79 — `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:81 — `std::fs::write(&rc,format!("1 ICON \"{escaped}\"\n"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:84 — `embed_resource::compile(&rc,embed_resource::NONE).manifest_required()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_windows_icon` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:93 — `std::path::absolute(directory)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:118 — `std::env::var_os("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:118 — `path.file_name()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:119 — `std::fs::write(&snapshot,bytes)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:130 — `writeln!(generated,"({host_os:?}, {arch:?}, {sha:?}, include_bytes!({snapshot:?}).as_slice()),")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:138 — `std::env::var_os("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded build.rs:141 — `std::fs::write(PathBuf::from(std::env::var_os("OUT_DIR").unwrap()).join("host_binaries.rs"),generated,)` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `embed_host_binaries` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded windows/launcher/build.rs:7 — `std::env::var("CARGO_MANIFEST_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded windows/launcher/build.rs:10 — `std::env::var("OUT_DIR")` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded windows/launcher/build.rs:12 — `std::fs::write(&rc,format!("1 ICON \"{escaped}\"\n"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded windows/launcher/build.rs:15 — `embed_resource::compile(&rc,embed_resource::NONE).manifest_required()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `main` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/client.rs:273 — `crate::net::remote_client().build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/client.rs:1330 — `crate::net::remote_client().connect_timeout(std::time::Duration::from_secs(20)).read_timeout(std::time::Duration::from_secs(30)).build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `paper_pdf_http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:72 — `path.parent()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `open_lifecycle_lock_in` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded REDACTED:5543 — `self.engine_host(&alias,&root)?` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `engine_hosts` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/telemetry.rs:692 — `crate::net::remote_client().build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/updates.rs:121 — `Version::parse(env!("CARGO_PKG_VERSION"))` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `current_version` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/updates.rs:126 — `crate::net::remote_client().build()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `http` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/plane/local_plane.rs:402 — `parent_exp.as_ref()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.unwrap()` in `create_experiment` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/plane/local_plane.rs:1032 — `events.as_mut()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `logs_to` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • Symbol treated as nullable, then dereferenced unguarded src/local/acp.rs:370 — `process.child.stdin.take()` can be absent — it is an `Option` or `Result`, which is why it is forced — and `.expect()` in `test_connection` forces it with nothing on this path excluding `None`/`Err`: no `if let` or `match` arm that matched it present, no `let … else`, no `is_some()`/`is_ok()` test (or `is_none()`/`is_err()` test that leaves), no `assert!` of it, and for a lookup no proof the key or index exists. This line panics the first time the value is not there. Handle the absent case where it arises: propagate it with `?`, branch on it with `if let` / `match` / `let … else`, or give it a default (`unwrap_or`, `unwrap_or_default`, `unwrap_or_else`).
  • + 15 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×27
  • MethodTooLong: ChatHost.send_message_showing src/local/chat/mod.rs:5988 — MethodTooLong — send_message_showing runs 532 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 432 over it, 5.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Store.open_at_with_move_lock REDACTED:1012 — MethodTooLong — open_at_with_move_lock runs 462 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 362 over it, 4.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.
  • MethodTooLong: Actor.run src/engine/transport/mod.rs:768 — MethodTooLong — run runs 277 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 177 over it, 2.77× 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: ChatHost.recover_turn src/local/chat/mod.rs:5392 — MethodTooLong — recover_turn runs 276 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 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Host.slurm_queue crates/orx-host/src/server.rs:812 — MethodTooLong — slurm_queue runs 271 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 171 over it, 2.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: Host.request crates/orx-host/src/server.rs:107 — MethodTooLong — request runs 257 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 157 over it, 2.57× 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: Actor.login src/engine/transport/mod.rs:517 — MethodTooLong — login runs 194 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 94 over it, 1.94× 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: Local.start src/engine/adapters/local.rs:117 — MethodTooLong — start runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: OpenResearch.inspect src/engine/adapters/openresearch.rs:330 — MethodTooLong — inspect runs 179 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 79 over it, 1.79× 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: Broker.dispatch src/jobs/ssh/service/mod.rs:560 — MethodTooLong — dispatch runs 170 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 70 over it, 1.70× 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: Engine.commit src/engine/reconcile.rs:433 — MethodTooLong — commit runs 163 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 63 over it, 1.63× 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: Store.search_chat_messages src/store/search.rs:188 — MethodTooLong — search_chat_messages runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Host.launch crates/orx-host/src/server.rs:506 — MethodTooLong — launch 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.
  • MethodTooLong: ChatHost.launch_turn_ctx_locked src/local/chat/mod.rs:6692 — MethodTooLong — launch_turn_ctx_locked runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Store.create_demo_snapshot REDACTED:2547 — MethodTooLong — create_demo_snapshot 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: Store.finalize_turn_usage REDACTED:582 — MethodTooLong — finalize_turn_usage 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: ConfigureArgs.body src/commands/compute.rs:338 — MethodTooLong — body runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ClaudeHost.acquire_turn src/local/claude.rs:1310 — MethodTooLong — acquire_turn runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatHost.fork_turn src/local/chat/mod.rs:5736 — MethodTooLong — fork_turn 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: Engine.deliver_notify src/engine/notify.rs:36 — MethodTooLong — deliver_notify runs 108 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 8 over it, 1.08× 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: ChatHost.set_agent src/local/chat/mod.rs:2005 — MethodTooLong — set_agent runs 108 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 8 over it, 1.08× 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: Runtime.collect_log src/engine/runtime.rs:871 — MethodTooLong — collect_log runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ApiClient.logs_to src/plane/local_plane.rs:918 — MethodTooLong — logs_to runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ChatHost.respond src/local/chat/mod.rs:7254 — MethodTooLong — respond 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: Delegated.create src/local/acp/delegated.rs:191 — MethodTooLong — create runs 103 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 3 over it, 1.03× 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.
  • + 2 more in this group — see findings.md.
X25 · Inert configuration knob · Configuration option is read nowhere · ×22
  • Configuration option is read nowhere src/client.rs:191 — `Sandbox.created_by` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/client.rs:199 — `Sandbox.failed_at` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/client.rs:201 — `Sandbox.provider_instance_id` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/client.rs:1219 — `Paper.first_publication_date` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `published_at`, and nothing reads that either. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/agents.rs:23 — `AgentsCommand::Label.emoji` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/agents.rs:26 — `AgentsCommand::Label.color` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/agents.rs:29 — `AgentsCommand::Label.clear_name` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/agents.rs:32 — `AgentsCommand::Label.clear_logo` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/agents.rs:52 — `AgentsCommand::AddEndpoint.key_env` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/up/model_feed.rs:26 — `ModelFeed.featured` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/up/network.rs:22 — `Lookup.ip` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/up/network.rs:23 — `Lookup.is_hosting` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `is_datacenter`, and nothing reads that either. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/commands/up_remote.rs:61 — `RemoteUiPreferences.theme` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/chat/mod.rs:792 — `WirePrompt.synthesized` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/harness/codex.rs:598 — `RateLimitWindow.window_duration_mins` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Its value is copied into `minutes`, and nothing reads that either. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/harness/codex.rs:608 — `Credits.balance` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/harness/detect.rs:162 — `ModelInfo.service_tiers` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/harness/detect.rs:165 — `ModelInfo.image_input` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/local/harness/options.rs:189 — `HarnessOptions.default_reasoning_level` is offered as a builder setter option, so whoever configures the program can set it — but no production code reads it. A test asserts that it parses, which proves the key is read from the input, not that it does anything. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/main.rs:825 — `UpArgs.no_agent` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/main.rs:916 — `FeedbackArgs.details` is offered as a command-line argument option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is read nowhere src/telemetry.rs:132 — `Settings.orx_binary_path` is offered as a configuration-file option, so whoever configures the program can set it — but no production code reads it. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×16
  • Duplicated block (6 lines × 2) src/commands/up.rs:3702 — src/commands/up.rs:3702-3707 | src/commands/up.rs:7680-7685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:3702` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/commands/up.rs:4304 — src/commands/up.rs:4304-4311 | src/commands/up.rs:4907-4912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:4304` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/compute.rs:817 — src/compute.rs:817-822 | src/local/k8s.rs:50-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/local/codex.rs:884 — src/local/codex.rs:884-889 | src/local/harness/codex.rs:4718-4723 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/local/harness/cursor.rs:454 — src/local/harness/cursor.rs:454-459 | src/local/harness/cursor.rs:528-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/cursor.rs:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:2580 — REDACTED:2580-2595 | REDACTED:3457-3462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2580` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:4705 — REDACTED:4705-4710 | REDACTED:4727-4732 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4705` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:5012 — REDACTED:5012-5017 | REDACTED:5062-5067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5012` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) src/commands/remote_host.rs:165 — src/commands/remote_host.rs:165-170 | REDACTED:118-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) src/local/browser_cookies.rs:68 — src/local/browser_cookies.rs:68-73 | REDACTED:6367-6372 — 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) REDACTED:2558 — REDACTED:2558-2572 | REDACTED:2684-2689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2558` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) REDACTED:2171 — REDACTED:2171-2176 | REDACTED:5967-5973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2171` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) crates/orx-host/src/wrapper.rs:563 — crates/orx-host/src/wrapper.rs:563-568 | crates/orx-host/src/wrapper.rs:571-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) REDACTED:2059 — REDACTED:2059-2064 | REDACTED:2067-2072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) src/local/demo.rs:347 — src/local/demo.rs:347-352 | src/local/demo.rs:1551-1556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/local/native_chats.rs:318 — src/local/native_chats.rs:318-323 | src/local/native_chats.rs:340-345 — 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.
D3 · God Classes · ClassTooLong · ×14
  • ClassTooLong: Store REDACTED:940 — ClassTooLong — 3851 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 274 methods, 3 blocks, lines 940-6325. The bar is 400 significant lines; this is 3451 over it, 9.63× 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: ChatHost src/local/chat/mod.rs:2898 — ClassTooLong — 3277 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 96 methods, 4 blocks, lines 2004-8132. The bar is 400 significant lines; this is 2877 over it, 8.19× 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: Host crates/orx-host/src/server.rs:25 — ClassTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 2 blocks, lines 25-1167. The bar is 400 significant lines; this is 467 over it, 2.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: Runtime src/engine/runtime.rs:179 — ClassTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 22 methods, 3 blocks, lines 179-1281. The bar is 400 significant lines; this is 404 over it, 2.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.
  • ClassTooLong: ModelPicker ui/src/components/ModelPicker.tsx:1 — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 184 over it, 1.46× 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: Actor src/engine/transport/mod.rs:375 — ClassTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 7 methods, 2 blocks, lines 375-1139. The bar is 400 significant lines; this is 152 over it, 1.38× 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: NewProjectForm ui/src/components/NewProjectForm.tsx:1 — ClassTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 132 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: OpenResearch src/engine/adapters/openresearch.rs:250 — ClassTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 3 blocks, lines 250-1003. The bar is 400 significant lines; this is 124 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AddAgentDialog ui/src/components/AddAgentDialog.tsx:1 — ClassTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 112 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: TurnCtx src/local/chat/mod.rs:8357 — ClassTooLong — 511 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 2 blocks, lines 8357-9349. The bar is 400 significant lines; this is 111 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: Connection src/local/overleaf_live.rs:733 — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 2 blocks, lines 733-1486. The bar is 400 significant lines; this is 104 over it, 1.26× 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: Ssh src/engine/adapters/ssh.rs:42 — ClassTooLong — 471 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 14 methods, 3 blocks, lines 42-874. The bar is 400 significant lines; this is 71 over it, 1.18× 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: ClaudeHost src/local/claude.rs:966 — ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 3 blocks, lines 966-1593. The bar is 400 significant lines; this is 27 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Local src/engine/adapters/local.rs:60 — ClassTooLong — 424 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 3 blocks, lines 60-639. The bar is 400 significant lines; this is 24 over it, 1.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×13
  • Duplicated block (9 lines × 2) src/commands/remote_host.rs:201 — src/commands/remote_host.rs:201-209 | REDACTED:153-161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/remote_host.rs:201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) src/commands/up.rs:2356 — src/commands/up.rs:2356-2364 | src/commands/up.rs:2444-2452 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/engine/transport/mod.rs:901 — src/engine/transport/mod.rs:901-909 | src/engine/transport/mod.rs:1058-1066 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/jobs/modal.rs:366 — src/jobs/modal.rs:366-374 | src/jobs/vercel.rs:914-922 — before extracting anything, compare `src/jobs/modal.rs` and `src/jobs/vercel.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/modal.rs:366` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/local/demo.rs:547 — src/local/demo.rs:547-555 | src/local/demo.rs:600-608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/local/harness/acp.rs:631 — src/local/harness/acp.rs:631-639 | src/local/harness/antigravity.rs:651-659 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) src/local/harness/codex.rs:1632 — src/local/harness/codex.rs:1632-1640 | src/local/harness/codex.rs:3584-3595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/codex.rs:3584` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `ctx` to `&CompactCtx` in one and `&mut TurnCtx` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) src/local/latex_templates.rs:183 — src/local/latex_templates.rs:183-191 | src/local/user_skills.rs:418-426 — before extracting anything, compare `src/local/latex_templates.rs` and `src/local/user_skills.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/latex_templates.rs:183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/commands/up/compute_settings.rs:854 — src/commands/up/compute_settings.rs:854-862 | src/commands/up/compute_settings.rs:901-909 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/local/harness/managed.rs:596 — src/local/harness/managed.rs:596-604 | src/local/portable_git.rs:107-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/managed.rs:596` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) src/local/modal.rs:49 — src/local/modal.rs:49-57 | src/local/vercel.rs:40-48 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/modal.rs:49` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/commands/remote_host.rs:1080 — src/commands/remote_host.rs:1080-1088 | src/local/storage.rs:54-62 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/remote_host.rs:1080` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/local/demo.rs:1714 — src/local/demo.rs:1714-1722 | src/local/git.rs:328-336 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/demo.rs:1714` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×13
  • Duplicated block (7 lines × 2) crates/orx-host/src/legacy.rs:113 — crates/orx-host/src/legacy.rs:113-119 | crates/orx-host/src/legacy.rs:125-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/orx-host/src/legacy.rs:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/client.rs:1721 — src/client.rs:1721-1727 | src/client.rs:2032-2038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/client.rs:1721` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/commands/up.rs:3652 — src/commands/up.rs:3652-3658 | src/commands/up.rs:10476-10482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/commands/up.rs:10313 — src/commands/up.rs:10313-10319 | src/commands/up.rs:10476-10482 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/jobs/kubernetes.rs:135 — src/jobs/kubernetes.rs:135-141 | src/jobs/vercel.rs:892-898 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/kubernetes.rs:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/jobs/managed_env.rs:269 — src/jobs/managed_env.rs:269-275 | src/telemetry.rs:494-500 — 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) src/local/chat/mod.rs:6942 — src/local/chat/mod.rs:6942-6948 | src/local/chat/mod.rs:9779-9785 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/chat/mod.rs:6942` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/local/chat/mod.rs:9786` calls `Some`, `clone` and `src/local/chat/mod.rs:6949` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) src/local/harness/acp/auth.rs:122 — src/local/harness/acp/auth.rs:122-128 | src/local/harness/acp/auth.rs:147-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/jobs/localbox/windows.rs:25 — src/jobs/localbox/windows.rs:25-31 | src/local/codex.rs:1231-1237 — before extracting anything, compare `src/jobs/localbox/windows.rs` and `src/local/codex.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/local/codex.rs:1229` calls `pub` and `src/jobs/localbox/windows.rs:23` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) src/local/git.rs:2379 — src/local/git.rs:2379-2385 | src/local/git.rs:2390-2396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/local/harness/acp/auth.rs:133 — src/local/harness/acp/auth.rs:133-139 | src/local/harness/acp/auth.rs:160-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/acp/auth.rs:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) src/local/harness/claude.rs:431 — src/local/harness/claude.rs:431-437 | src/local/harness/codex.rs:382-388 — before extracting anything, compare `src/local/harness/claude.rs` and `src/local/harness/codex.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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) demo/nanochat/experiment/scripts/chat_sft.py:313 — demo/nanochat/base/scripts/chat_sft.py:308-314 | demo/nanochat/experiment/scripts/chat_sft.py:313-319 — before extracting anything, compare `demo/nanochat/base/scripts/chat_sft.py` and `demo/nanochat/experiment/scripts/chat_sft.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×12
  • Edited copy of a member (7 corresponding lines) src/local/agent_profiles.rs:235 — src/local/agent_profiles.rs:235-245 | src/local/local_models.rs:373-379 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/local/latex.rs:176 — src/local/latex.rs:176-182 | src/local/starter.rs:749-755 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/local/harness/acp/auth/config_auth.rs:52 — src/local/harness/acp/auth/config_auth.rs:52-58 | src/local/harness/acp/auth/config_auth.rs:59-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:534 — REDACTED:534-540 | REDACTED:6380-6386 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/engine/adapters/modal.rs:42 — src/engine/adapters/modal.rs:42-48 | src/engine/adapters/vercel.rs:55-63 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:2718 — REDACTED:2718-2724 | REDACTED:3478-3484 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/local/agent_profiles.rs:144 — src/local/agent_profiles.rs:144-154 | src/local/local_models.rs:170-176 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/commands/delete.rs:183 — src/commands/delete.rs:183-189 | src/config.rs:489-495 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:173 — REDACTED:173-179 | src/local/starter.rs:402-408 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/local/files.rs:395 — src/local/files.rs:395-401 | src/local/native_chats.rs:453-459 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/local/opencode_db.rs:422 — src/local/opencode_db.rs:422-430 | src/local/storage.rs:181-187 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) REDACTED:4568 — REDACTED:4568-4574 | src/store/costs.rs:163-171 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×12
  • Duplicated block (8 lines × 2) src/local/chat/mod.rs:5580 — src/local/chat/mod.rs:5580-5587 | src/local/chat/mod.rs:6292-6299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/local/claude.rs:1096 — src/local/claude.rs:1096-1103 | src/local/claude.rs:1316-1323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/local/harness/codex.rs:3558 — src/local/harness/codex.rs:3558-3565 | src/local/harness/codex.rs:4709-4716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/local/harness/codex.rs:4858 — src/local/harness/codex.rs:4858-4865 | src/local/harness/cursor.rs:768-775 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/local/harness/cursor.rs:776` calls `send_prompt` and `src/local/harness/codex.rs:4866` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) src/local/latex_templates.rs:54 — src/local/latex_templates.rs:54-61 | src/local/mod.rs:84-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/local/latex_templates.rs:226 — src/local/latex_templates.rs:226-233 | src/local/user_skills.rs:440-447 — before extracting anything, compare `src/local/latex_templates.rs` and `src/local/user_skills.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 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) REDACTED:635 — REDACTED:635-642 | REDACTED:685-692 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:635` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) REDACTED:703 — REDACTED:703-713 | REDACTED:6184-6191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:703` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/local/harness/codex.rs:4355 — src/local/harness/codex.rs:4355-4362 | src/local/harness/codex.rs:4407-4414 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/codex.rs:4355` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/local/claude.rs:507 — src/local/claude.rs:507-514 | src/local/codex.rs:399-406 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) src/commands/up.rs:4008 — src/commands/up.rs:4008-4015 | src/commands/up.rs:4321-4328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:4008` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) src/local/harness/claude.rs:2867 — src/local/harness/claude.rs:2867-2874 | src/local/harness/codex.rs:3443-3450 — before extracting anything, compare `src/local/harness/claude.rs` and `src/local/harness/codex.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/claude.rs:2867` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
IC1 · Incompleteness & stubs · Empty method body · ×12
  • Empty method body — does nothing with its inputs crates/orx-host/src/wrapper.rs:537 — `wake` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/alphaxiv.rs:450 — `revoke` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/commands/app.rs:1747 — `open_in_page` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/acp/host.rs:479 — `set_up_port` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/chat/mod.rs:4273 — `emit` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/chat/mod.rs:8674 — `mark_delivery` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/chat/mod.rs:10028 — `set_up_auth_token` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/codex.rs:867 — `set_up_port` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/opencode.rs:725 — `set_up_port` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/local/overleaf_live.rs:1852 — `set_event_sink` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/telemetry.rs:676 — `set_flag` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
  • Empty method body — does nothing with its inputs src/updates/macos_app.rs:559 — `detach` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×12
  • Recursive walk over a caller-supplied document has no depth cap ui/src/acp.ts:36 — `nativeOptions` is exported, takes a document from its caller (line 42) and hands it to `choices`, which calls itself at line 36 (`choices`) with a piece of `values` — and nowhere in `choices` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `choices` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap ui/src/components/experimentLineageModel.ts:125 — `subtreeOf` is exported and takes `node: HistoryNode` from its caller, and it calls itself at line 125 (`subtreeOf`) with a piece of `node` — and nowhere in `subtreeOf` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `subtreeOf` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/claude.rs:543 — `acquire_turn` is public, takes a document from its caller (line 1310) and hands it to `stop_reason`, which calls itself at line 543 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `stop_reason` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/harness/acp.rs:238 — `advertised_models` is public, takes a document from its caller (line 234) and hands it to `choices`, which calls itself at line 238 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `choices` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/chat/mod.rs:647 — `find_part_mut` is public and takes `parts: &'a mut[WirePart]` from its caller, and it calls itself at line 647 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `find_part_mut` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/chat/mod.rs:4617 — `resume_persisted_queues` is public and takes a `ChatHost` as its receiver from its caller, and it recurses at line 4617 through `drain_queue` and back with a piece of the document (and at line 5058, line 5069, line 5172) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `resume_persisted_queues` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/chat/mod.rs:3958 — `set_up_port` is public and takes a `ChatHost` as its receiver from its caller, and it calls itself at line 3958 with a piece of the document (and at line 3959, line 3960) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `set_up_port` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/chat/mod.rs:4270 — `subscribe` is public and takes a `ChatHost` as its receiver from its caller, and it calls itself at line 4270 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `subscribe` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/local/chat/mod.rs:7023 — `interrupt` is public and takes a `ChatHost` as its receiver from its caller, and it recurses at line 7023 through `stop_delegates`, `stop_delegates_of_stopped`, `stop_turn` and back with a piece of the document (and at line 7099, line 7150, line 7167, line 7191) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `interrupt` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/engine/runtime.rs:1132 — `cancel` is public and takes a `Runtime` as its receiver from its caller, and it calls itself at line 1132 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `cancel` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/engine/runtime.rs:1152 — `cleanup` is public and takes a `Runtime` as its receiver from its caller, and it calls itself at line 1152 with a piece of the document (and at line 1162) — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `cleanup` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/engine/adapters/ssh.rs:117 — `request` is public and takes a `Ssh` as its receiver from its caller, and it calls itself at line 117 with a piece of the document — and nowhere in the walk is a depth or nesting counter compared with a bound. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. When a Rust thread runs out of stack it is not unwound: the runtime reports the overflow and aborts the process, so `catch_unwind` does not stop it and every other request the process serves dies with it (spawned threads, a Tokio worker included, get 2 MiB by default). serde_json and serde_yaml stop parsing at 128 levels only on their default path; a value from `disable_recursion_limit`, from another format or parser, or built in code carries whatever nesting it was given. Thread a depth argument through `request` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC6 · Visual & motion safety · Focus outline removed inline · ×11
  • Focus outline removed inline ui/src/components/ArtifactsTab.tsx:723 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ChatPanel.tsx:3722 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ChatPanel.tsx:4951 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ChatSearch.tsx:156 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/CodeEditor.tsx:151 — <textarea> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ComposerEditor.tsx:641 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/CsvTable.tsx:177 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ImageCarousel.tsx:24 — <div> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ModelPicker.tsx:670 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ModelPicker.tsx:1189 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline ui/src/components/ui/Input.tsx:17 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D2 · Cognitive Complexity · ChatHost · ×11
  • ChatHost::send_message_showing (cognitive 140) src/local/chat/mod.rs:5988 — ChatHost::send_message_showing has cognitive complexity 140 (threshold 15). Drivers by points: if/else 64 (108 pts), boolean chains 21, match/switch 6 (9 pts), loops 1 (2 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ChatHost::recover_turn (cognitive 55) src/local/chat/mod.rs:5392 — ChatHost::recover_turn has cognitive complexity 55 (threshold 15). Drivers by points: if/else 24 (36 pts), boolean chains 10, match/switch 5 (9 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ChatHost::drain_queue (cognitive 53) src/local/chat/mod.rs:4933 — ChatHost::drain_queue has cognitive complexity 53 (threshold 15). Drivers by points: if/else 23 (46 pts), boolean chains 6, match/switch 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ChatHost::stop_turn (cognitive 42) src/local/chat/mod.rs:7026 — ChatHost::stop_turn has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (40 pts), boolean chains 1, match/switch 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.
  • ChatHost::launch_turn_ctx_locked (cognitive 29) src/local/chat/mod.rs:6692 — ChatHost::launch_turn_ctx_locked has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 3 (4 pts), loops 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.
  • ChatHost::request_permission (cognitive 26) src/local/chat/mod.rs:4002 — ChatHost::request_permission has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 4 (10 pts), loops 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ChatHost::respond (cognitive 25) src/local/chat/mod.rs:7254 — ChatHost::respond has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ChatHost::steer_message (cognitive 22) src/local/chat/mod.rs:5189 — ChatHost::steer_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2 (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.
  • ChatHost::set_agent (cognitive 17) src/local/chat/mod.rs:2005 — ChatHost::set_agent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (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.
  • ChatHost::run_shell_command (cognitive 16) src/local/chat/mod.rs:2405 — ChatHost::run_shell_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), 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.
  • ChatHost::fork_turn (cognitive 16) src/local/chat/mod.rs:5736 — ChatHost::fork_turn has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 4, boolean chains 3 (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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×11
  • Duplicated block (5 lines × 2) src/commands/up.rs:4256 — src/commands/up.rs:4256-4260 | src/commands/up.rs:4296-4300 — 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) src/commands/up.rs:5023 — src/commands/up.rs:5023-5030 | src/commands/up.rs:5190-5194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:5023` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/commands/up.rs:5020` calls `starts_with`, `Err`, `bad_request` and `src/commands/up.rs:5189` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) src/local/agent_profiles.rs:500 — src/local/agent_profiles.rs:500-504 | src/local/harness/antigravity.rs:764-768 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/agent_profiles.rs:500` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) src/local/browser_cookies.rs:357 — src/local/browser_cookies.rs:357-361 | REDACTED:6189-6193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/browser_cookies.rs:357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/local/harness/codex.rs:1627 — src/local/harness/codex.rs:1627-1631 | src/local/harness/codex.rs:3570-3574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/codex.rs:1627` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `ctx` to `&CompactCtx` in one and `&mut TurnCtx` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) src/local/harness/codex.rs:4365 — src/local/harness/codex.rs:4365-4369 | src/local/harness/codex.rs:4417-4421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/codex.rs:4365` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/local/harness/codex.rs:4372` calls `now_ms`, `as_millis` and `src/local/harness/codex.rs:4424` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) REDACTED:2076 — REDACTED:2076-2080 | REDACTED:2084-2088 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:2076` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) src/commands/up.rs:4397 — src/commands/up.rs:4397-4401 | src/commands/up.rs:4914-4918 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:4397` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) src/commands/up.rs:3749 — src/commands/up.rs:3749-3753 | src/commands/up.rs:4989-4993 — 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) REDACTED:2796 — REDACTED:2796-2800 | REDACTED:552-556 — 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) REDACTED:5538 — REDACTED:5538-5542 | REDACTED:759-763 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:5538` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×10
  • Duplicated block (11 lines × 2 locations) ui/src/api.ts:2369 — ui/src/api.ts:2369 · ui/src/api.ts:2384 — 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) ui/src/api.ts:2449 — ui/src/api.ts:2449 · ui/src/api.ts:2499 — 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) ui/src/components/ArtifactsTab.tsx:320 — ui/src/components/ArtifactsTab.tsx:320 · ui/src/components/ArtifactsTab.tsx:404 — 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) ui/src/components/ChatPanel.tsx:3543 — ui/src/components/ChatPanel.tsx:3543 · ui/src/components/ChatPanel.tsx:3555 — all 2 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 (11 lines × 2 locations) ui/src/components/ChatPanel.tsx:6402 — ui/src/components/ChatPanel.tsx:6402 · ui/src/components/ChatPanel.tsx:7079 — 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 locations) ui/src/components/ComposerEditor.tsx:136 — ui/src/components/ComposerEditor.tsx:136 · ui/src/components/MentionMenu.tsx:29 — 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 (11 lines × 2 locations) ui/src/components/PdfPreview.tsx:186 — ui/src/components/PdfPreview.tsx:186 · ui/src/components/PdfPreview.tsx:207 — 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 locations) ui/src/components/RemoteStopDialog.tsx:28 — ui/src/components/RemoteStopDialog.tsx:28 · ui/src/components/RemoteStopDialog.tsx:41 — 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) ui/src/components/SettingsPage.tsx:2144 — ui/src/components/SettingsPage.tsx:2144 · ui/src/components/SettingsPage.tsx:2426 — 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) ui/src/components/SkillsTab.tsx:153 — ui/src/components/SkillsTab.tsx:153 · ui/src/components/SshConfigDialog.tsx:62 — 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×9
  • Repeated repair: src/local/opencode_runtime.rs src/local/opencode_runtime.rs:341 — src/local/opencode_runtime.rs changed 14 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is openresearch_cli::local::opencode_runtime::start_server at line 341), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: group model tiers and fix provider sign-in (#1030)”; “fix: terminate opencode process groups and stop active turns on shutdown (#1015)”; “fix: set up OpenCode 2 without GitHub's rate limit (#1023)”; “fix: keep tests out of the user's home (#977)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/opencode_runtime.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/jobs/vercel.rs src/jobs/vercel.rs:859 — src/jobs/vercel.rs changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is openresearch_cli::jobs::vercel::plan_limit_hint at line 859), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop cancels and launches from getting stuck (#1002)”; “fix: keep waiting Kubernetes runs queued (#960)”; “fix: make Modal and HF readiness match launches (#959)”; “fix: CI flakes and a Windows agent-stop hang (#990)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/jobs/vercel.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/local/acp/delegated.rs src/local/acp/delegated.rs:191 — src/local/acp/delegated.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is Delegated::create at line 191), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: clean up Antigravity chats over ACP (#998)”; “fix: CLI failures in sandboxes and closed pipes (#962)”; “fix: CI flakes and a Windows agent-stop hang (#990)”; “fix: spawn every binary the way a terminal would (#894)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/local/acp/delegated.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/browser.rs src/browser.rs:16 — src/browser.rs changed 5 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 5 (its worst body is openresearch_cli::browser::open_dashboard at line 16), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: spawn every binary the way a terminal would (#894)”; “fix(desktop): open Linux remote workspaces with connection progress (#870)”; “Fix OpenCode 2.0.6+ health probe and WSL browser launch (#409)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/browser.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/engine/adapters/hf.rs src/engine/adapters/hf.rs:61 — src/engine/adapters/hf.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is HfAccount::recover at line 61), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop cancels and launches from getting stuck (#1002)”; “fix: resume HF and Modal logs exactly (#958)”; “fix: make Modal and HF readiness match launches (#959)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/engine/adapters/hf.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/engine/adapters/modal.rs src/engine/adapters/modal.rs:42 — src/engine/adapters/modal.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is ModalAccount::inspect at line 42), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop cancels and launches from getting stuck (#1002)”; “fix: resume HF and Modal logs exactly (#958)”; “fix: make Modal and HF readiness match launches (#959)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/engine/adapters/modal.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/jobs/managed_env.rs src/jobs/managed_env.rs:97 — src/jobs/managed_env.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ManagedEnv::ensure_in at line 97), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: make Modal and HF readiness match launches (#959)”; “fix: CI flakes and a Windows agent-stop hang (#990)”; “fix: spawn every binary the way a terminal would (#894)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/jobs/managed_env.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/folder_picker.rs src/folder_picker.rs:99 — src/folder_picker.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is openresearch_cli::folder_picker::pick_folder at line 99), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: spawn every binary the way a terminal would (#894)”; “fix: use the standard folder picker on windows (#814)”; “fix: bring Windows project folder picker to foreground (#401)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/folder_picker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: src/engine/adapters/vercel.rs src/engine/adapters/vercel.rs:9 — src/engine/adapters/vercel.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 5 (its worst body is openresearch_cli::engine::adapters::vercel::ids at line 9), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: stop cancels and launches from getting stuck (#1002)”; “fix: resume HF and Modal logs exactly (#958)”; “fix: make Modal and HF readiness match launches (#959)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 19:27:21 -08:00' --until='2026-11-16 19:27:21 -08:00' --full-history --no-merges -- src/engine/adapters/vercel.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.
D2 · Cognitive Complexity · orx_host · ×9
  • orx_host::wrapper::state (cognitive 75) crates/orx-host/src/wrapper.rs:716 — orx_host::wrapper::state has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (48 pts), match/switch 5 (17 pts), loops 1 (7 pts), boolean chains 3 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • orx_host::wrapper::wrap (cognitive 72) crates/orx-host/src/wrapper.rs:15 — orx_host::wrapper::wrap has cognitive complexity 72 (threshold 15). Drivers by points: if/else 20 (37 pts), match/switch 8 (17 pts), boolean chains 13, loops 3 (5 pts) (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.
  • orx_host::exec::run (cognitive 39) crates/orx-host/src/exec.rs:9 — orx_host::exec::run has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 1 (4 pts), boolean chains 3, loops 3 (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.
  • orx_host::wrapper::stop (cognitive 37) crates/orx-host/src/wrapper.rs:435 — orx_host::wrapper::stop has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 4, match/switch 1 (4 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.
  • orx_host::wrapper::cleanup (cognitive 30) crates/orx-host/src/wrapper.rs:588 — orx_host::wrapper::cleanup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 1 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • orx_host::legacy::cancel_container (cognitive 25) crates/orx-host/src/legacy.rs:150 — orx_host::legacy::cancel_container has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 8 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • orx_host::wrapper::cancel (cognitive 20) crates/orx-host/src/wrapper.rs:809 — orx_host::wrapper::cancel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, loops 1 (3 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.
  • orx_host::server::serve (cognitive 18) crates/orx-host/src/server.rs:1477 — orx_host::server::serve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • orx_host::platform::signal (cognitive 17) crates/orx-host/src/platform.rs:292 — orx_host::platform::signal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 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.
D29 · Static Analysis (SAST) · REDACTED · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×8
  • Duplicated block (10 lines × 2) src/commands/up.rs:4000 — src/commands/up.rs:4000-4009 | src/commands/up.rs:4027-4036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) src/commands/up.rs:5112 — src/commands/up.rs:5112-5121 | src/commands/up.rs:5136-5145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) src/commands/up.rs:7653 — src/commands/up.rs:7653-7662 | src/commands/up.rs:7982-7991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/local/chat/mod.rs:5688 — src/local/chat/mod.rs:5688-5697 | src/local/chat/mod.rs:9660-9669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/chat/mod.rs:5688` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/local/claude.rs:1377 — src/local/claude.rs:1377-1386 | src/local/claude.rs:1389-1398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) src/updates.rs:1845 — src/updates.rs:1845-1854 | src/updates.rs:1861-1870 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/local/chat/mod.rs:601 — src/local/chat/mod.rs:601-610 | src/local/harness/codex.rs:2598-2607 — 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) src/local/chat/mod.rs:2516 — src/local/chat/mod.rs:2516-2525 | src/local/chat/mod.rs:4168-4177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/chat/mod.rs:2516` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · Engine · ×7
  • Engine::commit (cognitive 69) src/engine/reconcile.rs:433 — Engine::commit has cognitive complexity 69 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 25, match/switch 4, 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.
  • Engine::scan_legacy (cognitive 37) src/engine/legacy.rs:56 — Engine::scan_legacy has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 6, loops 6 (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.
  • Engine::recover_gated (cognitive 36) src/engine/submit.rs:158 — Engine::recover_gated has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 3 (8 pts), boolean chains 2, loops 1 (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.
  • Engine::deliver_notify (cognitive 30) src/engine/notify.rs:36 — Engine::deliver_notify has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 7, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Engine::observe (cognitive 27) src/engine/reconcile.rs:248 — Engine::observe has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Engine::reread_watch (cognitive 26) src/engine/legacy.rs:192 — Engine::reread_watch has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Engine::retire_ssh_config (cognitive 16) src/engine/ssh_config_cleanup.rs:11 — Engine::retire_ssh_config has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), match/switch 2 (6 pts), loops 2 (3 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.
D35 · Change Coupling · Change coupling · ×7
  • Change coupling: mod.rs ↔ api.ts src/local/mod.rs:1 — `src/local/mod.rs` and `ui/src/api.ts` change together 59% of the time (17 of the 29 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 17 shared commits counted here, the most recent 3 are `5538a61f` OR-423 Install Git and OpenCode reliably on Windows (#540); `14836988` OR-327 Add Agentic/Copilot autonomy control to the model picker (#488); `9291fb95` Let /resume adopt chats from the agents' own CLIs (#413) — run `git show` on any of them.
  • Change coupling: experiments.rs ↔ App.tsx src/local/experiments.rs:1 — `src/local/experiments.rs` and `ui/src/App.tsx` 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) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `fe36f742` Add permanent experiment delete (OR-564) (#759); `169aad22` Add directional experiment archiving in CLI and dashboard (#451); `cec874e4` Simplify project files as artifacts (#145) — run `git show` on any of them.
  • Change coupling: App.tsx ↔ events.ts ui/src/App.tsx:1 — `ui/src/App.tsx` and `ui/src/events.ts` change together 53% of the time (9 of the 17 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 `abf810fb` fix: quiet redundant remote chat updates (#1013); `aa65fe4a` Run agent setup commands from the composer's sign-in warning (#639); `95b2d961` OR-231: Safe live file refresh (#286) — run `git show` on any of them.
  • Change coupling: detect.rs ↔ ModelPicker.tsx src/local/harness/detect.rs:1 — `src/local/harness/detect.rs` and `ui/src/components/ModelPicker.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `47e4e6c0` chore: parse model names once, on the server (#987); `0242a201` feat: streamline harness setup and account display (#820); `acda4073` Use CLI model catalogs without static fallbacks (#395) — run `git show` on any of them.
  • Change coupling: ExperimentsTable.tsx ↔ TreeView.tsx ui/src/components/ExperimentsTable.tsx:1 — `ui/src/components/ExperimentsTable.tsx` and `ui/src/components/TreeView.tsx` 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 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 5 shared commits counted here, the most recent 3 are `fe36f742` Add permanent experiment delete (OR-564) (#759); `169aad22` Add directional experiment archiving in CLI and dashboard (#451); `08fa61f1` Implement VS Code-style preview tabs (#234) — run `git show` on any of them.
  • Change coupling: hf.rs ↔ opencode.rs src/local/hf.rs:1 — `src/local/hf.rs` and `src/local/opencode.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 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 5 shared commits counted here, the most recent 3 are `35c68706` OR-304: Compute CLI, custom instructions, and Slurm recovery (#429); `13049867` Fix trusted run supervision and post-cancel Codex turns (#243); `43852e42` Route run-completion notifications to the launching chat session (v0.… — run `git show` on any of them.
  • Change coupling: client.rs ↔ create_experiment.rs src/client.rs:1 — `src/client.rs` and `src/commands/create_experiment.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 `78447189` skills (#55); `9cd79abf` Retire eager baseline: projects start with an empty experiment tree (…; `3dcf5de4` cargo build — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×7
  • Edited copy of a member (18 corresponding lines) src/local/demo.rs:1574 — src/local/demo.rs:1574-1591 | src/local/demo.rs:1593-1618 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/local/harness/acp.rs:627 — src/local/harness/acp.rs:627-644 | src/local/harness/antigravity.rs:646-664 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/engine/adapters/local.rs:606 — src/engine/adapters/local.rs:606-623 | src/engine/adapters/ssh.rs:776-795 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/jobs/huggingface.rs:200 — src/jobs/huggingface.rs:200-219 | src/jobs/ray.rs:216-233 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/local/harness/managed.rs:767 — src/local/harness/managed.rs:767-785 | src/local/portable_git.rs:83-100 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/local/git.rs:320 — src/local/git.rs:320-338 | src/local/git.rs:2015-2032 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) src/store/acp.rs:42 — src/store/acp.rs:42-59 | REDACTED:958-975 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×7
  • Edited copy of a member (11 corresponding lines) src/engine/adapters/modal.rs:21 — src/engine/adapters/modal.rs:21-31 | src/engine/adapters/vercel.rs:36-46 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/commands/up/model_feed.rs:209 — src/commands/up/model_feed.rs:209-220 | src/updates.rs:388-398 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/commands/up.rs:8713 — src/commands/up.rs:8713-8723 | src/commands/up.rs:8759-8771 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/updates/linux_app.rs:297 — src/updates/linux_app.rs:297-308 | src/updates/macos_app.rs:217-227 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) REDACTED:2681 — REDACTED:2681-2691 | REDACTED:3429-3450 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/local/harness/claude.rs:1965 — src/local/harness/claude.rs:1965-1975 | src/local/harness/codex.rs:4613-4623 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/engine/mod.rs:44 — src/engine/mod.rs:44-55 | REDACTED:496-506 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×7
  • Edited copy of a member (12 corresponding lines) src/local/latex_templates.rs:293 — src/local/latex_templates.rs:293-304 | src/local/user_skills.rs:678-689 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/alphaxiv.rs:413 — src/alphaxiv.rs:413-424 | src/jobs/managed_env.rs:267-284 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/local/opencode.rs:1010 — src/local/opencode.rs:1010-1021 | src/local/opencode.rs:1024-1037 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/local/claude.rs:506 — src/local/claude.rs:506-517 | src/local/codex.rs:398-409 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/telemetry.rs:1303 — src/telemetry.rs:1303-1314 | src/telemetry.rs:1323-1334 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/local/git.rs:57 — src/local/git.rs:57-68 | src/local/harness/mod.rs:692-705 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/commands/paper.rs:101 — src/commands/paper.rs:101-112 | src/commands/paper.rs:114-127 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×7
  • Edited copy of a member (10 corresponding lines) src/local/chat/mod.rs:8330 — src/local/chat/mod.rs:8330-8339 | src/local/chat/mod.rs:8346-8355 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) REDACTED:3310 — REDACTED:3310-3319 | REDACTED:5728-5740 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/commands/up.rs:6498 — src/commands/up.rs:6498-6508 | src/commands/up.rs:6734-6743 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/local/latex.rs:322 — src/local/latex.rs:322-331 | src/local/overleaf.rs:518-527 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/local/latex_templates.rs:310 — src/local/latex_templates.rs:310-322 | src/local/user_skills.rs:938-947 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/local/opencode.rs:736 — src/local/opencode.rs:736-745 | src/local/opencode.rs:747-758 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/engine/mod.rs:57 — src/engine/mod.rs:57-67 | REDACTED:482-491 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D1 · Cyclomatic Complexity · ChatHost · ×6
  • ChatHost::send_message_showing (cyclomatic 88) src/local/chat/mod.rs:5988 — ChatHost::send_message_showing has cyclomatic complexity 88 (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.
  • ChatHost::recover_turn (cyclomatic 40) src/local/chat/mod.rs:5392 — ChatHost::recover_turn has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ChatHost::drain_queue (cyclomatic 30) src/local/chat/mod.rs:4933 — ChatHost::drain_queue has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ChatHost::stop_turn (cyclomatic 27) src/local/chat/mod.rs:7026 — ChatHost::stop_turn 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.
  • ChatHost::launch_turn_ctx_locked (cyclomatic 19) src/local/chat/mod.rs:6692 — ChatHost::launch_turn_ctx_locked 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.
  • ChatHost::respond (cyclomatic 18) src/local/chat/mod.rs:7254 — ChatHost::respond has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Engine · ×6
  • Engine::commit (cyclomatic 55) src/engine/reconcile.rs:433 — Engine::commit has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Engine::deliver_notify (cyclomatic 28) src/engine/notify.rs:36 — Engine::deliver_notify has cyclomatic complexity 28 (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.
  • Engine::scan_legacy (cyclomatic 26) src/engine/legacy.rs:56 — Engine::scan_legacy has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Engine::observe (cyclomatic 23) src/engine/reconcile.rs:248 — Engine::observe 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.
  • Engine::recover_gated (cyclomatic 20) src/engine/submit.rs:158 — Engine::recover_gated 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.
  • Engine::reread_watch (cyclomatic 18) src/engine/legacy.rs:192 — Engine::reread_watch has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · ChatPanel.ChatPanel · ×6
  • ChatPanel.ChatPanel::send (cognitive 146) ui/src/components/ChatPanel.tsx:6975 — ChatPanel.ChatPanel::send has cognitive complexity 146 (threshold 15). Drivers by points: if/else 46 (74 pts), ternaries 19 (33 pts), boolean chains 32, error handling 4 (7 pts) (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::runShell (cognitive 23) ui/src/components/ChatPanel.tsx:7382 — ChatPanel.ChatPanel::runShell has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (5 pts), error handling 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::selectModel (cognitive 22) ui/src/components/ChatPanel.tsx:6227 — ChatPanel.ChatPanel::selectModel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10 (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. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::runComposerCommand, ChatPanel.ChatPanel::setGoal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::runComposerCommand (cognitive 19) ui/src/components/ChatPanel.tsx:6417 — ChatPanel.ChatPanel::runComposerCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::setGoal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::setGoal (cognitive 19) ui/src/components/ChatPanel.tsx:6504 — ChatPanel.ChatPanel::setGoal has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 4 (6 pts), error handling 2 (3 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. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::send::restoreComposer (cognitive 16) ui/src/components/ChatPanel.tsx:7055 — ChatPanel.ChatPanel::send::restoreComposer has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), ternaries 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. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Runtime · ×6
  • Runtime::collect_log (cognitive 39) src/engine/runtime.rs:871 — Runtime::collect_log has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (9 pts), match/switch 3 (9 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Runtime::tick (cognitive 34) src/engine/runtime.rs:432 — Runtime::tick has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 5 (10 pts), loops 4, boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Runtime::observe (cognitive 24) src/engine/runtime.rs:595 — Runtime::observe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts), match/switch 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Runtime::compute (cognitive 24) src/engine/runtime.rs:1165 — Runtime::compute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Runtime::quote (cognitive 22) src/engine/runtime.rs:648 — Runtime::quote has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 4 (14 pts), if/else 2 (5 pts), loops 2 (3 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.
  • Runtime::collect_pending (cognitive 17) src/engine/runtime.rs:738 — Runtime::collect_pending has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×6
  • Edited copy of a member (20 corresponding lines) src/commands/up.rs:4384 — src/commands/up.rs:4384-4403 | src/commands/up.rs:4893-4923 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/jobs/modal.rs:491 — src/jobs/modal.rs:491-510 | src/jobs/vercel.rs:1048-1067 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/local/harness/managed.rs:594 — src/local/harness/managed.rs:594-613 | src/local/portable_git.rs:105-134 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/commands/up.rs:2265 — src/commands/up.rs:2265-2289 | src/commands/up.rs:2294-2313 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/commands/remote_host.rs:1069 — src/commands/remote_host.rs:1069-1090 | src/local/storage.rs:45-64 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/jobs/localbox.rs:83 — src/jobs/localbox.rs:83-102 | src/updates/windows.rs:76-100 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×6
  • Edited copy of a member (8 corresponding lines) src/commands/up.rs:1647 — src/commands/up.rs:1647-1656 | src/commands/up.rs:1715-1722 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/commands/compute.rs:631 — src/commands/compute.rs:631-638 | src/local/git.rs:574-581 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/commands/up.rs:3271 — src/commands/up.rs:3271-3281 | src/commands/up.rs:3283-3290 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) REDACTED:3667 — REDACTED:3667-3674 | REDACTED:3692-3699 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/local/agent_profiles.rs:290 — src/local/agent_profiles.rs:290-297 | src/local/local_models.rs:579-586 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/engine/adapters/modal.rs:49 — src/engine/adapters/modal.rs:49-56 | src/engine/adapters/vercel.rs:65-72 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×6
  • Edited copy of a member (9 corresponding lines) src/commands/up.rs:1671 — src/commands/up.rs:1671-1680 | src/commands/up.rs:1687-1695 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/local/harness/acp.rs:157 — src/local/harness/acp.rs:157-165 | src/local/harness/antigravity.rs:154-162 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/commands/up.rs:9605 — src/commands/up.rs:9605-9613 | src/commands/up.rs:10186-10202 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/local/git.rs:270 — src/local/git.rs:270-279 | src/local/git.rs:305-313 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/commands/discover.rs:84 — src/commands/discover.rs:84-93 | src/commands/paper.rs:39-47 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) src/jobs/managed_env.rs:200 — src/jobs/managed_env.rs:200-208 | src/local/harness/detect.rs:894-903 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×5
  • Modal dialog does not manage focus ui/src/RemoteRuntime.tsx:450 — This <div role="alertdialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus ui/src/components/ChatPanel.tsx:790 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus ui/src/components/OverleafPanel.tsx:88 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus ui/src/components/SkillChips.tsx:125 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus ui/src/components/WorkspaceTools.tsx:247 — This <div role="dialog"> is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×5
  • Animation without a prefers-reduced-motion guard ui/src/components/ChatPanel.tsx:5233 — <div> moves — its `animate-[or-pulse_1.2s_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard ui/src/components/ProjectInfoCard.tsx:64 — <span> moves — its `animate-[or-pulse_1.2s_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard ui/src/components/TreeView.tsx:281 — <span> moves — its `animate-[or-pulse_1.2s_ease-in-out_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard ui/src/components/ui/Spinner.tsx:6 — <span> moves — its `animate-[spin_0.8s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard ui/src/components/ui/StatusIndicator.tsx:23 — <span> moves — its `animate-[or-pulse_1.2s_ease-in-out_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
D1 · Cyclomatic Complexity · ChatPanel.ChatPanel · ×5
  • ChatPanel.ChatPanel::send (cyclomatic 120) ui/src/components/ChatPanel.tsx:6975 — ChatPanel.ChatPanel::send has cyclomatic complexity 120 (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 shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::selectModel (cyclomatic 24) ui/src/components/ChatPanel.tsx:6227 — ChatPanel.ChatPanel::selectModel has cyclomatic complexity 24 (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. This shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::runComposerCommand, ChatPanel.ChatPanel::send, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::runComposerCommand (cyclomatic 19) ui/src/components/ChatPanel.tsx:6417 — ChatPanel.ChatPanel::runComposerCommand 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. This shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::send, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::send::restoreComposer (cyclomatic 16) ui/src/components/ChatPanel.tsx:7055 — ChatPanel.ChatPanel::send::restoreComposer has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • ChatPanel.ChatPanel::runShell (cyclomatic 16) ui/src/components/ChatPanel.tsx:7382 — ChatPanel.ChatPanel::runShell has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel, ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · orx_host · ×5
  • orx_host::wrapper::wrap (cyclomatic 49) crates/orx-host/src/wrapper.rs:15 — orx_host::wrapper::wrap 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.
  • orx_host::wrapper::state (cyclomatic 28) crates/orx-host/src/wrapper.rs:716 — orx_host::wrapper::state 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.
  • orx_host::exec::run (cyclomatic 24) crates/orx-host/src/exec.rs:9 — orx_host::exec::run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • orx_host::legacy::cancel_container (cyclomatic 21) crates/orx-host/src/legacy.rs:150 — orx_host::legacy::cancel_container 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.
  • orx_host::wrapper::stop (cyclomatic 19) crates/orx-host/src/wrapper.rs:435 — orx_host::wrapper::stop 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.
D2 · Cognitive Complexity · Host · ×5
  • Host::slurm_queue (cognitive 101) crates/orx-host/src/server.rs:812 — Host::slurm_queue has cognitive complexity 101 (threshold 15). Drivers by points: if/else 16 (40 pts), match/switch 15 (36 pts), loops 11 (15 pts), boolean chains 10 (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Host::request (cognitive 86) crates/orx-host/src/server.rs:107 — Host::request has cognitive complexity 86 (threshold 15). Drivers by points: if/else 25 (55 pts), boolean chains 15, loops 4 (9 pts), match/switch 4 (7 pts) (nesting depth added 38). 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.
  • Host::launch (cognitive 34) crates/orx-host/src/server.rs:506 — Host::launch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 6, match/switch 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Host::summary (cognitive 25) crates/orx-host/src/server.rs:442 — Host::summary has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Host::reap_idle_at (cognitive 24) src/local/acp/host.rs:606 — Host::reap_idle_at has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 2, loops 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Connection · ×5
  • Connection::poll_local (cognitive 28) src/local/overleaf_live.rs:1314 — Connection::poll_local has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Connection::joined (cognitive 27) src/local/overleaf_live.rs:1133 — Connection::joined has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Connection::handle_update (cognitive 24) src/local/overleaf_live.rs:1220 — Connection::handle_update has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Connection::handle_event (cognitive 20) src/local/overleaf_live.rs:840 — Connection::handle_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (3 pts), loops 1 (2 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.
  • Connection::repath (cognitive 17) src/local/overleaf_live.rs:1025 — Connection::repath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 2, match/switch 1 (2 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.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×5
  • Edited copy of a member (13 corresponding lines) REDACTED:5534 — REDACTED:5534-5547 | REDACTED:755-767 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/jobs/huggingface.rs:494 — src/jobs/huggingface.rs:494-506 | src/jobs/huggingface.rs:509-526 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/commands/up.rs:590 — src/commands/up.rs:590-602 | src/commands/up.rs:604-627 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/local/claude.rs:1195 — src/local/claude.rs:1195-1207 | src/local/claude.rs:1209-1223 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) src/local/codex.rs:283 — src/local/codex.rs:283-295 | src/local/codex.rs:313-328 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D1 · Cyclomatic Complexity · Host · ×4
  • Host::request (cyclomatic 60) crates/orx-host/src/server.rs:107 — Host::request has cyclomatic complexity 60 (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.
  • Host::slurm_queue (cyclomatic 58) crates/orx-host/src/server.rs:812 — Host::slurm_queue has cyclomatic complexity 58 (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.
  • Host::launch (cyclomatic 33) crates/orx-host/src/server.rs:506 — Host::launch 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.
  • Host::summary (cyclomatic 16) crates/orx-host/src/server.rs:442 — Host::summary has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · Store · ×4
  • Store::cleanup_run_artifacts_locked (cognitive 45) REDACTED:2844 — Store::cleanup_run_artifacts_locked has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 6 (8 pts), match/switch 4 (8 pts), boolean chains 5 (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.
  • Store::search_chat_messages (cognitive 35) src/store/search.rs:188 — Store::search_chat_messages has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 3, loops 2 (3 pts), match/switch 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.
  • Store::replace_native_usage_aggregate (cognitive 24) REDACTED:432 — Store::replace_native_usage_aggregate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts), match/switch 1 (5 pts), boolean chains 2 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Store::finalize_turn_usage (cognitive 23) REDACTED:582 — Store::finalize_turn_usage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (6 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.
D3 · God Classes · TooManyMethods · ×4
  • TooManyMethods: Store REDACTED:940 — TooManyMethods — 274 methods, declared across 5 files: REDACTED (235), REDACTED (25), store/acp.rs (7), store/costs.rs (5), +1 more file(s). The bar is 30 methods; this is 244 over it, 9.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: ChatHost src/local/chat/mod.rs:2898 — TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TurnCtx src/local/chat/mod.rs:8357 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Engine src/engine/mod.rs:365 — TooManyMethods — 35 methods, declared across 6 files: engine/mod.rs (12), engine/submit.rs (10), engine/reconcile.rs (6), engine/legacy.rs (3), +2 more file(s). The bar is 30 methods; this is 5 over it, 1.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×4
  • Edited copy of a member (16 corresponding lines) src/local/model.rs:48 — src/local/model.rs:48-63 | src/local/model.rs:90-106 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/local/native_chats.rs:266 — src/local/native_chats.rs:266-281 | src/local/native_chats.rs:285-304 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/jobs/localbox/windows.rs:141 — src/jobs/localbox/windows.rs:141-156 | src/local/codex.rs:1358-1374 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/local/chat/mod.rs:8567 — src/local/chat/mod.rs:8567-8584 | src/local/chat/mod.rs:8608-8623 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) src/jobs/modal.rs:566 — src/jobs/modal.rs:566-571 | src/jobs/vercel.rs:1070-1075 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/jobs/localbox/python.rs:72 — src/jobs/localbox/python.rs:72-77 | src/local/shell_env.rs:262-274 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) src/local/chat/mod.rs:1047 — src/local/chat/mod.rs:1047-1052 | src/local/files.rs:61-66 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) REDACTED:1777 — REDACTED:1777-1783 | src/store/costs.rs:56-61 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) src/local/acp.rs:363 — src/local/acp.rs:363-373 | src/local/acp/host.rs:697-707 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/acp.rs:363` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) src/local/harness/claude.rs:2883 — src/local/harness/claude.rs:2883-2893 | src/local/harness/codex.rs:3464-3475 — before extracting anything, compare `src/local/harness/claude.rs` and `src/local/harness/codex.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/claude.rs:2883` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/client.rs:1420 — src/client.rs:1420-1430 | src/client.rs:1749-1759 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/client.rs:1420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/main.rs:1358 — src/main.rs:1358-1368 | windows/launcher/src/main.rs:62-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/main.rs:1358` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×4
  • Duplicated block (12 lines × 2 locations) ui/src/components/ChatPanel.tsx:1477 — ui/src/components/ChatPanel.tsx:1477 · ui/src/components/ChatPanel.tsx:1517 — 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) ui/src/components/NewProjectForm.tsx:500 — ui/src/components/NewProjectForm.tsx:500 · ui/src/components/NewProjectForm.tsx:555 — 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 (12 lines × 2 locations) ui/src/components/SkillsTab.tsx:270 — ui/src/components/SkillsTab.tsx:270 · ui/src/components/SkillsTab.tsx:313 — 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) ui/src/queries/chat.ts:383 — ui/src/queries/chat.ts:383 · ui/src/queries/chat.ts:397 — 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.
D1 · Cyclomatic Complexity · SettingsPage.AgentList · ×3
  • SettingsPage.AgentList::harnessRow (cyclomatic 75) ui/src/components/SettingsPage.tsx:610 — SettingsPage.AgentList::harnessRow has cyclomatic complexity 75 (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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::providerRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • SettingsPage.AgentList::providerRow (cyclomatic 23) ui/src/components/SettingsPage.tsx:747 — SettingsPage.AgentList::providerRow has cyclomatic complexity 23 (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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • SettingsPage.AgentList::foundRow (cyclomatic 20) ui/src/components/SettingsPage.tsx:812 — SettingsPage.AgentList::foundRow 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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::providerRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Connection · ×3
  • Connection::handle_event (cyclomatic 26) src/local/overleaf_live.rs:840 — Connection::handle_event has cyclomatic complexity 26 (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.
  • Connection::poll_local (cyclomatic 18) src/local/overleaf_live.rs:1314 — Connection::poll_local has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Connection::handle_update (cyclomatic 16) src/local/overleaf_live.rs:1220 — Connection::handle_update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · SettingsPage.AgentList · ×3
  • SettingsPage.AgentList::harnessRow (cognitive 61) ui/src/components/SettingsPage.tsx:610 — SettingsPage.AgentList::harnessRow has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 38, ternaries 12 (22 pts), if/else 1 (nesting depth added 10). 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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::providerRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • SettingsPage.AgentList::foundRow (cognitive 22) ui/src/components/SettingsPage.tsx:812 — SettingsPage.AgentList::foundRow has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (11 pts) (nesting depth added 4). 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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::providerRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • SettingsPage.AgentList::providerRow (cognitive 19) ui/src/components/SettingsPage.tsx:747 — SettingsPage.AgentList::providerRow has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (9 pts) (nesting depth added 4). 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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList, SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ApiClient · ×3
  • ApiClient::logs_to (cognitive 55) src/plane/local_plane.rs:918 — ApiClient::logs_to has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 4 (11 pts), boolean chains 8, loops 2 (3 pts) (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.
  • ApiClient::wait (cognitive 47) src/plane/local_plane.rs:749 — ApiClient::wait has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (38 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (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.
  • ApiClient::events (cognitive 25) src/plane/local_plane.rs:835 — ApiClient::events has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Codex · ×3
  • Codex::detect_at (cognitive 37) src/local/harness/codex.rs:1410 — Codex::detect_at has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 8, match/switch 1 (3 pts) (nesting depth added 8). 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.
  • Codex::compact (cognitive 29) src/local/harness/codex.rs:1592 — Codex::compact has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 6 (11 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Codex::resume_from_prompt (cognitive 17) src/local/harness/codex.rs:1810 — Codex::resume_from_prompt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×3
  • Edited copy of a member (30 corresponding lines) src/jobs/localbox/windows.rs:64 — src/jobs/localbox/windows.rs:64-93 | src/local/codex.rs:1287-1317 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) src/jobs/modal.rs:450 — src/jobs/modal.rs:450-479 | src/jobs/vercel.rs:994-1027 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) src/client.rs:1407 — src/client.rs:1407-1443 | src/client.rs:1843-1872 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) src/local/latex_templates.rs:217 — src/local/latex_templates.rs:217-235 | src/local/user_skills.rs:431-449 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/local/local_models.rs:710 — src/local/local_models.rs:710-728 | src/local/local_models.rs:825-843 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) src/commands/library.rs:5 — src/commands/library.rs:5-23 | src/commands/library.rs:25-43 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) src/engine/adapters/k8s.rs:218 — src/engine/adapters/k8s.rs:218-233 | src/engine/adapters/k8s.rs:250-265 — 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) src/jobs/modal.rs:495 — src/jobs/modal.rs:495-510 | src/jobs/vercel.rs:1052-1067 — before extracting anything, compare `src/jobs/modal.rs` and `src/jobs/vercel.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/modal.rs:495` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) REDACTED:1874 — REDACTED:1874-1889 | REDACTED:2603-2618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1874` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×3
  • Duplicated block (12 lines × 2) crates/orx-host/src/server.rs:692 — crates/orx-host/src/server.rs:692-703 | crates/orx-host/src/server.rs:761-772 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/commands/up.rs:4032 — src/commands/up.rs:4032-4043 | src/commands/up.rs:5141-5152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:4032` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/commands/up.rs:4044` calls `then`, `file_version`, `as_bytes` and `src/commands/up.rs:5153` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) src/commands/remote_host.rs:353 — src/commands/remote_host.rs:353-364 | src/commands/remote_host.rs:402-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/remote_host.rs:353` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R10 · Code Duplication · Duplicated block (13 lines × 2 locations) · ×3
  • Duplicated block (13 lines × 2 locations) ui/src/components/ChatPanel.tsx:2904 — ui/src/components/ChatPanel.tsx:2904 · ui/src/components/ChatPanel.tsx:2944 — 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 (13 lines × 2 locations) ui/src/components/ChatPanel.tsx:7207 — ui/src/components/ChatPanel.tsx:7207 · ui/src/components/ChatPanel.tsx:7324 — 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 locations) ui/src/components/MediaPreview.tsx:66 — ui/src/components/MediaPreview.tsx:66 · ui/src/components/MediaPreview.tsx:79 — 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.
D1 · Cyclomatic Complexity · Actor · ×2
  • Actor::run (cyclomatic 103) src/engine/transport/mod.rs:768 — Actor::run has cyclomatic complexity 103 (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.
  • Actor::login (cyclomatic 47) src/engine/transport/mod.rs:517 — Actor::login has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Store · ×2
  • Store::cleanup_run_artifacts_locked (cyclomatic 29) REDACTED:2844 — Store::cleanup_run_artifacts_locked has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Store::search_chat_messages (cyclomatic 20) src/store/search.rs:188 — Store::search_chat_messages has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApiClient · ×2
  • ApiClient::logs_to (cyclomatic 28) src/plane/local_plane.rs:918 — ApiClient::logs_to 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.
  • ApiClient::wait (cyclomatic 19) src/plane/local_plane.rs:749 — ApiClient::wait has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Codex · ×2
  • Codex::detect_at (cyclomatic 25) src/local/harness/codex.rs:1410 — Codex::detect_at has cyclomatic complexity 25 (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.
  • Codex::compact (cyclomatic 23) src/local/harness/codex.rs:1592 — Codex::compact 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.
D1 · Cyclomatic Complexity · Local · ×2
  • Local::start (cyclomatic 24) src/engine/adapters/local.rs:117 — Local::start 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.
  • Local::observe (cyclomatic 20) src/engine/adapters/local.rs:429 — Local::observe has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runtime · ×2
  • Runtime::collect_log (cyclomatic 22) src/engine/runtime.rs:871 — Runtime::collect_log has cyclomatic complexity 22 (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.
  • Runtime::tick (cyclomatic 21) src/engine/runtime.rs:432 — Runtime::tick 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.
D2 · Cognitive Complexity · Actor · ×2
  • Actor::run (cognitive 263) src/engine/transport/mod.rs:768 — Actor::run has cognitive complexity 263 (threshold 15). Drivers by points: if/else 50 (155 pts), loops 14 (48 pts), match/switch 9 (31 pts), boolean chains 29 (nesting depth added 161). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Actor::login (cognitive 71) src/engine/transport/mod.rs:517 — Actor::login has cognitive complexity 71 (threshold 15). Drivers by points: if/else 32 (52 pts), match/switch 7 (10 pts), boolean chains 9 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Broker · ×2
  • Broker::dispatch (cognitive 60) src/jobs/ssh/service/mod.rs:560 — Broker::dispatch has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (53 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • Broker::session (cognitive 22) src/jobs/ssh/service/mod.rs:501 — Broker::session has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ClaudeHost · ×2
  • ClaudeHost::acquire_turn (cognitive 44) src/local/claude.rs:1310 — ClaudeHost::acquire_turn has cognitive complexity 44 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 11, match/switch 3 (8 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ClaudeHost::reap_expired_at (cognitive 20) src/local/claude.rs:1050 — ClaudeHost::reap_expired_at has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 3, 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.
D2 · Cognitive Complexity · Local · ×2
  • Local::observe (cognitive 33) src/engine/adapters/local.rs:429 — Local::observe has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (8 pts), boolean chains 4, 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.
  • Local::start (cognitive 23) src/engine/adapters/local.rs:117 — Local::start has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 5 (6 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · DatabaseLease · ×2
  • DatabaseLease::acquire (cognitive 21) src/local/opencode_db.rs:481 — DatabaseLease::acquire has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DatabaseLease::prepare_with_sessions (cognitive 17) src/local/opencode_db.rs:566 — DatabaseLease::prepare_with_sessions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D3 · God Classes · TooManyFields · ×2
  • TooManyFields: TurnCtx src/local/chat/mod.rs:8357 — TooManyFields — 42 stored fields beside 39 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: HarnessInfo src/local/harness/detect.rs:258 — TooManyFields — 35 stored fields beside 5 methods. The bar is 30 stored fields; this is 5 over it, 1.17× 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 advisory (unmaintained) · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: up.rs → NewProjectForm.tsx, Onboarding.tsx, ProjectsHome.tsx, settings.ts src/commands/up.rs — `src/commands/up.rs` changes together with 4 other files — `ui/src/components/NewProjectForm.tsx`, `ui/src/components/Onboarding.tsx`, `ui/src/components/ProjectsHome.tsx`, `ui/src/queries/settings.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: ChatPanel.tsx → opencode.rs, ClosableTab.tsx, ExperimentsTable.tsx, ProjectsHome.tsx, events.ts, settings.ts ui/src/components/ChatPanel.tsx — `ui/src/components/ChatPanel.tsx` changes together with 6 other files — `src/local/harness/opencode.rs`, `ui/src/components/ClosableTab.tsx`, `ui/src/components/ExperimentsTable.tsx`, `ui/src/components/ProjectsHome.tsx`, `ui/src/events.ts`, `ui/src/queries/settings.ts` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) src/engine/adapters/hf.rs:107 — src/engine/adapters/hf.rs:107-126 | src/engine/adapters/modal.rs:63-79 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) REDACTED:2302 — REDACTED:2302-2326 | REDACTED:3705-3721 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×2
  • Edited copy of a member (15 corresponding lines) src/main.rs:1349 — src/main.rs:1349-1368 | windows/launcher/src/main.rs:58-72 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/local/claude.rs:1026 — src/local/claude.rs:1026-1043 | src/local/codex.rs:1091-1105 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) REDACTED:565 — REDACTED:565-578 | REDACTED:6388-6402 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) REDACTED:4822 — REDACTED:4822-4835 | REDACTED:4837-4856 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 9+ corresponding lines) src/jobs/kubernetes.rs:102 — src/jobs/kubernetes.rs:102-110 | src/jobs/ray.rs:53-61 | src/jobs/slurm.rs:97-105 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 9+ corresponding lines) src/client.rs:1323 — src/client.rs:1323-1332 | src/jobs/huggingface.rs:123-131 | src/jobs/ray.rs:205-214 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 4+ corresponding lines) src/client.rs:271 — src/client.rs:271-274 | src/telemetry.rs:690-693 | src/updates.rs:124-127 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) src/local/harness/claude.rs:1353 — src/local/harness/claude.rs:1353-1356 | src/local/harness/codex.rs:1762-1765 | src/local/harness/cursor.rs:191-194 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) src/commands/up.rs:5865 — src/commands/up.rs:5865-5869 | src/commands/up/compute_settings.rs:1120-1124 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) src/commands/up.rs:5940 — src/commands/up.rs:5940-5944 | src/commands/up/compute_settings.rs:1365-1369 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) src/local/harness/claude.rs:1920 — src/local/harness/claude.rs:1920-1936 | src/local/harness/codex.rs:4161-4177 — before extracting anything, compare `src/local/harness/claude.rs` and `src/local/harness/codex.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 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 (17 lines × 2) src/local/latex_templates.rs:152 — src/local/latex_templates.rs:152-168 | src/local/user_skills.rs:369-385 — before extracting anything, compare `src/local/latex_templates.rs` and `src/local/user_skills.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/latex_templates.rs:152` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) src/local/harness/codex.rs:2344 — src/local/harness/codex.rs:2344-2352 | src/local/harness/codex.rs:2385-2392 — 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) REDACTED:3030 — REDACTED:3030-3038 | REDACTED:3054-3061 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:3030` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) src/commands/up.rs:3434 — src/commands/up.rs:3434-3441 | src/commands/up.rs:3464-3471 | src/commands/up.rs:3501-3508 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:3434` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) src/jobs/kubernetes.rs:103 — src/jobs/kubernetes.rs:103-110 | src/jobs/ray.rs:54-61 | src/jobs/slurm.rs:98-105 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `settings` to `&K8sSettings` in one and `&RaySettings` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience src/net.rs:6 — `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 src/net.rs:12 — `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.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×2
  • Duplicated block (26 lines × 2 locations) ui/src/components/SkillsTab.tsx:375 — ui/src/components/SkillsTab.tsx:375 · ui/src/components/SkillsTab.tsx:477 — 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 (26 lines × 2 locations) ui/src/components/SkillsTab.tsx:412 — ui/src/components/SkillsTab.tsx:412 · ui/src/components/SkillsTab.tsx:504 — 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.
R10 · Code Duplication · Duplicated block (19 lines × 2 locations) · ×2
  • Duplicated block (19 lines × 2 locations) ui/src/App.tsx:2224 — ui/src/App.tsx:2224 · ui/src/components/ArtifactsTab.tsx:685 — 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 (19 lines × 2 locations) ui/src/components/ChatPanel.tsx:1025 — ui/src/components/ChatPanel.tsx:1025 · ui/src/components/ChatPanel.tsx:1249 — 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 (16 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (16 matched lines × 2 locations) ui/src/components/ModelPicker.tsx:765 — ui/src/components/ModelPicker.tsx:765 · ui/src/components/ModelPicker.tsx:923 — the two spans are one implementation copied and then locally edited — 170 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 with local edits (16 matched lines × 2 locations) ui/src/components/SettingsPage.tsx:1469 — ui/src/components/SettingsPage.tsx:1469 · ui/src/components/SettingsPage.tsx:3244 — the two spans are one implementation copied and then locally edited — 164 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.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×2
  • Duplicated block (14 lines × 2 locations) ui/src/components/ArtifactsTab.tsx:652 — ui/src/components/ArtifactsTab.tsx:652 · ui/src/components/WorktreeTab.tsx:203 — 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 (14 lines × 2 locations) ui/src/queries/overleaf.ts:25 — ui/src/queries/overleaf.ts:25 · ui/src/queries/overleaf.ts:59 — all 2 copies are in the same file, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
X12 · Unreachable branch · Statement is unreachable · ×2
  • Statement is unreachable — control never gets past the statement before it src/compute.rs:166 — `std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o700)) ?;` follows `{ return Err(anyhow !("Source snapshot directory {} is not owned by the curre…` (line 160) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
  • Statement is unreachable — control never gets past the statement before it src/jobs/ssh/service/mod.rs:126 — `std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o700)) ?;` follows `{ return Err(anyhow !("SSH service directory has a different owner")); }` (line 123) in the same block, and control never passes that statement — it returns, breaks, continues, panics, exits or calls a function that never returns. This code cannot run for any input; rustc warns `unreachable_code` on it. Delete it, or move it before the statement that leaves if it was meant to run.
X18 · Disposal-pattern correctness · Explicit release owed and not made on every path · ×2
  • Explicit release owed and not made on every path src/store/search.rs:189 — `snapshot` (line 189) is a transaction this function owns and never releases: no `commit()` (or a deliberate `rollback()`) on any path, and it is not handed on. Rust drops it at the end of the scope, and a transaction that is dropped rolls back, so every write made through it is silently undone. Release it where the work ends.
  • Explicit release owed and not made on every path REDACTED:355 — `tx` (line 355) is a transaction released by `commit()` (or a deliberate `rollback()`) only on the path that reaches line 412; the `return` on line 361 leaves before that with a success value, and on that path a transaction that is dropped rolls back, so every write made through it is silently undone. Release it before that `return` too (or return an error there, if the early exit is a failure).
X2 · Cancellation propagation · Async function without AbortSignal · ×2
  • Async function without AbortSignal: finishOnboarding dev.ts:507 — `finishOnboarding` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: post dev.ts:509 — `post` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X25 · Inert configuration knob · Configuration option is only ever logged · ×2
  • Configuration option is only ever logged src/client.rs:190 — `Sandbox.machine_type` is offered as a configuration-file option, so whoever configures the program can set it — but the only production code that touches it writes it to a log or the terminal. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
  • Configuration option is only ever logged src/client.rs:242 — `SshKeyEnvelope.ssh_key` is offered as a configuration-file option, so whoever configures the program can set it — but the only production code that touches it writes it to a log or the terminal. Every value supplied for it is silently ignored. Consult it where it was meant to take effect — or, if it genuinely does nothing, remove it (or mark it deprecated and say so in its documentation) so the configuration stops advertising a setting that changes nothing.
AC1 · Text alternatives · <video> without a captions track · ×1
  • <video> without a captions track ui/src/components/MediaPreview.tsx:85 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
AC2 · Forms & labels · <Textarea> field component without a label · ×1
  • <Textarea> field component without a label ui/src/dialog.tsx:163 — 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.
D1 · Cyclomatic Complexity · ChatPanel.ChatPanel (cyclomatic 301) · ×1
  • ChatPanel.ChatPanel (cyclomatic 301) ui/src/components/ChatPanel.tsx:5485 — ChatPanel.ChatPanel has cyclomatic complexity 301 (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 shape REPEATS in the file: 5 other methods here (ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, ChatPanel.ChatPanel::send, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 6 times rather than 6 independent problems. Splitting this body alone leaves the other 5 exactly as they are. Where these are variations on one operation, the change that clears all 6 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · AddAgentDialog.AddAgentDialog (cyclomatic 297) · ×1
  • AddAgentDialog.AddAgentDialog (cyclomatic 297) ui/src/components/AddAgentDialog.tsx:270 — AddAgentDialog.AddAgentDialog has cyclomatic complexity 297 (threshold 15). Of this number, 159 points are the body's own statements and 138 belong to 41 function items 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.
D1 · Cyclomatic Complexity · FileViewer.FileViewer (cyclomatic 248) · ×1
  • FileViewer.FileViewer (cyclomatic 248) ui/src/components/FileViewer.tsx:142 — FileViewer.FileViewer has cyclomatic complexity 248 (threshold 15). Of this number, 161 points are the body's own statements and 87 belong to 20 function items 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.
D1 · Cyclomatic Complexity · NewProjectForm.NewProjectForm (cyclomatic 232) · ×1
  • NewProjectForm.NewProjectForm (cyclomatic 232) ui/src/components/NewProjectForm.tsx:63 — NewProjectForm.NewProjectForm has cyclomatic complexity 232 (threshold 15). Of this number, 187 points are the body's own statements and 45 belong to 10 function items 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.
D1 · Cyclomatic Complexity · App.App (cyclomatic 229) · ×1
  • App.App (cyclomatic 229) ui/src/App.tsx:254 — App.App has cyclomatic complexity 229 (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 shape REPEATS in the file: one other method here (App.App::renderContentTab) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ChatPanel.computeToolActivity (cyclomatic 146) · ×1
  • ChatPanel.computeToolActivity (cyclomatic 146) ui/src/components/ChatPanel.tsx:1545 — ChatPanel.computeToolActivity has cyclomatic complexity 146 (threshold 15). Of this number, 132 points are the body's own statements and 14 belong to 8 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.
D1 · Cyclomatic Complexity · ChatPanel.Transcript (cyclomatic 120) · ×1
  • ChatPanel.Transcript (cyclomatic 120) ui/src/components/ChatPanel.tsx:4590 — ChatPanel.Transcript has cyclomatic complexity 120 (threshold 15). Most of this is not in the body itself: 6 of the 120 points are its own statements and the rest belongs to 25 function literals inside it that branch (lines 4935, 4918, 4819, …). 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.
D1 · Cyclomatic Complexity · ChatSearch.ChatSearch (cyclomatic 119) · ×1
  • ChatSearch.ChatSearch (cyclomatic 119) ui/src/components/ChatSearch.tsx:21 — ChatSearch.ChatSearch has cyclomatic complexity 119 (threshold 15). Of this number, 60 points are the body's own statements and 59 belong to 13 function items 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.
D1 · Cyclomatic Complexity · Onboarding.Onboarding (cyclomatic 109) · ×1
  • Onboarding.Onboarding (cyclomatic 109) ui/src/components/Onboarding.tsx:64 — Onboarding.Onboarding has cyclomatic complexity 109 (threshold 15). Of this number, 63 points are the body's own statements and 46 belong to 20 function items 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.
D1 · Cyclomatic Complexity · orx-chart.html.draw (cyclomatic 95) · ×1
  • orx-chart.html.draw (cyclomatic 95) agent-skills/orx-figures/assets/orx-chart.html:112 — orx-chart.html.draw has cyclomatic complexity 95 (threshold 15). Of this number, 52 points are the body's own statements and 43 belong to 13 function items 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.
D1 · Cyclomatic Complexity · ModelPicker.ModelPicker (cyclomatic 93) · ×1
  • ModelPicker.ModelPicker (cyclomatic 93) ui/src/components/ModelPicker.tsx:300 — ModelPicker.ModelPicker has cyclomatic complexity 93 (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. This shape REPEATS in the file: one other method here (ModelPicker.ModelPicker::moveFocus) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · SettingsPage.OpenResearchSection (cyclomatic 75) · ×1
  • SettingsPage.OpenResearchSection (cyclomatic 75) ui/src/components/SettingsPage.tsx:2502 — SettingsPage.OpenResearchSection has cyclomatic complexity 75 (threshold 15). Of this number, 74 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.SshSection (cyclomatic 69) · ×1
  • SettingsPage.SshSection (cyclomatic 69) ui/src/components/SettingsPage.tsx:1747 — SettingsPage.SshSection has cyclomatic complexity 69 (threshold 15). Most of this is not in the body itself: 7 of the 69 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 1848, hostAction, a function literal at line 1914, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ModelList.ModelList (cyclomatic 68) · ×1
  • ModelList.ModelList (cyclomatic 68) ui/src/components/ModelList.tsx:126 — ModelList.ModelList has cyclomatic complexity 68 (threshold 15). Of this number, 17 points are the body's own statements and 51 belong to 20 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.SessionRow (cyclomatic 68) · ×1
  • ChatPanel.SessionRow (cyclomatic 68) ui/src/components/ChatPanel.tsx:5117 — ChatPanel.SessionRow has cyclomatic complexity 68 (threshold 15). Of this number, 25 points are the body's own statements and 43 belong to 16 function items 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.
D1 · Cyclomatic Complexity · RemoteRuntime.RemoteSetup (cyclomatic 64) · ×1
  • RemoteRuntime.RemoteSetup (cyclomatic 64) ui/src/RemoteRuntime.tsx:159 — RemoteRuntime.RemoteSetup has cyclomatic complexity 64 (threshold 15). Of this number, 58 points are the body's own statements and 6 belong to 5 function items 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.
D1 · Cyclomatic Complexity · ComposerEditor.ComposerEditor (cyclomatic 62) · ×1
  • ComposerEditor.ComposerEditor (cyclomatic 62) ui/src/components/ComposerEditor.tsx:346 — ComposerEditor.ComposerEditor has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 9 of the 62 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 598, createState, a function literal at line 548, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · UsageMenu.UsageMenu (cyclomatic 60) · ×1
  • UsageMenu.UsageMenu (cyclomatic 60) ui/src/components/UsageMenu.tsx:28 — UsageMenu.UsageMenu has cyclomatic complexity 60 (threshold 15). Of this number, 53 points are the body's own statements and 7 belong to 5 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.
D1 · Cyclomatic Complexity · ExpHoverCard.ExpHoverCard (cyclomatic 59) · ×1
  • ExpHoverCard.ExpHoverCard (cyclomatic 59) ui/src/components/ExpHoverCard.tsx:131 — ExpHoverCard.ExpHoverCard has cyclomatic complexity 59 (threshold 15). Of this number, 50 points are the body's own statements and 9 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.
D1 · Cyclomatic Complexity · SettingsPage.GitTab (cyclomatic 56) · ×1
  • SettingsPage.GitTab (cyclomatic 56) ui/src/components/SettingsPage.tsx:4414 — SettingsPage.GitTab has cyclomatic complexity 56 (threshold 15). Of this number, 45 points are the body's own statements and 11 belong to 4 function items 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.
D1 · Cyclomatic Complexity · SettingsPage.SlurmSection (cyclomatic 54) · ×1
  • SettingsPage.SlurmSection (cyclomatic 54) ui/src/components/SettingsPage.tsx:2034 — SettingsPage.SlurmSection has cyclomatic complexity 54 (threshold 15). Of this number, 27 points are the body's own statements and 27 belong to 8 function items 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.
D1 · Cyclomatic Complexity · workspaceState.parsePane (cyclomatic 53) · ×1
  • workspaceState.parsePane (cyclomatic 53) ui/src/workspaceState.ts:54 — workspaceState.parsePane has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelPicker.OptionPicker (cyclomatic 52) · ×1
  • ModelPicker.OptionPicker (cyclomatic 52) ui/src/components/ModelPicker.tsx:989 — ModelPicker.OptionPicker has cyclomatic complexity 52 (threshold 15). Of this number, 30 points are the body's own statements and 22 belong to 8 function items 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.
D1 · Cyclomatic Complexity · AcpAuthDialog.AcpAuth (cyclomatic 51) · ×1
  • AcpAuthDialog.AcpAuth (cyclomatic 51) ui/src/components/AcpAuthDialog.tsx:32 — AcpAuthDialog.AcpAuth has cyclomatic complexity 51 (threshold 15). Of this number, 30 points are the body's own statements and 21 belong to 4 function items 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.
D1 · Cyclomatic Complexity · useOverleafSync.useOverleafSync (cyclomatic 50) · ×1
  • useOverleafSync.useOverleafSync (cyclomatic 50) ui/src/useOverleafSync.ts:72 — useOverleafSync.useOverleafSync has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 11 of the 50 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 189, 280, 300, …). 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.
D1 · Cyclomatic Complexity · WorktreeTab.WorktreeTab (cyclomatic 49) · ×1
  • WorktreeTab.WorktreeTab (cyclomatic 49) ui/src/components/WorktreeTab.tsx:45 — WorktreeTab.WorktreeTab has cyclomatic complexity 49 (threshold 15). Of this number, 41 points are the body's own statements and 8 belong to 6 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.PromptCard (cyclomatic 49) · ×1
  • ChatPanel.PromptCard (cyclomatic 49) ui/src/components/ChatPanel.tsx:3242 — ChatPanel.PromptCard has cyclomatic complexity 49 (threshold 15). Of this number, 47 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · HtmlPreview.HtmlPreview (cyclomatic 48) · ×1
  • HtmlPreview.HtmlPreview (cyclomatic 48) REDACTED:161 — HtmlPreview.HtmlPreview has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 9 of the 48 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 189, 257, 253, …). 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.
D1 · Cyclomatic Complexity · SettingsPage.VercelSection (cyclomatic 46) · ×1
  • SettingsPage.VercelSection (cyclomatic 46) ui/src/components/SettingsPage.tsx:1512 — SettingsPage.VercelSection has cyclomatic complexity 46 (threshold 15). Of this number, 39 points are the body's own statements and 7 belong to one function item 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.
D1 · Cyclomatic Complexity · ConfigureArgs · ×1
  • ConfigureArgs::body (cyclomatic 45) src/commands/compute.rs:338 — ConfigureArgs::body has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.StorageTab (cyclomatic 42) · ×1
  • SettingsPage.StorageTab (cyclomatic 42) ui/src/components/SettingsPage.tsx:4592 — SettingsPage.StorageTab has cyclomatic complexity 42 (threshold 15). Of this number, 27 points are the body's own statements and 15 belong to 7 function items 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.
D1 · Cyclomatic Complexity · markdownLivePreview.collectFormatting (cyclomatic 41) · ×1
  • markdownLivePreview.collectFormatting (cyclomatic 41) ui/src/markdownLivePreview.ts:254 — markdownLivePreview.collectFormatting has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to one function literal inside it that branches (line 257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SettingsPage.HfSection (cyclomatic 41) · ×1
  • SettingsPage.HfSection (cyclomatic 41) ui/src/components/SettingsPage.tsx:3302 — SettingsPage.HfSection has cyclomatic complexity 41 (threshold 15). Of this number, 28 points are the body's own statements and 13 belong to 2 function items 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.
D1 · Cyclomatic Complexity · HarnessSetupDialog.HarnessSetup (cyclomatic 39) · ×1
  • HarnessSetupDialog.HarnessSetup (cyclomatic 39) ui/src/components/HarnessSetupDialog.tsx:48 — HarnessSetupDialog.HarnessSetup has cyclomatic complexity 39 (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. This shape REPEATS in the file: one other method here (HarnessSetupDialog.HarnessSetup::verify) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · SettingsPage.K8sSection (cyclomatic 39) · ×1
  • SettingsPage.K8sSection (cyclomatic 39) ui/src/components/SettingsPage.tsx:1268 — SettingsPage.K8sSection has cyclomatic complexity 39 (threshold 15). Of this number, 26 points are the body's own statements and 13 belong to 3 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.shellCommandSegments (cyclomatic 39) · ×1
  • ChatPanel.shellCommandSegments (cyclomatic 39) ui/src/components/ChatPanel.tsx:1234 — ChatPanel.shellCommandSegments has cyclomatic complexity 39 (threshold 15). Of this number, 22 points are the body's own statements and 17 belong to 3 function items 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.
D1 · Cyclomatic Complexity · OverleafPanel.OverleafPanel (cyclomatic 39) · ×1
  • OverleafPanel.OverleafPanel (cyclomatic 39) ui/src/components/OverleafPanel.tsx:239 — OverleafPanel.OverleafPanel has cyclomatic complexity 39 (threshold 15). Of this number, 31 points are the body's own statements and 8 belong to 3 function items 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.
D1 · Cyclomatic Complexity · SessionHoverCard.SessionHoverCard (cyclomatic 38) · ×1
  • SessionHoverCard.SessionHoverCard (cyclomatic 38) ui/src/components/SessionHoverCard.tsx:78 — SessionHoverCard.SessionHoverCard has cyclomatic complexity 38 (threshold 15). Of this number, 26 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Events.QueryEvents (cyclomatic 38) · ×1
  • Events.QueryEvents (cyclomatic 38) ui/src/queries/Events.tsx:18 — Events.QueryEvents has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 7 of the 38 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 116, 129, 138, …). 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.
D1 · Cyclomatic Complexity · WorkspaceConnection.WorkspaceConnection (cyclomatic 38) · ×1
  • WorkspaceConnection.WorkspaceConnection (cyclomatic 38) ui/src/components/WorkspaceConnection.tsx:64 — WorkspaceConnection.WorkspaceConnection has cyclomatic complexity 38 (threshold 15). Of this number, 32 points are the body's own statements and 6 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.
D1 · Cyclomatic Complexity · ChatPanel.alphaxivActivity (cyclomatic 38) · ×1
  • ChatPanel.alphaxivActivity (cyclomatic 38) ui/src/components/ChatPanel.tsx:1967 — ChatPanel.alphaxivActivity has cyclomatic complexity 38 (threshold 15). Of this number, 32 points are the body's own statements and 6 belong to 4 function items 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.
D1 · Cyclomatic Complexity · RunContactNotice.RunContactNotice (cyclomatic 37) · ×1
  • RunContactNotice.RunContactNotice (cyclomatic 37) ui/src/components/RunContactNotice.tsx:78 — RunContactNotice.RunContactNotice has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to one function item 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.
D1 · Cyclomatic Complexity · SettingsPage.UpdatesTab (cyclomatic 37) · ×1
  • SettingsPage.UpdatesTab (cyclomatic 37) ui/src/components/SettingsPage.tsx:3859 — SettingsPage.UpdatesTab has cyclomatic complexity 37 (threshold 15). Of this number, 25 points are the body's own statements and 12 belong to 6 function items 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.
D1 · Cyclomatic Complexity · orx_chart.validate_views (cyclomatic 36) · ×1
  • orx_chart.validate_views (cyclomatic 36) agent-skills/orx-figures/assets/orx_chart.py:10 — orx_chart.validate_views has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.DefaultDestinationEditor (cyclomatic 36) · ×1
  • SettingsPage.DefaultDestinationEditor (cyclomatic 36) ui/src/components/SettingsPage.tsx:2695 — SettingsPage.DefaultDestinationEditor has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 belong to 7 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.ToolActivityLabel (cyclomatic 36) · ×1
  • ChatPanel.ToolActivityLabel (cyclomatic 36) ui/src/components/ChatPanel.tsx:2291 — ChatPanel.ToolActivityLabel has cyclomatic complexity 36 (threshold 15). Of this number, 24 points are the body's own statements and 12 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.
D1 · Cyclomatic Complexity · orxCommand.shellWords (cyclomatic 35) · ×1
  • orxCommand.shellWords (cyclomatic 35) REDACTED:41 — orxCommand.shellWords has cyclomatic complexity 35 (threshold 15). Of this number, 32 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.
D1 · Cyclomatic Complexity · ChatPanel.ToolGroup (cyclomatic 35) · ×1
  • ChatPanel.ToolGroup (cyclomatic 35) ui/src/components/ChatPanel.tsx:2816 — ChatPanel.ToolGroup has cyclomatic complexity 35 (threshold 15). Of this number, 31 points are the body's own statements and 4 belong to 3 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.
D1 · Cyclomatic Complexity · keyboardNavigation.navigateKeyboardList (cyclomatic 34) · ×1
  • keyboardNavigation.navigateKeyboardList (cyclomatic 34) ui/src/keyboardNavigation.ts:3 — keyboardNavigation.navigateKeyboardList has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RemoteRuntime.RuntimeRoot (cyclomatic 34) · ×1
  • RemoteRuntime.RuntimeRoot (cyclomatic 34) ui/src/RemoteRuntime.tsx:463 — RemoteRuntime.RuntimeRoot has cyclomatic complexity 34 (threshold 15). Of this number, 20 points are the body's own statements and 14 belong to 4 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.
D1 · Cyclomatic Complexity · AcpHarnessDialog.AcpHarnessDialog (cyclomatic 34) · ×1
  • AcpHarnessDialog.AcpHarnessDialog (cyclomatic 34) ui/src/components/AcpHarnessDialog.tsx:15 — AcpHarnessDialog.AcpHarnessDialog has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (AcpHarnessDialog.AcpHarnessDialog::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Header.Brand (cyclomatic 34) · ×1
  • Header.Brand (cyclomatic 34) ui/src/components/Header.tsx:42 — Header.Brand has cyclomatic complexity 34 (threshold 15). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArtifactsTab.ArtifactsTab (cyclomatic 34) · ×1
  • ArtifactsTab.ArtifactsTab (cyclomatic 34) ui/src/components/ArtifactsTab.tsx:508 — ArtifactsTab.ArtifactsTab 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 13 function items inside it that branch (a function literal at line 585, a function literal at line 699, reveal, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TreeView.TreeView (cyclomatic 34) · ×1
  • TreeView.TreeView (cyclomatic 34) ui/src/components/TreeView.tsx:449 — TreeView.TreeView has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 4 of the 34 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 510, 626, 493, …). 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.
D1 · Cyclomatic Complexity · events.createEvents.useOrxEventStream (cyclomatic 33) · ×1
  • events.createEvents.useOrxEventStream (cyclomatic 33) ui/src/events.ts:282 — events.createEvents.useOrxEventStream has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 24 function literals inside it that branch (lines 321, 305, 300, …). 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.
D1 · Cyclomatic Complexity · SshConnectTerminal.CommandTerminal (cyclomatic 33) · ×1
  • SshConnectTerminal.CommandTerminal (cyclomatic 33) ui/src/components/SshConnectTerminal.tsx:161 — SshConnectTerminal.CommandTerminal has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 237, 286, 195, …). 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.
D1 · Cyclomatic Complexity · HarnessSetupDialog.SetupRun (cyclomatic 33) · ×1
  • HarnessSetupDialog.SetupRun (cyclomatic 33) ui/src/components/HarnessSetupDialog.tsx:274 — HarnessSetupDialog.SetupRun has cyclomatic complexity 33 (threshold 15). Of this number, 23 points are the body's own statements and 10 belong to 3 function items 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.
D1 · Cyclomatic Complexity · DetailDrawer.TerminalView (cyclomatic 33) · ×1
  • DetailDrawer.TerminalView (cyclomatic 33) ui/src/components/DetailDrawer.tsx:93 — DetailDrawer.TerminalView has cyclomatic complexity 33 (threshold 15). Of this number, 29 points are the body's own statements and 4 belong to 4 function items 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.
D1 · Cyclomatic Complexity · ClaudeHost · ×1
  • ClaudeHost::acquire_turn (cyclomatic 32) src/local/claude.rs:1310 — ClaudeHost::acquire_turn has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkspaceTools.SideChatPicker (cyclomatic 32) · ×1
  • WorkspaceTools.SideChatPicker (cyclomatic 32) ui/src/components/WorkspaceTools.tsx:146 — WorkspaceTools.SideChatPicker has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 268, 166, 209, …). 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.
D1 · Cyclomatic Complexity · LibraryPicker.SignedInLibraryPicker (cyclomatic 32) · ×1
  • LibraryPicker.SignedInLibraryPicker (cyclomatic 32) ui/src/components/LibraryPicker.tsx:32 — LibraryPicker.SignedInLibraryPicker has cyclomatic complexity 32 (threshold 15). Of this number, 22 points are the body's own statements and 10 belong to 6 function items 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.
D1 · Cyclomatic Complexity · chatRendering.questionReplies (cyclomatic 32) · ×1
  • chatRendering.questionReplies (cyclomatic 32) ui/src/chatRendering.ts:68 — chatRendering.questionReplies has cyclomatic complexity 32 (threshold 15). Of this number, 31 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.
D1 · Cyclomatic Complexity · Broker · ×1
  • Broker::dispatch (cyclomatic 31) src/jobs/ssh/service/mod.rs:560 — Broker::dispatch has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LogTerminal.LogTerminal (cyclomatic 31) · ×1
  • LogTerminal.LogTerminal (cyclomatic 31) ui/src/components/LogTerminal.tsx:19 — LogTerminal.LogTerminal has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 6 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.ResearchToolRun (cyclomatic 31) · ×1
  • ChatPanel.ResearchToolRun (cyclomatic 31) ui/src/components/ChatPanel.tsx:3115 — ChatPanel.ResearchToolRun has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 3 of the 31 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 3137, 3178, 3217). 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.
D1 · Cyclomatic Complexity · ChatPanel.AssistantTurn (cyclomatic 31) · ×1
  • ChatPanel.AssistantTurn (cyclomatic 31) ui/src/components/ChatPanel.tsx:3964 — ChatPanel.AssistantTurn has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 belong to 6 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.
D1 · Cyclomatic Complexity · OpenResearch · ×1
  • OpenResearch::inspect (cyclomatic 30) src/engine/adapters/openresearch.rs:330 — OpenResearch::inspect has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.TinkerSection (cyclomatic 30) · ×1
  • SettingsPage.TinkerSection (cyclomatic 30) ui/src/components/SettingsPage.tsx:3186 — SettingsPage.TinkerSection has cyclomatic complexity 30 (threshold 15). Of this number, 21 points are the body's own statements and 9 belong to 2 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.commandRunIds (cyclomatic 30) · ×1
  • ChatPanel.commandRunIds (cyclomatic 30) ui/src/components/ChatPanel.tsx:1430 — ChatPanel.commandRunIds has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · orx-chart.html.drawDiagram (cyclomatic 29) · ×1
  • orx-chart.html.drawDiagram (cyclomatic 29) agent-skills/orx-figures/assets/orx-chart.html:187 — orx-chart.html.drawDiagram has cyclomatic complexity 29 (threshold 15). Of this number, 23 points are the body's own statements and 6 belong to 3 function items 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.
D1 · Cyclomatic Complexity · api.createApi.json (cyclomatic 29) · ×1
  • api.createApi.json (cyclomatic 29) ui/src/api.ts:2048 — api.createApi.json has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccountChip.AccountChip (cyclomatic 29) · ×1
  • AccountChip.AccountChip (cyclomatic 29) ui/src/components/AccountChip.tsx:60 — AccountChip.AccountChip has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShareProjectDialog.ShareProjectDialog (cyclomatic 29) · ×1
  • ShareProjectDialog.ShareProjectDialog (cyclomatic 29) ui/src/components/ShareProjectDialog.tsx:25 — ShareProjectDialog.ShareProjectDialog has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 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.
D1 · Cyclomatic Complexity · SettingsPage.AgentList (cyclomatic 29) · ×1
  • SettingsPage.AgentList (cyclomatic 29) ui/src/components/SettingsPage.tsx:419 — SettingsPage.AgentList has cyclomatic complexity 29 (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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::providerRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · ExperimentsTable.ExperimentsTable (cyclomatic 29) · ×1
  • ExperimentsTable.ExperimentsTable (cyclomatic 29) ui/src/components/ExperimentsTable.tsx:17 — ExperimentsTable.ExperimentsTable has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 110, a function literal at line 54, requestCancel, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · WindowMenu.WindowMenu (cyclomatic 29) · ×1
  • WindowMenu.WindowMenu (cyclomatic 29) ui/src/components/WindowMenu.tsx:11 — WindowMenu.WindowMenu has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 85, 27, 78, …). 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.
D1 · Cyclomatic Complexity · dev.parseArgs (cyclomatic 28) · ×1
  • dev.parseArgs (cyclomatic 28) dev.ts:116 — dev.parseArgs has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function items 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.
D1 · Cyclomatic Complexity · markdownNormalization.normalizeCurrencyDollars (cyclomatic 28) · ×1
  • markdownNormalization.normalizeCurrencyDollars (cyclomatic 28) ui/src/markdownNormalization.ts:147 — markdownNormalization.normalizeCurrencyDollars has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExperimentOverview.ExperimentOverview (cyclomatic 28) · ×1
  • ExperimentOverview.ExperimentOverview (cyclomatic 28) ui/src/components/ExperimentOverview.tsx:58 — ExperimentOverview.ExperimentOverview has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · SettingsPage.ModalSection (cyclomatic 28) · ×1
  • SettingsPage.ModalSection (cyclomatic 28) ui/src/components/SettingsPage.tsx:1412 — SettingsPage.ModalSection has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 2 function items 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.
D1 · Cyclomatic Complexity · SettingsPage.EnvRow (cyclomatic 28) · ×1
  • SettingsPage.EnvRow (cyclomatic 28) ui/src/components/SettingsPage.tsx:3446 — SettingsPage.EnvRow has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to 3 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.Message (cyclomatic 28) · ×1
  • ChatPanel.Message (cyclomatic 28) ui/src/components/ChatPanel.tsx:3595 — ChatPanel.Message has cyclomatic complexity 28 (threshold 15). Of this number, 18 points are the body's own statements and 10 belong to 5 function items 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.
D1 · Cyclomatic Complexity · orx_figstyle._text_collisions (cyclomatic 27) · ×1
  • orx_figstyle._text_collisions (cyclomatic 27) agent-skills/orx-figures/assets/orx_figstyle.py:255 — orx_figstyle._text_collisions has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dev.main (cyclomatic 27) · ×1
  • dev.main (cyclomatic 27) dev.ts:993 — dev.main has cyclomatic complexity 27 (threshold 15). Of this number, 24 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.
D1 · Cyclomatic Complexity · Md.Md (cyclomatic 27) · ×1
  • Md.Md (cyclomatic 27) REDACTED:457 — Md.Md has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 510, 478, 499, …). 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.
D1 · Cyclomatic Complexity · useProjectWorkspace.createProjectPersistence.useProjectWorkspace (cyclomatic 27) · ×1
  • useProjectWorkspace.createProjectPersistence.useProjectWorkspace (cyclomatic 27) ui/src/useProjectWorkspace.ts:147 — useProjectWorkspace.createProjectPersistence.useProjectWorkspace has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 200, 193, 179, …). 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.
D1 · Cyclomatic Complexity · Machines.MachineWorkspaces (cyclomatic 27) · ×1
  • Machines.MachineWorkspaces (cyclomatic 27) ui/src/Machines.tsx:142 — Machines.MachineWorkspaces has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 239, selectRemote, a function literal at line 193, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AddAgentDialog.OAuthPanel (cyclomatic 26) · ×1
  • AddAgentDialog.OAuthPanel (cyclomatic 26) ui/src/components/AddAgentDialog.tsx:1051 — AddAgentDialog.OAuthPanel has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 4 function items 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.
D1 · Cyclomatic Complexity · WorkspaceTools.WorkspaceTools (cyclomatic 26) · ×1
  • WorkspaceTools.WorkspaceTools (cyclomatic 26) ui/src/components/WorkspaceTools.tsx:26 — WorkspaceTools.WorkspaceTools has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 6 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.
D1 · Cyclomatic Complexity · QuestionDock.QuestionDock (cyclomatic 26) · ×1
  • QuestionDock.QuestionDock (cyclomatic 26) ui/src/components/QuestionDock.tsx:124 — QuestionDock.QuestionDock has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 154, 192, 152). 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.
D1 · Cyclomatic Complexity · ArtifactsTab.PreviewPane (cyclomatic 26) · ×1
  • ArtifactsTab.PreviewPane (cyclomatic 26) ui/src/components/ArtifactsTab.tsx:209 — ArtifactsTab.PreviewPane has cyclomatic complexity 26 (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.
D1 · Cyclomatic Complexity · LocalPlane · ×1
  • LocalPlane::experiment_status (cyclomatic 25) src/plane/local_plane.rs:135 — LocalPlane::experiment_status has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentIcon.AgentIconPicker (cyclomatic 25) · ×1
  • AgentIcon.AgentIconPicker (cyclomatic 25) ui/src/components/AgentIcon.tsx:103 — AgentIcon.AgentIconPicker has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 6 function items 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.
D1 · Cyclomatic Complexity · OverleafPanel.OverleafButton (cyclomatic 25) · ×1
  • OverleafPanel.OverleafButton (cyclomatic 25) ui/src/components/OverleafPanel.tsx:27 — OverleafPanel.OverleafButton has cyclomatic complexity 25 (threshold 15). Of this number, 16 points are the body's own statements and 9 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.
D1 · Cyclomatic Complexity · App.parseFilePath (cyclomatic 25) · ×1
  • App.parseFilePath (cyclomatic 25) ui/src/App.tsx:160 — App.parseFilePath has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · runDisplay.runNotice (cyclomatic 24) · ×1
  • runDisplay.runNotice (cyclomatic 24) ui/src/runDisplay.ts:93 — runDisplay.runNotice has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RunContactNotice.copy (cyclomatic 24) · ×1
  • RunContactNotice.copy (cyclomatic 24) ui/src/components/RunContactNotice.tsx:23 — RunContactNotice.copy 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.
D1 · Cyclomatic Complexity · ModelSettings.ModelSettings (cyclomatic 24) · ×1
  • ModelSettings.ModelSettings (cyclomatic 24) ui/src/components/ModelSettings.tsx:28 — ModelSettings.ModelSettings has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 118, a function literal at line 88, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ResumeDialog.ResumeDialog (cyclomatic 24) · ×1
  • ResumeDialog.ResumeDialog (cyclomatic 24) ui/src/components/ResumeDialog.tsx:52 — ResumeDialog.ResumeDialog has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 134, a function literal at line 166, a function literal at line 70, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ChatPanel.markdownFromSelectionNode (cyclomatic 24) · ×1
  • ChatPanel.markdownFromSelectionNode (cyclomatic 24) ui/src/components/ChatPanel.tsx:434 — ChatPanel.markdownFromSelectionNode has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · invalidation.createInvalidation.invalidateWrite (cyclomatic 23) · ×1
  • invalidation.createInvalidation.invalidateWrite (cyclomatic 23) ui/src/queries/invalidation.ts:136 — invalidation.createInvalidation.invalidateWrite has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · files.createFileQueries.resolvedFileQuery (cyclomatic 23) · ×1
  • files.createFileQueries.resolvedFileQuery (cyclomatic 23) ui/src/queries/files.ts:102 — files.createFileQueries.resolvedFileQuery has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 130, 155, 121, …). 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.
D1 · Cyclomatic Complexity · ModelList.ModelRow (cyclomatic 23) · ×1
  • ModelList.ModelRow (cyclomatic 23) ui/src/components/ModelList.tsx:428 — ModelList.ModelRow has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to 3 function items 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.
D1 · Cyclomatic Complexity · ExperimentLineage.Rail (cyclomatic 23) · ×1
  • ExperimentLineage.Rail (cyclomatic 23) ui/src/components/ExperimentLineage.tsx:118 — ExperimentLineage.Rail has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 159, line). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · chatSearch.chatSearchRanges (cyclomatic 23) · ×1
  • chatSearch.chatSearchRanges (cyclomatic 23) ui/src/chatSearch.ts:19 — chatSearch.chatSearchRanges has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.RaySection (cyclomatic 23) · ×1
  • SettingsPage.RaySection (cyclomatic 23) ui/src/components/SettingsPage.tsx:2373 — SettingsPage.RaySection has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 3 function items 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.
D1 · Cyclomatic Complexity · workspaceState.parseDestination (cyclomatic 22) · ×1
  • workspaceState.parseDestination (cyclomatic 22) ui/src/workspaceState.ts:96 — workspaceState.parseDestination has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to one function item 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.
D1 · Cyclomatic Complexity · orxCommand.parseOrxLit (cyclomatic 22) · ×1
  • orxCommand.parseOrxLit (cyclomatic 22) REDACTED:166 — orxCommand.parseOrxLit has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fileMentions.matchFileMentions (cyclomatic 22) · ×1
  • fileMentions.matchFileMentions (cyclomatic 22) ui/src/fileMentions.ts:64 — fileMentions.matchFileMentions has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SshConfigDialog.SshConfigDialog (cyclomatic 22) · ×1
  • SshConfigDialog.SshConfigDialog (cyclomatic 22) ui/src/components/SshConfigDialog.tsx:29 — SshConfigDialog.SshConfigDialog has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 3 function items 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.
D1 · Cyclomatic Complexity · SettingsPage.RecordRow (cyclomatic 22) · ×1
  • SettingsPage.RecordRow (cyclomatic 22) ui/src/components/SettingsPage.tsx:968 — SettingsPage.RecordRow has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 5 function items 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.
D1 · Cyclomatic Complexity · StatusStrip.StatusStrip (cyclomatic 22) · ×1
  • StatusStrip.StatusStrip (cyclomatic 22) ui/src/components/StatusStrip.tsx:23 — StatusStrip.StatusStrip has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 3 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.
D1 · Cyclomatic Complexity · ChatPanel.commandExperimentIds (cyclomatic 22) · ×1
  • ChatPanel.commandExperimentIds (cyclomatic 22) ui/src/components/ChatPanel.tsx:1490 — ChatPanel.commandExperimentIds has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TabStrip.TabStrip (cyclomatic 22) · ×1
  • TabStrip.TabStrip (cyclomatic 22) ui/src/components/TabStrip.tsx:5 — TabStrip.TabStrip has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 26, 103, 15, …). 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.
D1 · Cyclomatic Complexity · requestAuth (cyclomatic 22) · ×1
  • requestAuth (cyclomatic 22) src/local/acp/zcode-runtime.cjs:17 — requestAuth has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 4 function items 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.
D1 · Cyclomatic Complexity · orx_figstyle._audit (cyclomatic 21) · ×1
  • orx_figstyle._audit (cyclomatic 21) agent-skills/orx-figures/assets/orx_figstyle.py:190 — orx_figstyle._audit has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · helper.slurm_status (cyclomatic 21) · ×1
  • helper.slurm_status (cyclomatic 21) REDACTED:135 — helper.slurm_status has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · orx-chart.html.drawHeatmap (cyclomatic 21) · ×1
  • orx-chart.html.drawHeatmap (cyclomatic 21) agent-skills/orx-figures/assets/orx-chart.html:210 — orx-chart.html.drawHeatmap has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 3 function items 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.
D1 · Cyclomatic Complexity · acp.nativeOptions (cyclomatic 21) · ×1
  • acp.nativeOptions (cyclomatic 21) ui/src/acp.ts:42 — acp.nativeOptions has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 50, 45, 57). 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.
D1 · Cyclomatic Complexity · HarnessSetupDialog.HarnessSetup · ×1
  • HarnessSetupDialog.HarnessSetup::verify (cyclomatic 21) ui/src/components/HarnessSetupDialog.tsx:83 — HarnessSetupDialog.HarnessSetup::verify 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. This shape REPEATS in the file: one other method here (HarnessSetupDialog.HarnessSetup) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · workspaceTabs.applyPane (cyclomatic 21) · ×1
  • workspaceTabs.applyPane (cyclomatic 21) ui/src/workspaceTabs.ts:305 — workspaceTabs.applyPane has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function items 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.
D1 · Cyclomatic Complexity · chatRendering.splitResponseParts.turns (cyclomatic 21) · ×1
  • chatRendering.splitResponseParts.turns (cyclomatic 21) ui/src/chatRendering.ts:253 — chatRendering.splitResponseParts.turns has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 254, 258, 270). 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.
D1 · Cyclomatic Complexity · AcpHarnessDialog.AcpHarnessDialog · ×1
  • AcpHarnessDialog.AcpHarnessDialog::run (cyclomatic 21) ui/src/components/AcpHarnessDialog.tsx:59 — AcpHarnessDialog.AcpHarnessDialog::run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (AcpHarnessDialog.AcpHarnessDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · SettingsPage.harnessStatus (cyclomatic 21) · ×1
  • SettingsPage.harnessStatus (cyclomatic 21) ui/src/components/SettingsPage.tsx:358 — SettingsPage.harnessStatus 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.
D1 · Cyclomatic Complexity · TreeView.ExpNode (cyclomatic 21) · ×1
  • TreeView.ExpNode (cyclomatic 21) ui/src/components/TreeView.tsx:227 — TreeView.ExpNode has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · routePages.ProjectsPage (cyclomatic 21) · ×1
  • routePages.ProjectsPage (cyclomatic 21) ui/src/routePages.tsx:68 — routePages.ProjectsPage has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · launch (cyclomatic 21) · ×1
  • launch (cyclomatic 21) src/local/acp/zcode-runtime.cjs:62 — launch has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (ensureBackend::providerRuntimeHeadersResponder, ensureBackend::request, a function literal at line 113, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ServerDescriptor · ×1
  • ServerDescriptor::live (cyclomatic 20) src/commands/remote_host.rs:1461 — ServerDescriptor::live has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClaudeCode · ×1
  • ClaudeCode::detect_at (cyclomatic 20) src/local/harness/claude.rs:1121 — ClaudeCode::detect_at has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tooltip.Tooltip (cyclomatic 20) · ×1
  • Tooltip.Tooltip (cyclomatic 20) ui/src/components/ui/Tooltip.tsx:4 — Tooltip.Tooltip has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (show, hide, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · chatState.reducer (cyclomatic 20) · ×1
  • chatState.reducer (cyclomatic 20) ui/src/queries/chatState.ts:64 — chatState.reducer has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workspaceTabs.restoreWorkspace (cyclomatic 20) · ×1
  • workspaceTabs.restoreWorkspace (cyclomatic 20) ui/src/workspaceTabs.ts:51 — workspaceTabs.restoreWorkspace has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingsPage.ComputeTab (cyclomatic 20) · ×1
  • SettingsPage.ComputeTab (cyclomatic 20) ui/src/components/SettingsPage.tsx:3045 — SettingsPage.ComputeTab has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 4 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.currentTranscriptSelection (cyclomatic 20) · ×1
  • ChatPanel.currentTranscriptSelection (cyclomatic 20) ui/src/components/ChatPanel.tsx:516 — ChatPanel.currentTranscriptSelection has cyclomatic complexity 20 (threshold 15). Of this number, 18 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.
D1 · Cyclomatic Complexity · ChatPanel.heredocMarker (cyclomatic 20) · ×1
  • ChatPanel.heredocMarker (cyclomatic 20) ui/src/components/ChatPanel.tsx:1022 — ChatPanel.heredocMarker has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatPanel.TurnStatusRow (cyclomatic 20) · ×1
  • ChatPanel.TurnStatusRow (cyclomatic 20) ui/src/components/ChatPanel.tsx:2627 — ChatPanel.TurnStatusRow has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 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.
D1 · Cyclomatic Complexity · ChatPanel.renderParts (cyclomatic 20) · ×1
  • ChatPanel.renderParts (cyclomatic 20) ui/src/components/ChatPanel.tsx:4109 — ChatPanel.renderParts has cyclomatic complexity 20 (threshold 15). Of this number, 16 points are the body's own statements and 4 belong to 4 function items 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.
D1 · Cyclomatic Complexity · ReproducePage.ReproducePage (cyclomatic 20) · ×1
  • ReproducePage.ReproducePage (cyclomatic 20) ui/src/components/ReproducePage.tsx:19 — ReproducePage.ReproducePage has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 41, 50, 36). 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.
D1 · Cyclomatic Complexity · SshHostReader · ×1
  • SshHostReader::read_file (cyclomatic 19) src/commands/up/compute_settings.rs:489 — SshHostReader::read_file has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · zcode-auth.check (cyclomatic 19) · ×1
  • zcode-auth.check (cyclomatic 19) src/local/harness/acp/zcode-auth.cjs:5 — zcode-auth.check has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · remarkFigures.remarkFigures.transform · ×1
  • remarkFigures.remarkFigures.transform::visit (cyclomatic 19) ui/src/remarkFigures.ts:37 — remarkFigures.remarkFigures.transform::visit has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CodeTab.CodeTab (cyclomatic 19) · ×1
  • CodeTab.CodeTab (cyclomatic 19) ui/src/components/CodeTab.tsx:23 — CodeTab.CodeTab has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 4 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.
D1 · Cyclomatic Complexity · ResearchCards.RunCard (cyclomatic 19) · ×1
  • ResearchCards.RunCard (cyclomatic 19) ui/src/components/ResearchCards.tsx:136 — ResearchCards.RunCard has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · SettingsPage.TargetTile (cyclomatic 19) · ×1
  • SettingsPage.TargetTile (cyclomatic 19) ui/src/components/SettingsPage.tsx:2879 — SettingsPage.TargetTile has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Slurm · ×1
  • Slurm::observe (cyclomatic 18) src/engine/adapters/slurm.rs:219 — Slurm::observe has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RemoteRun · ×1
  • RemoteRun::from_backend (cyclomatic 18) src/jobs/ssh/cleanup.rs:43 — RemoteRun::from_backend has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · markdownTarget.resolveMarkdownTarget (cyclomatic 18) · ×1
  • markdownTarget.resolveMarkdownTarget (cyclomatic 18) ui/src/markdownTarget.ts:17 — markdownTarget.resolveMarkdownTarget has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelPicker.ModelPicker · ×1
  • ModelPicker.ModelPicker::moveFocus (cyclomatic 18) ui/src/components/ModelPicker.tsx:576 — ModelPicker.ModelPicker::moveFocus 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. This shape REPEATS in the file: one other method here (ModelPicker.ModelPicker) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Md.replaceMentions (cyclomatic 18) · ×1
  • Md.replaceMentions (cyclomatic 18) REDACTED:300 — Md.replaceMentions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · experimentLineageModel.layoutLineage (cyclomatic 18) · ×1
  • experimentLineageModel.layoutLineage (cyclomatic 18) ui/src/components/experimentLineageModel.ts:211 — experimentLineageModel.layoutLineage has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (visit, a function literal at line 232, lanesNeeded, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AccountChip.LoginSession (cyclomatic 18) · ×1
  • AccountChip.LoginSession (cyclomatic 18) ui/src/components/AccountChip.tsx:158 — AccountChip.LoginSession has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 199, 178, 194, …). 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.
D1 · Cyclomatic Complexity · SettingsPage.OverleafCard (cyclomatic 18) · ×1
  • SettingsPage.OverleafCard (cyclomatic 18) ui/src/components/SettingsPage.tsx:4334 — SettingsPage.OverleafCard has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Usage.PlanRows (cyclomatic 18) · ×1
  • Usage.PlanRows (cyclomatic 18) ui/src/components/Usage.tsx:129 — Usage.PlanRows has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · ChatPanel.ToolRow (cyclomatic 18) · ×1
  • ChatPanel.ToolRow (cyclomatic 18) ui/src/components/ChatPanel.tsx:2700 — ChatPanel.ToolRow has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SkillsTab.SkillsCard (cyclomatic 18) · ×1
  • SkillsTab.SkillsCard (cyclomatic 18) ui/src/components/SkillsTab.tsx:341 — SkillsTab.SkillsCard has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 3 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.
D1 · Cyclomatic Complexity · CsvTable.CsvTable (cyclomatic 18) · ×1
  • CsvTable.CsvTable (cyclomatic 18) ui/src/components/CsvTable.tsx:81 — CsvTable.CsvTable has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 202, 131, 162, …). 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.
D1 · Cyclomatic Complexity · App.App · ×1
  • App.App::renderContentTab (cyclomatic 18) ui/src/App.tsx:1915 — App.App::renderContentTab has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (App.App) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · check (cyclomatic 18) · ×1
  • check (cyclomatic 18) src/local/harness/acp/deepseek-auth.cjs:14 — check has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · OpenCode · ×1
  • OpenCode::detect_at (cyclomatic 17) src/local/harness/opencode.rs:56 — OpenCode::detect_at 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.
D1 · Cyclomatic Complexity · DatabaseLease · ×1
  • DatabaseLease::acquire (cyclomatic 17) src/local/opencode_db.rs:481 — DatabaseLease::acquire has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runDisplay.runDisplay (cyclomatic 17) · ×1
  • runDisplay.runDisplay (cyclomatic 17) ui/src/runDisplay.ts:64 — runDisplay.runDisplay has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useProjectWorkspace.createProjectPersistence.save (cyclomatic 17) · ×1
  • useProjectWorkspace.createProjectPersistence.save (cyclomatic 17) ui/src/useProjectWorkspace.ts:117 — useProjectWorkspace.createProjectPersistence.save 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.
D1 · Cyclomatic Complexity · RemoteStopDialog.RemoteStopDialog (cyclomatic 17) · ×1
  • RemoteStopDialog.RemoteStopDialog (cyclomatic 17) ui/src/components/RemoteStopDialog.tsx:9 — RemoteStopDialog.RemoteStopDialog has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UpdateBanner.useRestartApp.restart (cyclomatic 17) · ×1
  • UpdateBanner.useRestartApp.restart (cyclomatic 17) ui/src/components/UpdateBanner.tsx:83 — UpdateBanner.useRestartApp.restart has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 88, retired). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ChatPanel.AnnotationsPopover (cyclomatic 17) · ×1
  • ChatPanel.AnnotationsPopover (cyclomatic 17) ui/src/components/ChatPanel.tsx:712 — ChatPanel.AnnotationsPopover has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 4 function items 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.
D1 · Cyclomatic Complexity · ChatPanel.commandReadTarget (cyclomatic 17) · ×1
  • ChatPanel.commandReadTarget (cyclomatic 17) ui/src/components/ChatPanel.tsx:1132 — ChatPanel.commandReadTarget has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenSharedProject.PickFolder (cyclomatic 17) · ×1
  • OpenSharedProject.PickFolder (cyclomatic 17) ui/src/components/OpenSharedProject.tsx:41 — OpenSharedProject.PickFolder has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, 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.
D1 · Cyclomatic Complexity · ClaudeClient · ×1
  • ClaudeClient::compact (cyclomatic 16) src/local/claude.rs:403 — ClaudeClient::compact has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · helper.dispatch (cyclomatic 16) · ×1
  • helper.dispatch (cyclomatic 16) REDACTED:181 — helper.dispatch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · orx-chart.html.sliceRows (cyclomatic 16) · ×1
  • orx-chart.html.sliceRows (cyclomatic 16) agent-skills/orx-figures/assets/orx-chart.html:79 — orx-chart.html.sliceRows has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function items 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.
D1 · Cyclomatic Complexity · desktop_zoom.window.addEventListener("keydown") (cyclomatic 16) · ×1
  • desktop_zoom.window.addEventListener("keydown") (cyclomatic 16) REDACTED:19 — desktop_zoom.window.addEventListener("keydown") has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalModelSetup.LocalModelGuide (cyclomatic 16) · ×1
  • LocalModelSetup.LocalModelGuide (cyclomatic 16) ui/src/components/LocalModelSetup.tsx:231 — LocalModelSetup.LocalModelGuide has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 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.
D1 · Cyclomatic Complexity · AddAgentDialog.canConfigureHarness (cyclomatic 16) · ×1
  • AddAgentDialog.canConfigureHarness (cyclomatic 16) ui/src/components/AddAgentDialog.tsx:41 — AddAgentDialog.canConfigureHarness has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · FileReference.FileReference (cyclomatic 16) · ×1
  • FileReference.FileReference (cyclomatic 16) ui/src/components/FileReference.tsx:109 — FileReference.FileReference has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · keyboardNavigation.navigateKeyboardRow (cyclomatic 16) · ×1
  • keyboardNavigation.navigateKeyboardRow (cyclomatic 16) ui/src/keyboardNavigation.ts:46 — keyboardNavigation.navigateKeyboardRow has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AgentMessageCard.SentCard (cyclomatic 16) · ×1
  • AgentMessageCard.SentCard (cyclomatic 16) ui/src/components/AgentMessageCard.tsx:61 — AgentMessageCard.SentCard 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.
D1 · Cyclomatic Complexity · markdownLivePreview.findMathTokens (cyclomatic 16) · ×1
  • markdownLivePreview.findMathTokens (cyclomatic 16) ui/src/markdownLivePreview.ts:129 — markdownLivePreview.findMathTokens has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExperimentRunBanner.RunRow (cyclomatic 16) · ×1
  • ExperimentRunBanner.RunRow (cyclomatic 16) ui/src/components/ExperimentRunBanner.tsx:18 — ExperimentRunBanner.RunRow has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SettingsPage.SettingsView (cyclomatic 16) · ×1
  • SettingsPage.SettingsView (cyclomatic 16) ui/src/components/SettingsPage.tsx:4973 — SettingsPage.SettingsView has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 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.
D1 · Cyclomatic Complexity · StatusStrip.UsagePanel (cyclomatic 16) · ×1
  • StatusStrip.UsagePanel (cyclomatic 16) ui/src/components/StatusStrip.tsx:160 — StatusStrip.UsagePanel has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 3 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.
D1 · Cyclomatic Complexity · ChatPanel.resolvePosixPath (cyclomatic 16) · ×1
  • ChatPanel.resolvePosixPath (cyclomatic 16) ui/src/components/ChatPanel.tsx:1186 — ChatPanel.resolvePosixPath has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChatPanel.SubagentTranscript (cyclomatic 16) · ×1
  • ChatPanel.SubagentTranscript (cyclomatic 16) ui/src/components/ChatPanel.tsx:4296 — ChatPanel.SubagentTranscript has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs 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.
D1 · Cyclomatic Complexity · ChatPanel.useTranscriptAnnouncement (cyclomatic 16) · ×1
  • ChatPanel.useTranscriptAnnouncement (cyclomatic 16) ui/src/components/ChatPanel.tsx:4506 — ChatPanel.useTranscriptAnnouncement has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 4514, 4540, 4520, …). 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.
D1 · Cyclomatic Complexity · PdfPreview.PdfPreview (cyclomatic 16) · ×1
  • PdfPreview.PdfPreview (cyclomatic 16) ui/src/components/PdfPreview.tsx:54 — PdfPreview.PdfPreview has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 79, a function literal at line 234, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · csv.parseCsv (cyclomatic 16) · ×1
  • csv.parseCsv (cyclomatic 16) ui/src/csv.ts:23 — csv.parseCsv has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 16) · ×1
  • (anonymous) (cyclomatic 16) REDACTED:19 — (anonymous) has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D10 · Test Quality · No assertions · ×1
  • No assertions: aggregate accepts intentional skips and successful selected jobs scripts/ci-changes.test.mjs:55 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · ChatPanel.ChatPanel (cognitive 287) · ×1
  • ChatPanel.ChatPanel (cognitive 287) ui/src/components/ChatPanel.tsx:5485 — ChatPanel.ChatPanel has cognitive complexity 287 (threshold 15). Drivers by points: if/else 278 (368 pts), ternaries 195 (310 pts), boolean chains 301, error handling 21 (26 pts), loops 6 (7 pts), match/switch 2 (nesting depth added 211). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 6 other methods here (ChatPanel.ChatPanel::selectModel, ChatPanel.ChatPanel::runComposerCommand, ChatPanel.ChatPanel::setGoal, …) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ChatPanel.computeToolActivity (cognitive 257) · ×1
  • ChatPanel.computeToolActivity (cognitive 257) ui/src/components/ChatPanel.tsx:1545 — ChatPanel.computeToolActivity has cognitive complexity 257 (threshold 15). Drivers by points: ternaries 50 (140 pts), if/else 47 (91 pts), boolean chains 25, match/switch 1 (nesting depth added 134). Of this number, 240 points are the body's own statements and 17 belong to 8 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AddAgentDialog.AddAgentDialog (cognitive 255) · ×1
  • AddAgentDialog.AddAgentDialog (cognitive 255) ui/src/components/AddAgentDialog.tsx:270 — AddAgentDialog.AddAgentDialog has cognitive complexity 255 (threshold 15). Drivers by points: boolean chains 127, ternaries 48 (79 pts), if/else 48, error handling 1 (nesting depth added 31). Of this number, 125 points are the body's own statements and 130 belong to 41 function items 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.
D2 · Cognitive Complexity · NewProjectForm.NewProjectForm (cognitive 173) · ×1
  • NewProjectForm.NewProjectForm (cognitive 173) ui/src/components/NewProjectForm.tsx:63 — NewProjectForm.NewProjectForm has cognitive complexity 173 (threshold 15). Drivers by points: boolean chains 89, ternaries 35 (55 pts), if/else 23 (26 pts), error handling 3 (nesting depth added 23). Of this number, 122 points are the body's own statements and 51 belong to 10 function items 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.
D2 · Cognitive Complexity · FileViewer.FileViewer (cognitive 153) · ×1
  • FileViewer.FileViewer (cognitive 153) ui/src/components/FileViewer.tsx:142 — FileViewer.FileViewer has cognitive complexity 153 (threshold 15). Drivers by points: ternaries 36 (107 pts), boolean chains 91, if/else 39 (55 pts), error handling 2 (nesting depth added 87). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (FileViewer.FileViewer::save) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · App.App (cognitive 142) · ×1
  • App.App (cognitive 142) ui/src/App.tsx:254 — App.App has cognitive complexity 142 (threshold 15). Drivers by points: if/else 201 (242 pts), boolean chains 205, ternaries 77 (90 pts), loops 12 (15 pts), error handling 3 (nesting depth added 57). 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. This shape REPEATS in the file: one other method here (App.App::renderContentTab) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModelPicker.ModelPicker (cognitive 138) · ×1
  • ModelPicker.ModelPicker (cognitive 138) ui/src/components/ModelPicker.tsx:300 — ModelPicker.ModelPicker has cognitive complexity 138 (threshold 15). Drivers by points: boolean chains 70, ternaries 37 (47 pts), if/else 21 (nesting depth added 10). Of this number, 78 points are the body's own statements and 60 belong to 33 function items 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.
D2 · Cognitive Complexity · ChatSearch.ChatSearch (cognitive 126) · ×1
  • ChatSearch.ChatSearch (cognitive 126) ui/src/components/ChatSearch.tsx:21 — ChatSearch.ChatSearch has cognitive complexity 126 (threshold 15). Drivers by points: boolean chains 48, ternaries 20 (46 pts), if/else 27 (32 pts) (nesting depth added 31). Of this number, 70 points are the body's own statements and 56 belong to 13 function items 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.
D2 · Cognitive Complexity · Onboarding.Onboarding (cognitive 125) · ×1
  • Onboarding.Onboarding (cognitive 125) ui/src/components/Onboarding.tsx:64 — Onboarding.Onboarding has cognitive complexity 125 (threshold 15). Drivers by points: ternaries 30 (69 pts), boolean chains 41, if/else 13, error handling 2 (nesting depth added 39). Of this number, 87 points are the body's own statements and 38 belong to 20 function items 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.
D2 · Cognitive Complexity · ChatPanel.Transcript (cognitive 120) · ×1
  • ChatPanel.Transcript (cognitive 120) ui/src/components/ChatPanel.tsx:4590 — ChatPanel.Transcript has cognitive complexity 120 (threshold 15). Drivers by points: if/else 36 (45 pts), boolean chains 38, ternaries 25 (30 pts), loops 6 (7 pts) (nesting depth added 15). Most of this is not in the body itself: 4 of the 120 points are its own statements and the rest belongs to 25 function literals inside it that branch (lines 4918, 4935, 4705, …). 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.
D2 · Cognitive Complexity · SettingsPage.SshSection (cognitive 118) · ×1
  • SettingsPage.SshSection (cognitive 118) ui/src/components/SettingsPage.tsx:1747 — SettingsPage.SshSection has cognitive complexity 118 (threshold 15). Drivers by points: ternaries 23 (83 pts), boolean chains 25, if/else 4 (9 pts), error handling 1 (nesting depth added 65). Most of this is not in the body itself: 6 of the 118 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 1848, hostAction, a function literal at line 1914, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · orx-chart.html.draw (cognitive 106) · ×1
  • orx-chart.html.draw (cognitive 106) agent-skills/orx-figures/assets/orx-chart.html:112 — orx-chart.html.draw has cognitive complexity 106 (threshold 15). Drivers by points: ternaries 33 (56 pts), boolean chains 27, if/else 14 (17 pts), loops 4 (6 pts) (nesting depth added 28). Of this number, 51 points are the body's own statements and 55 belong to 13 function items 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.
D2 · Cognitive Complexity · SettingsPage.OpenResearchSection (cognitive 83) · ×1
  • SettingsPage.OpenResearchSection (cognitive 83) ui/src/components/SettingsPage.tsx:2502 — SettingsPage.OpenResearchSection has cognitive complexity 83 (threshold 15). Drivers by points: ternaries 17 (56 pts), boolean chains 27 (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · orx_chart.validate_views (cognitive 82) · ×1
  • orx_chart.validate_views (cognitive 82) agent-skills/orx-figures/assets/orx_chart.py:10 — orx_chart.validate_views has cognitive complexity 82 (threshold 15). Drivers by points: if/else 15 (47 pts), boolean chains 13, ternaries 3 (13 pts), loops 4 (9 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LibraryPicker.SignedInLibraryPicker (cognitive 77) · ×1
  • LibraryPicker.SignedInLibraryPicker (cognitive 77) ui/src/components/LibraryPicker.tsx:32 — LibraryPicker.SignedInLibraryPicker has cognitive complexity 77 (threshold 15). Drivers by points: ternaries 18 (65 pts), boolean chains 7, if/else 3 (5 pts) (nesting depth added 49). Of this number, 47 points are the body's own statements and 30 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · markdownLivePreview.collectFormatting (cognitive 75) · ×1
  • markdownLivePreview.collectFormatting (cognitive 75) ui/src/markdownLivePreview.ts:254 — markdownLivePreview.collectFormatting has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (43 pts), ternaries 9 (21 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 33). None of this is in the body itself: all 75 points belong to one function literal inside it that branches (line 257). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ModelList.ModelList (cognitive 66) · ×1
  • ModelList.ModelList (cognitive 66) ui/src/components/ModelList.tsx:126 — ModelList.ModelList has cognitive complexity 66 (threshold 15). Drivers by points: boolean chains 23, if/else 19 (22 pts), ternaries 15 (19 pts), loops 2 (nesting depth added 7). Of this number, 17 points are the body's own statements and 49 belong to 20 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ChatPanel.PromptCard (cognitive 66) · ×1
  • ChatPanel.PromptCard (cognitive 66) ui/src/components/ChatPanel.tsx:3242 — ChatPanel.PromptCard has cognitive complexity 66 (threshold 15). Drivers by points: ternaries 12 (32 pts), boolean chains 21, if/else 9 (13 pts) (nesting depth added 24). Of this number, 64 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ChatPanel.SessionRow (cognitive 63) · ×1
  • ChatPanel.SessionRow (cognitive 63) ui/src/components/ChatPanel.tsx:5117 — ChatPanel.SessionRow has cognitive complexity 63 (threshold 15). Drivers by points: if/else 27 (31 pts), boolean chains 23, ternaries 9 (nesting depth added 4). Of this number, 17 points are the body's own statements and 46 belong to 16 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingsPage.SlurmSection (cognitive 62) · ×1
  • SettingsPage.SlurmSection (cognitive 62) ui/src/components/SettingsPage.tsx:2034 — SettingsPage.SlurmSection has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 13 (29 pts), boolean chains 21, if/else 6 (11 pts), error handling 1 (nesting depth added 21). Of this number, 37 points are the body's own statements and 25 belong to 8 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ComposerEditor.ComposerEditor (cognitive 60) · ×1
  • ComposerEditor.ComposerEditor (cognitive 60) ui/src/components/ComposerEditor.tsx:346 — ComposerEditor.ComposerEditor has cognitive complexity 60 (threshold 15). Drivers by points: if/else 29, boolean chains 16, ternaries 12 (14 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 60 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 598, a function literal at line 548, a function literal at line 667, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ChatPanel.commandRunIds (cognitive 60) · ×1
  • ChatPanel.commandRunIds (cognitive 60) ui/src/components/ChatPanel.tsx:1430 — ChatPanel.commandRunIds has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (29 pts), ternaries 6 (16 pts), loops 6 (11 pts), boolean chains 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TurnCtx · ×1
  • TurnCtx::apply_target_events (cognitive 59) src/local/chat/mod.rs:8922 — TurnCtx::apply_target_events has cognitive complexity 59 (threshold 15). Drivers by points: if/else 11 (51 pts), loops 2 (8 pts) (nesting depth added 46). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · orxCommand.shellWords (cognitive 58) · ×1
  • orxCommand.shellWords (cognitive 58) REDACTED:41 — orxCommand.shellWords has cognitive complexity 58 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 12, ternaries 1 (2 pts), loops 1 (nesting depth added 25). Of this number, 54 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.
D2 · Cognitive Complexity · AcpAuthDialog.AcpAuth (cognitive 58) · ×1
  • AcpAuthDialog.AcpAuth (cognitive 58) ui/src/components/AcpAuthDialog.tsx:32 — AcpAuthDialog.AcpAuth has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 13 (46 pts), boolean chains 20, if/else 9 (10 pts), error handling 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (AcpAuthDialog.AcpAuth::verify) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · RemoteRuntime.RemoteSetup (cognitive 58) · ×1
  • RemoteRuntime.RemoteSetup (cognitive 58) ui/src/RemoteRuntime.tsx:159 — RemoteRuntime.RemoteSetup has cognitive complexity 58 (threshold 15). Drivers by points: ternaries 11 (35 pts), boolean chains 21, error handling 1, if/else 1 (nesting depth added 24). Of this number, 53 points are the body's own statements and 5 belong to 5 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AgentIcon.AgentIconPicker (cognitive 56) · ×1
  • AgentIcon.AgentIconPicker (cognitive 56) ui/src/components/AgentIcon.tsx:103 — AgentIcon.AgentIconPicker has cognitive complexity 56 (threshold 15). Drivers by points: ternaries 17 (46 pts), boolean chains 6, if/else 1 (4 pts) (nesting depth added 32). Of this number, 36 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LocalPlane · ×1
  • LocalPlane::experiment_status (cognitive 54) src/plane/local_plane.rs:135 — LocalPlane::experiment_status has cognitive complexity 54 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 6 (16 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorktreeTab.WorktreeTab (cognitive 54) · ×1
  • WorktreeTab.WorktreeTab (cognitive 54) ui/src/components/WorktreeTab.tsx:45 — WorktreeTab.WorktreeTab has cognitive complexity 54 (threshold 15). Drivers by points: ternaries 19 (30 pts), boolean chains 19, if/else 4, error handling 1 (nesting depth added 11). Of this number, 44 points are the body's own statements and 10 belong to 6 function items 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.
D2 · Cognitive Complexity · UsageMenu.UsageMenu (cognitive 53) · ×1
  • UsageMenu.UsageMenu (cognitive 53) ui/src/components/UsageMenu.tsx:28 — UsageMenu.UsageMenu has cognitive complexity 53 (threshold 15). Drivers by points: boolean chains 29, ternaries 18 (21 pts), if/else 3 (nesting depth added 3). Of this number, 46 points are the body's own statements and 7 belong to 5 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.
D2 · Cognitive Complexity · OverleafPanel.OverleafPanel (cognitive 51) · ×1
  • OverleafPanel.OverleafPanel (cognitive 51) ui/src/components/OverleafPanel.tsx:239 — OverleafPanel.OverleafPanel has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 19 (31 pts), boolean chains 15, if/else 4, error handling 1 (nesting depth added 12). Of this number, 40 points are the body's own statements and 11 belong to 3 function items 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.
D2 · Cognitive Complexity · ExpHoverCard.ExpHoverCard (cognitive 50) · ×1
  • ExpHoverCard.ExpHoverCard (cognitive 50) ui/src/components/ExpHoverCard.tsx:131 — ExpHoverCard.ExpHoverCard has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 16 (19 pts), boolean chains 18, if/else 9 (10 pts), loops 2, error handling 1 (nesting depth added 4). Of this number, 43 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · workspaceState.parsePane (cognitive 48) · ×1
  • workspaceState.parsePane (cognitive 48) ui/src/workspaceState.ts:54 — workspaceState.parsePane has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 8 (15 pts), boolean chains 14, match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenResearch · ×1
  • OpenResearch::inspect (cognitive 47) src/engine/adapters/openresearch.rs:330 — OpenResearch::inspect has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (37 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.K8sSection (cognitive 47) · ×1
  • SettingsPage.K8sSection (cognitive 47) ui/src/components/SettingsPage.tsx:1268 — SettingsPage.K8sSection has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 11 (27 pts), boolean chains 15, if/else 3, error handling 2 (nesting depth added 16). Of this number, 33 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · SessionHoverCard.SessionHoverCard (cognitive 46) · ×1
  • SessionHoverCard.SessionHoverCard (cognitive 46) ui/src/components/SessionHoverCard.tsx:78 — SessionHoverCard.SessionHoverCard has cognitive complexity 46 (threshold 15). Drivers by points: ternaries 10 (19 pts), boolean chains 16, if/else 9 (11 pts) (nesting depth added 11). Of this number, 26 points are the body's own statements and 20 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.UpdatesTab (cognitive 45) · ×1
  • SettingsPage.UpdatesTab (cognitive 45) ui/src/components/SettingsPage.tsx:3859 — SettingsPage.UpdatesTab has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 12 (29 pts), boolean chains 10, if/else 5, error handling 1 (nesting depth added 17). Of this number, 36 points are the body's own statements and 9 belong to 6 function items 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.
D2 · Cognitive Complexity · orx_figstyle._text_collisions (cognitive 44) · ×1
  • orx_figstyle._text_collisions (cognitive 44) agent-skills/orx-figures/assets/orx_figstyle.py:255 — orx_figstyle._text_collisions has cognitive complexity 44 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 8 (13 pts), boolean chains 5, error handling 2 (3 pts), ternaries 1 (2 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.
D2 · Cognitive Complexity · SettingsPage.GitTab (cognitive 44) · ×1
  • SettingsPage.GitTab (cognitive 44) ui/src/components/SettingsPage.tsx:4414 — SettingsPage.GitTab has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 26, ternaries 7 (13 pts), if/else 5 (nesting depth added 6). Of this number, 35 points are the body's own statements and 9 belong to 4 function items 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.
D2 · Cognitive Complexity · Header.Brand (cognitive 44) · ×1
  • Header.Brand (cognitive 44) ui/src/components/Header.tsx:42 — Header.Brand has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 18 (31 pts), boolean chains 13 (nesting depth added 13). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigureArgs · ×1
  • ConfigureArgs::body (cognitive 43) src/commands/compute.rs:338 — ConfigureArgs::body has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (29 pts), boolean chains 6, loops 4 (5 pts), 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.
D2 · Cognitive Complexity · runDisplay.runNotice (cognitive 43) · ×1
  • runDisplay.runNotice (cognitive 43) ui/src/runDisplay.ts:93 — runDisplay.runNotice has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 7 (17 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelPicker.OptionPicker (cognitive 43) · ×1
  • ModelPicker.OptionPicker (cognitive 43) ui/src/components/ModelPicker.tsx:989 — ModelPicker.OptionPicker has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 20, ternaries 9 (14 pts), if/else 9 (nesting depth added 5). Of this number, 28 points are the body's own statements and 15 belong to 8 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Events.QueryEvents (cognitive 43) · ×1
  • Events.QueryEvents (cognitive 43) ui/src/queries/Events.tsx:18 — Events.QueryEvents has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (23 pts), ternaries 5 (11 pts), boolean chains 9 (nesting depth added 8). Most of this is not in the body itself: 6 of the 43 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 116, 138, 129, …). 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.
D2 · Cognitive Complexity · ResumeDialog.ResumeDialog (cognitive 43) · ×1
  • ResumeDialog.ResumeDialog (cognitive 43) ui/src/components/ResumeDialog.tsx:52 — ResumeDialog.ResumeDialog has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 12 (30 pts), if/else 7 (8 pts), boolean chains 5 (nesting depth added 19). Most of this is not in the body itself: 13 of the 43 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 134, a function literal at line 166, pick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ChatPanel.commandExperimentIds (cognitive 42) · ×1
  • ChatPanel.commandExperimentIds (cognitive 42) ui/src/components/ChatPanel.tsx:1490 — ChatPanel.commandExperimentIds has cognitive complexity 42 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 5 (11 pts), loops 4 (10 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · ChatPanel.ResearchToolRun (cognitive 42) · ×1
  • ChatPanel.ResearchToolRun (cognitive 42) ui/src/components/ChatPanel.tsx:3115 — ChatPanel.ResearchToolRun has cognitive complexity 42 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 4 (10 pts), ternaries 5 (10 pts), boolean chains 8, match/switch 1 (nesting depth added 18). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 3137, 3178, 3217). 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.
D2 · Cognitive Complexity · SettingsPage.VercelSection (cognitive 41) · ×1
  • SettingsPage.VercelSection (cognitive 41) ui/src/components/SettingsPage.tsx:1512 — SettingsPage.VercelSection has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 16 (20 pts), boolean chains 18, if/else 2, error handling 1 (nesting depth added 4). Of this number, 33 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChatPanel.alphaxivActivity (cognitive 41) · ×1
  • ChatPanel.alphaxivActivity (cognitive 41) ui/src/components/ChatPanel.tsx:1967 — ChatPanel.alphaxivActivity has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 19 (36 pts), boolean chains 4, match/switch 1 (nesting depth added 17). Of this number, 35 points are the body's own statements and 6 belong to 4 function items 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.
D2 · Cognitive Complexity · Slurm · ×1
  • Slurm::observe (cognitive 40) src/engine/adapters/slurm.rs:219 — Slurm::observe has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 3 (5 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdownNormalization.normalizeCurrencyDollars (cognitive 40) · ×1
  • markdownNormalization.normalizeCurrencyDollars (cognitive 40) ui/src/markdownNormalization.ts:147 — markdownNormalization.normalizeCurrencyDollars has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 5, loops 5, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceConnection.WorkspaceConnection (cognitive 40) · ×1
  • WorkspaceConnection.WorkspaceConnection (cognitive 40) ui/src/components/WorkspaceConnection.tsx:64 — WorkspaceConnection.WorkspaceConnection has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 19 (30 pts), boolean chains 9, if/else 1 (nesting depth added 11). Of this number, 39 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · ChatPanel.ToolActivityLabel (cognitive 40) · ×1
  • ChatPanel.ToolActivityLabel (cognitive 40) ui/src/components/ChatPanel.tsx:2291 — ChatPanel.ToolActivityLabel has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 18, if/else 9 (11 pts), ternaries 6 (11 pts) (nesting depth added 7). Of this number, 26 points are the body's own statements and 14 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.
D2 · Cognitive Complexity · orx-chart.html.drawDiagram (cognitive 39) · ×1
  • orx-chart.html.drawDiagram (cognitive 39) agent-skills/orx-figures/assets/orx-chart.html:187 — orx-chart.html.drawDiagram has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 4 (8 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 18). Of this number, 33 points are the body's own statements and 6 belong to 3 function items 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.
D2 · Cognitive Complexity · ChatPanel.ToolGroup (cognitive 39) · ×1
  • ChatPanel.ToolGroup (cognitive 39) ui/src/components/ChatPanel.tsx:2816 — ChatPanel.ToolGroup has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 13 (19 pts), boolean chains 14, if/else 4 (6 pts) (nesting depth added 8). Of this number, 36 points are the body's own statements and 3 belong to 3 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.
D2 · Cognitive Complexity · routePages.ProjectsPage (cognitive 38) · ×1
  • routePages.ProjectsPage (cognitive 38) ui/src/routePages.tsx:68 — routePages.ProjectsPage has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 6 (21 pts), boolean chains 11, if/else 1 (6 pts) (nesting depth added 20). Of this number, 26 points are the body's own statements and 12 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · api.createApi.json (cognitive 37) · ×1
  • api.createApi.json (cognitive 37) ui/src/api.ts:2048 — api.createApi.json has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 10, ternaries 2 (6 pts), error handling 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DetailDrawer.TerminalView (cognitive 37) · ×1
  • DetailDrawer.TerminalView (cognitive 37) ui/src/components/DetailDrawer.tsx:93 — DetailDrawer.TerminalView has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 14 (23 pts), boolean chains 11, if/else 3 (nesting depth added 9). Of this number, 33 points are the body's own statements and 4 belong to 4 function items 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.
D2 · Cognitive Complexity · ClaudeCode · ×1
  • ClaudeCode::detect_at (cognitive 36) src/local/harness/claude.rs:1121 — ClaudeCode::detect_at has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (30 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · helper.slurm_status (cognitive 35) · ×1
  • helper.slurm_status (cognitive 35) REDACTED:135 — helper.slurm_status has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dev.parseArgs (cognitive 35) · ×1
  • dev.parseArgs (cognitive 35) dev.ts:116 — dev.parseArgs has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 8). Of this number, 32 points are the body's own statements and 3 belong to 2 function items 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.
D2 · Cognitive Complexity · chatSearch.chatSearchRanges (cognitive 35) · ×1
  • chatSearch.chatSearchRanges (cognitive 35) ui/src/chatSearch.ts:19 — chatSearch.chatSearchRanges has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 8 (12 pts), boolean chains 6, ternaries 1 (nesting depth added 12). Of this number, 34 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.Message (cognitive 35) · ×1
  • ChatPanel.Message (cognitive 35) ui/src/components/ChatPanel.tsx:3595 — ChatPanel.Message has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 17, if/else 9 (17 pts), ternaries 1 (nesting depth added 8). Of this number, 19 points are the body's own statements and 16 belong to 5 function items 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.
D2 · Cognitive Complexity · orx_figstyle._audit (cognitive 34) · ×1
  • orx_figstyle._audit (cognitive 34) agent-skills/orx-figures/assets/orx_figstyle.py:190 — orx_figstyle._audit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dev.main (cognitive 34) · ×1
  • dev.main (cognitive 34) dev.ts:993 — dev.main has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 5 (10 pts), boolean chains 2, match/switch 1 (nesting depth added 14). Of this number, 30 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.
D2 · Cognitive Complexity · files.createFileQueries.resolvedFileQuery (cognitive 34) · ×1
  • files.createFileQueries.resolvedFileQuery (cognitive 34) ui/src/queries/files.ts:102 — files.createFileQueries.resolvedFileQuery has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 12 (21 pts), boolean chains 7, if/else 2 (5 pts), loops 1 (nesting depth added 12). Most of this is not in the body itself: 4 of the 34 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 130, 155, 121, …). 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.
D2 · Cognitive Complexity · useProjectWorkspace.createProjectPersistence.useProjectWorkspace (cognitive 34) · ×1
  • useProjectWorkspace.createProjectPersistence.useProjectWorkspace (cognitive 34) ui/src/useProjectWorkspace.ts:147 — useProjectWorkspace.createProjectPersistence.useProjectWorkspace has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 8, ternaries 1 (3 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 200, 193, 179, …). 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.
D2 · Cognitive Complexity · keyboardNavigation.navigateKeyboardList (cognitive 34) · ×1
  • keyboardNavigation.navigateKeyboardList (cognitive 34) ui/src/keyboardNavigation.ts:3 — keyboardNavigation.navigateKeyboardList has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, ternaries 4 (7 pts) (nesting depth added 6). Of this number, 33 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · chatRendering.questionReplies (cognitive 34) · ×1
  • chatRendering.questionReplies (cognitive 34) ui/src/chatRendering.ts:68 — chatRendering.questionReplies has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 7, loops 4 (6 pts) (nesting depth added 13). Of this number, 33 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OverleafPanel.OverleafButton (cognitive 34) · ×1
  • OverleafPanel.OverleafButton (cognitive 34) ui/src/components/OverleafPanel.tsx:27 — OverleafPanel.OverleafButton has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 9 (22 pts), boolean chains 8, if/else 4 (nesting depth added 13). Of this number, 28 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · ClaudeClient · ×1
  • ClaudeClient::compact (cognitive 33) src/local/claude.rs:403 — ClaudeClient::compact has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 2 (6 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · SettingsPage.HfSection (cognitive 33) · ×1
  • SettingsPage.HfSection (cognitive 33) ui/src/components/SettingsPage.tsx:3302 — SettingsPage.HfSection has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, ternaries 8 (11 pts), error handling 2, if/else 2 (nesting depth added 3). Of this number, 21 points are the body's own statements and 12 belong to 2 function items 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.
D2 · Cognitive Complexity · TreeView.TreeView (cognitive 33) · ×1
  • TreeView.TreeView (cognitive 33) ui/src/components/TreeView.tsx:449 — TreeView.TreeView has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 6 (10 pts), boolean chains 6, loops 4 (nesting depth added 5). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 510, 493, 626, …). 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.
D2 · Cognitive Complexity · Adapter · ×1
  • Adapter::drain_log (cognitive 32) src/engine/adapters/api.rs:431 — Adapter::drain_log has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 5 (13 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.DefaultDestinationEditor (cognitive 32) · ×1
  • SettingsPage.DefaultDestinationEditor (cognitive 32) ui/src/components/SettingsPage.tsx:2695 — SettingsPage.DefaultDestinationEditor has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 14, ternaries 7 (11 pts), if/else 6, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (save, changeBackend, changeFlavor, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SettingsPage.StorageTab (cognitive 32) · ×1
  • SettingsPage.StorageTab (cognitive 32) ui/src/components/SettingsPage.tsx:4592 — SettingsPage.StorageTab has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, ternaries 5 (8 pts), if/else 6, error handling 2 (nesting depth added 3). Of this number, 16 points are the body's own statements and 16 belong to 7 function items 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.
D2 · Cognitive Complexity · ServerDescriptor · ×1
  • ServerDescriptor::live (cognitive 31) src/commands/remote_host.rs:1461 — ServerDescriptor::live has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 3 (6 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · Ssh · ×1
  • Ssh::observe (cognitive 31) src/engine/adapters/ssh.rs:653 — Ssh::observe has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteRuntime.RuntimeRoot (cognitive 31) · ×1
  • RemoteRuntime.RuntimeRoot (cognitive 31) ui/src/RemoteRuntime.tsx:463 — RemoteRuntime.RuntimeRoot has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 13, if/else 11 (13 pts), ternaries 3 (5 pts) (nesting depth added 4). Of this number, 18 points are the body's own statements and 13 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChatPanel.heredocMarker (cognitive 31) · ×1
  • ChatPanel.heredocMarker (cognitive 31) ui/src/components/ChatPanel.tsx:1022 — ChatPanel.heredocMarker has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · launch (cognitive 31) · ×1
  • launch (cognitive 31) src/local/acp/zcode-runtime.cjs:62 — launch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 1 (4 pts), boolean chains 3, error handling 2 (3 pts), other 3 (nesting depth added 12). Most of this is not in the body itself: 8 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (ensureBackend::request, ensureBackend::providerRuntimeHeadersResponder, a function literal at line 113, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · workspaceTabs.restoreWorkspace (cognitive 30) · ×1
  • workspaceTabs.restoreWorkspace (cognitive 30) ui/src/workspaceTabs.ts:51 — workspaceTabs.restoreWorkspace has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (29 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceTools.WorkspaceTools (cognitive 30) · ×1
  • WorkspaceTools.WorkspaceTools (cognitive 30) ui/src/components/WorkspaceTools.tsx:26 — WorkspaceTools.WorkspaceTools has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 11 (19 pts), boolean chains 11 (nesting depth added 8). Of this number, 16 points are the body's own statements and 14 belong to 6 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.
D2 · Cognitive Complexity · AccountChip.AccountChip (cognitive 30) · ×1
  • AccountChip.AccountChip (cognitive 30) ui/src/components/AccountChip.tsx:60 — AccountChip.AccountChip has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 12 (17 pts), boolean chains 12, if/else 1 (nesting depth added 5). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.shellCommandSegments (cognitive 30) · ×1
  • ChatPanel.shellCommandSegments (cognitive 30) ui/src/components/ChatPanel.tsx:1234 — ChatPanel.shellCommandSegments has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 9, loops 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (ChatPanel.shellCommandSegments::scanSubstitution) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ArtifactsTab.ArtifactsTab (cognitive 30) · ×1
  • ArtifactsTab.ArtifactsTab (cognitive 30) ui/src/components/ArtifactsTab.tsx:508 — ArtifactsTab.ArtifactsTab has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10, ternaries 8 (9 pts), boolean chains 8, error handling 3 (nesting depth added 1). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 585, reveal, a function literal at line 608, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ExperimentsTable.ExperimentsTable (cognitive 30) · ×1
  • ExperimentsTable.ExperimentsTable (cognitive 30) ui/src/components/ExperimentsTable.tsx:17 — ExperimentsTable.ExperimentsTable has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 8 (9 pts), boolean chains 7, loops 3, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 10 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 110, requestCancel, a function literal at line 54, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · App.parseFilePath (cognitive 30) · ×1
  • App.parseFilePath (cognitive 30) ui/src/App.tsx:160 — App.parseFilePath has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (13 pts), ternaries 8 (13 pts), boolean chains 4 (nesting depth added 6). Of this number, 28 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WindowMenu.WindowMenu (cognitive 30) · ×1
  • WindowMenu.WindowMenu (cognitive 30) ui/src/components/WindowMenu.tsx:11 — WindowMenu.WindowMenu has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 11, ternaries 5 (6 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 85, 27, 78, …). 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.
D2 · Cognitive Complexity · HtmlPreview.HtmlPreview (cognitive 29) · ×1
  • HtmlPreview.HtmlPreview (cognitive 29) REDACTED:161 — HtmlPreview.HtmlPreview has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 9, ternaries 3, loops 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 189, 257, 253, …). 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.
D2 · Cognitive Complexity · Md.replaceMentions (cognitive 29) · ×1
  • Md.replaceMentions (cognitive 29) REDACTED:300 — Md.replaceMentions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Md.Md (cognitive 29) · ×1
  • Md.Md (cognitive 29) REDACTED:457 — Md.Md has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 10, if/else 6 (7 pts) (nesting depth added 4). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 510, 478, 499, …). 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.
D2 · Cognitive Complexity · RunContactNotice.RunContactNotice (cognitive 29) · ×1
  • RunContactNotice.RunContactNotice (cognitive 29) ui/src/components/RunContactNotice.tsx:78 — RunContactNotice.RunContactNotice has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 22, ternaries 4 (5 pts), error handling 1, if/else 1 (nesting depth added 1). Of this number, 26 points are the body's own statements and 3 belong to one function item 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.
D2 · Cognitive Complexity · AcpHarnessDialog.AcpHarnessDialog · ×1
  • AcpHarnessDialog.AcpHarnessDialog::run (cognitive 29) ui/src/components/AcpHarnessDialog.tsx:59 — AcpHarnessDialog.AcpHarnessDialog::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 3 (7 pts), boolean chains 4, error handling 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. This shape REPEATS in the file: one other method here (AcpHarnessDialog.AcpHarnessDialog) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · zcode-auth.check (cognitive 28) · ×1
  • zcode-auth.check (cognitive 28) src/local/harness/acp/zcode-auth.cjs:5 — zcode-auth.check has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 4 (8 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 10). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · remarkFigures.remarkFigures.transform · ×1
  • remarkFigures.remarkFigures.transform::visit (cognitive 28) ui/src/remarkFigures.ts:37 — remarkFigures.remarkFigures.transform::visit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (9 pts), boolean chains 5, loops 3 (4 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.
D2 · Cognitive Complexity · HarnessSetupDialog.SetupRun (cognitive 28) · ×1
  • HarnessSetupDialog.SetupRun (cognitive 28) ui/src/components/HarnessSetupDialog.tsx:274 — HarnessSetupDialog.SetupRun has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 12, ternaries 5 (11 pts), if/else 5 (nesting depth added 6). Of this number, 20 points are the body's own statements and 8 belong to 3 function items 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.
D2 · Cognitive Complexity · fileMentions.matchFileMentions (cognitive 28) · ×1
  • fileMentions.matchFileMentions (cognitive 28) ui/src/fileMentions.ts:64 — fileMentions.matchFileMentions has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 4 (10 pts), boolean chains 5, loops 1 (nesting depth added 14). Of this number, 26 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteRun · ×1
  • RemoteRun::from_backend (cognitive 27) src/jobs/ssh/cleanup.rs:43 — RemoteRun::from_backend has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 3 (5 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · events.createEvents.useOrxEventStream (cognitive 27) · ×1
  • events.createEvents.useOrxEventStream (cognitive 27) ui/src/events.ts:282 — events.createEvents.useOrxEventStream has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, boolean chains 6, error handling 1. None of this is in the body itself: all 27 points belong to 24 function literals inside it that branch (lines 300, 413, 426, …). 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.
D2 · Cognitive Complexity · ExperimentLineage.Rail (cognitive 27) · ×1
  • ExperimentLineage.Rail (cognitive 27) ui/src/components/ExperimentLineage.tsx:118 — ExperimentLineage.Rail has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 9 (10 pts), boolean chains 4, loops 2 (nesting depth added 6). Of this number, 15 points are the body's own statements and 12 belong to 2 function items 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.
D2 · Cognitive Complexity · markdownLivePreview.findMathTokens (cognitive 27) · ×1
  • markdownLivePreview.findMathTokens (cognitive 27) ui/src/markdownLivePreview.ts:129 — markdownLivePreview.findMathTokens has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.AssistantTurn (cognitive 27) · ×1
  • ChatPanel.AssistantTurn (cognitive 27) ui/src/components/ChatPanel.tsx:3964 — ChatPanel.AssistantTurn has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 12, ternaries 9 (12 pts), if/else 3 (nesting depth added 3). Of this number, 21 points are the body's own statements and 6 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SshHostReader · ×1
  • SshHostReader::read_file (cognitive 26) src/commands/up/compute_settings.rs:489 — SshHostReader::read_file has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 5 (9 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CodeTab.CodeTab (cognitive 26) · ×1
  • CodeTab.CodeTab (cognitive 26) ui/src/components/CodeTab.tsx:23 — CodeTab.CodeTab has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 10 (18 pts), boolean chains 6, if/else 2 (nesting depth added 8). Of this number, 18 points are the body's own statements and 8 belong to 4 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.
D2 · Cognitive Complexity · ShareProjectDialog.ShareProjectDialog (cognitive 26) · ×1
  • ShareProjectDialog.ShareProjectDialog (cognitive 26) ui/src/components/ShareProjectDialog.tsx:25 — ShareProjectDialog.ShareProjectDialog has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, ternaries 7 (12 pts) (nesting depth added 5). Of this number, 24 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.
D2 · Cognitive Complexity · AcpHarnessDialog.AcpHarnessDialog (cognitive 26) · ×1
  • AcpHarnessDialog.AcpHarnessDialog (cognitive 26) ui/src/components/AcpHarnessDialog.tsx:15 — AcpHarnessDialog.AcpHarnessDialog has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 25, if/else 15 (21 pts), ternaries 10 (15 pts), error handling 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. This shape REPEATS in the file: one other method here (AcpHarnessDialog.AcpHarnessDialog::run) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SettingsPage.RaySection (cognitive 26) · ×1
  • SettingsPage.RaySection (cognitive 26) ui/src/components/SettingsPage.tsx:2373 — SettingsPage.RaySection has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 7 (12 pts), boolean chains 10, error handling 2, if/else 2 (nesting depth added 5). Of this number, 14 points are the body's own statements and 12 belong to 3 function items 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.
D2 · Cognitive Complexity · ChatPanel.markdownFromSelectionNode (cognitive 26) · ×1
  • ChatPanel.markdownFromSelectionNode (cognitive 26) ui/src/components/ChatPanel.tsx:434 — ChatPanel.markdownFromSelectionNode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, ternaries 3 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChatPanel.commandReadTarget (cognitive 26) · ×1
  • ChatPanel.commandReadTarget (cognitive 26) ui/src/components/ChatPanel.tsx:1132 — ChatPanel.commandReadTarget has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AddAgentDialog.OAuthPanel (cognitive 25) · ×1
  • AddAgentDialog.OAuthPanel (cognitive 25) ui/src/components/AddAgentDialog.tsx:1051 — AddAgentDialog.OAuthPanel has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 6, if/else 6, error handling 1 (nesting depth added 4). Of this number, 13 points are the body's own statements and 12 belong to 4 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HtmlPreview.assembleDocument (cognitive 25) · ×1
  • HtmlPreview.assembleDocument (cognitive 25) REDACTED:85 — HtmlPreview.assembleDocument has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.AgentList (cognitive 25) · ×1
  • SettingsPage.AgentList (cognitive 25) ui/src/components/SettingsPage.tsx:419 — SettingsPage.AgentList has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 92, ternaries 44 (68 pts), if/else 6, error handling 1 (nesting depth added 24). 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. This shape REPEATS in the file: 3 other methods here (SettingsPage.AgentList::harnessRow, SettingsPage.AgentList::providerRow, SettingsPage.AgentList::foundRow) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · SettingsPage.ComputeTab (cognitive 25) · ×1
  • SettingsPage.ComputeTab (cognitive 25) ui/src/components/SettingsPage.tsx:3045 — SettingsPage.ComputeTab has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 11 (14 pts), if/else 5 (8 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 4 function items inside it that branch (renderTarget, a function literal at line 3114, a function literal at line 3072, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SettingsPage.EnvRow (cognitive 25) · ×1
  • SettingsPage.EnvRow (cognitive 25) ui/src/components/SettingsPage.tsx:3446 — SettingsPage.EnvRow has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (7 pts), ternaries 5 (7 pts), error handling 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 11 belong to 3 function items 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.
D2 · Cognitive Complexity · useOverleafSync.useOverleafSync (cognitive 25) · ×1
  • useOverleafSync.useOverleafSync (cognitive 25) ui/src/useOverleafSync.ts:72 — useOverleafSync.useOverleafSync has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 9, ternaries 1. Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 12 function literals inside it that branch (lines 264, 189, 219, …). 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.
D2 · Cognitive Complexity · Machines.MachineWorkspaces (cognitive 25) · ×1
  • Machines.MachineWorkspaces (cognitive 25) ui/src/Machines.tsx:142 — Machines.MachineWorkspaces has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 8, boolean chains 7, loops 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 239, selectRemote, a function literal at line 193, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Api · ×1
  • Api::force_stop_runs (cognitive 24) src/commands/up/api_v2.rs:150 — Api::force_stop_runs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Client · ×1
  • Client::apply_saved_configuration (cognitive 24) src/local/acp/host.rs:188 — Client::apply_saved_configuration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · invalidation.createInvalidation.invalidateWrite (cognitive 24) · ×1
  • invalidation.createInvalidation.invalidateWrite (cognitive 24) ui/src/queries/invalidation.ts:136 — invalidation.createInvalidation.invalidateWrite has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · SettingsPage.TargetTile (cognitive 24) · ×1
  • SettingsPage.TargetTile (cognitive 24) ui/src/components/SettingsPage.tsx:2879 — SettingsPage.TargetTile has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (18 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.TinkerSection (cognitive 24) · ×1
  • SettingsPage.TinkerSection (cognitive 24) ui/src/components/SettingsPage.tsx:3186 — SettingsPage.TinkerSection has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, ternaries 6 (8 pts), error handling 2, if/else 2 (nesting depth added 2). Of this number, 14 points are the body's own statements and 10 belong to 2 function items 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.
D2 · Cognitive Complexity · SshConnectTerminal.CommandTerminal (cognitive 23) · ×1
  • SshConnectTerminal.CommandTerminal (cognitive 23) ui/src/components/SshConnectTerminal.tsx:161 — SshConnectTerminal.CommandTerminal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 195, 208, 286, …). 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.
D2 · Cognitive Complexity · HarnessSetupDialog.HarnessSetup (cognitive 23) · ×1
  • HarnessSetupDialog.HarnessSetup (cognitive 23) ui/src/components/HarnessSetupDialog.tsx:48 — HarnessSetupDialog.HarnessSetup has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 24, if/else 10 (13 pts), ternaries 6 (7 pts), error handling 1 (nesting depth added 4). 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. This shape REPEATS in the file: one other method here (HarnessSetupDialog.HarnessSetup::verify) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ExperimentOverview.ExperimentOverview (cognitive 23) · ×1
  • ExperimentOverview.ExperimentOverview (cognitive 23) ui/src/components/ExperimentOverview.tsx:58 — ExperimentOverview.ExperimentOverview has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, ternaries 6, if/else 1. Of this number, 22 points are the body's own statements and 1 belongs 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.
D2 · Cognitive Complexity · LogTerminal.LogTerminal (cognitive 23) · ×1
  • LogTerminal.LogTerminal (cognitive 23) ui/src/components/LogTerminal.tsx:19 — LogTerminal.LogTerminal has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 9, if/else 4 (nesting depth added 4). Of this number, 18 points are the body's own statements and 5 belong to 6 function items 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.
D2 · Cognitive Complexity · workspaceTabs.applyPane (cognitive 23) · ×1
  • workspaceTabs.applyPane (cognitive 23) ui/src/workspaceTabs.ts:305 — workspaceTabs.applyPane has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 2, ternaries 1 (nesting depth added 3). Of this number, 20 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ComposerEditor.findChips (cognitive 23) · ×1
  • ComposerEditor.findChips (cognitive 23) ui/src/components/ComposerEditor.tsx:81 — ComposerEditor.findChips has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelSettings.ModelSettings (cognitive 23) · ×1
  • ModelSettings.ModelSettings (cognitive 23) ui/src/components/ModelSettings.tsx:28 — ModelSettings.ModelSettings has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 4 (5 pts), loops 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 118, a function literal at line 88, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SettingsPage.harnessStatus (cognitive 23) · ×1
  • SettingsPage.harnessStatus (cognitive 23) ui/src/components/SettingsPage.tsx:358 — SettingsPage.harnessStatus has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, ternaries 3 (7 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · SettingsPage.OverleafCard (cognitive 23) · ×1
  • SettingsPage.OverleafCard (cognitive 23) ui/src/components/SettingsPage.tsx:4334 — SettingsPage.OverleafCard has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 12 (20 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.renderParts (cognitive 23) · ×1
  • ChatPanel.renderParts (cognitive 23) ui/src/components/ChatPanel.tsx:4109 — ChatPanel.renderParts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 7, ternaries 1 (3 pts), loops 1 (nesting depth added 6). Of this number, 20 points are the body's own statements and 3 belong to 4 function items 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.
D2 · Cognitive Complexity · OpenCode · ×1
  • OpenCode::detect_at (cognitive 22) src/local/harness/opencode.rs:56 — OpenCode::detect_at has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · helper.dispatch (cognitive 22) · ×1
  • helper.dispatch (cognitive 22) REDACTED:181 — helper.dispatch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 2 (4 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dev.replaceLive (cognitive 22) · ×1
  • dev.replaceLive (cognitive 22) dev.ts:310 — dev.replaceLive has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4 (9 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · orxCommand.parseOrxLit (cognitive 22) · ×1
  • orxCommand.parseOrxLit (cognitive 22) REDACTED:166 — orxCommand.parseOrxLit has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HarnessSetupDialog.HarnessSetup · ×1
  • HarnessSetupDialog.HarnessSetup::verify (cognitive 22) ui/src/components/HarnessSetupDialog.tsx:83 — HarnessSetupDialog.HarnessSetup::verify has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, ternaries 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (HarnessSetupDialog.HarnessSetup) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · RemoteHostDialog.RemoteHostDialog (cognitive 22) · ×1
  • RemoteHostDialog.RemoteHostDialog (cognitive 22) ui/src/components/RemoteHostDialog.tsx:34 — RemoteHostDialog.RemoteHostDialog has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (16 pts), boolean chains 5, if/else 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 137, 61, 95). 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.
D2 · Cognitive Complexity · ChatPanel.codeSummary (cognitive 22) · ×1
  • ChatPanel.codeSummary (cognitive 22) ui/src/components/ChatPanel.tsx:3069 — ChatPanel.codeSummary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · csv.parseCsv (cognitive 22) · ×1
  • csv.parseCsv (cognitive 22) ui/src/csv.ts:23 — csv.parseCsv has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · orx-chart.html.sliceRows (cognitive 21) · ×1
  • orx-chart.html.sliceRows (cognitive 21) agent-skills/orx-figures/assets/orx-chart.html:79 — orx-chart.html.sliceRows has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 pts), boolean chains 5, ternaries 2 (nesting depth added 8). Of this number, 18 points are the body's own statements and 3 belong to 3 function items 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.
D2 · Cognitive Complexity · orx-chart.html.drawHeatmap (cognitive 21) · ×1
  • orx-chart.html.drawHeatmap (cognitive 21) agent-skills/orx-figures/assets/orx-chart.html:210 — orx-chart.html.drawHeatmap has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 6, if/else 2, loops 2 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 219, color, a function literal at line 220). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Tooltip.Tooltip (cognitive 21) · ×1
  • Tooltip.Tooltip (cognitive 21) ui/src/components/ui/Tooltip.tsx:4 — Tooltip.Tooltip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 5 (6 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (show, hide, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · markdownTarget.resolveMarkdownTarget (cognitive 21) · ×1
  • markdownTarget.resolveMarkdownTarget (cognitive 21) ui/src/markdownTarget.ts:17 — markdownTarget.resolveMarkdownTarget has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 6, boolean chains 4, error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkspaceTools.SideChatPicker (cognitive 21) · ×1
  • WorkspaceTools.SideChatPicker (cognitive 21) ui/src/components/WorkspaceTools.tsx:146 — WorkspaceTools.SideChatPicker has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 6, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 11 points are the body's own statements and 10 belong to 12 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.
D2 · Cognitive Complexity · Tracker.onMutation (cognitive 21) · ×1
  • Tracker.onMutation (cognitive 21) ui/src/components/tourGeometry.ts:110 — Tracker.onMutation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.ModalSection (cognitive 21) · ×1
  • SettingsPage.ModalSection (cognitive 21) ui/src/components/SettingsPage.tsx:1412 — SettingsPage.ModalSection has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (8 pts), error handling 2, if/else 2 (nesting depth added 2). Of this number, 11 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ChatPanel.turnReceipt (cognitive 21) · ×1
  • ChatPanel.turnReceipt (cognitive 21) ui/src/components/ChatPanel.tsx:3887 — ChatPanel.turnReceipt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.useTranscriptAnnouncement (cognitive 21) · ×1
  • ChatPanel.useTranscriptAnnouncement (cognitive 21) ui/src/components/ChatPanel.tsx:4506 — ChatPanel.useTranscriptAnnouncement has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 7, boolean chains 2 (nesting depth added 6). None of this is in the body itself: all 21 points belong to 5 function literals inside it that branch (lines 4514, 4540, 4520, …). 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.
D2 · Cognitive Complexity · App.App · ×1
  • App.App::renderContentTab (cognitive 21) ui/src/App.tsx:1915 — App.App::renderContentTab has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, ternaries 3 (7 pts), if/else 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (App.App) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · requestAuth (cognitive 21) · ×1
  • requestAuth (cognitive 21) src/local/acp/zcode-runtime.cjs:17 — requestAuth has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7, other 6, ternaries 3 (4 pts), boolean chains 3, error handling 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 7 belong to 4 function items 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.
D2 · Cognitive Complexity · logWindow.createLogFollower.read (cognitive 20) · ×1
  • logWindow.createLogFollower.read (cognitive 20) ui/src/logWindow.ts:158 — logWindow.createLogFollower.read has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, ternaries 1 (3 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HtmlPreview.inlineAssets (cognitive 20) · ×1
  • HtmlPreview.inlineAssets (cognitive 20) REDACTED:47 — HtmlPreview.inlineAssets has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoteStopDialog.RemoteStopDialog (cognitive 20) · ×1
  • RemoteStopDialog.RemoteStopDialog (cognitive 20) ui/src/components/RemoteStopDialog.tsx:9 — RemoteStopDialog.RemoteStopDialog has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 5, boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chatRendering.splitResponseParts.turns (cognitive 20) · ×1
  • chatRendering.splitResponseParts.turns (cognitive 20) ui/src/chatRendering.ts:253 — chatRendering.splitResponseParts.turns has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 11, ternaries 3 (5 pts), if/else 4 (nesting depth added 2). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 254, 258, 270). 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.
D2 · Cognitive Complexity · UpdateBanner.useRestartApp.restart (cognitive 20) · ×1
  • UpdateBanner.useRestartApp.restart (cognitive 20) ui/src/components/UpdateBanner.tsx:83 — UpdateBanner.useRestartApp.restart has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 5). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 88, retired). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SkillsTab.SkillsCard (cognitive 20) · ×1
  • SkillsTab.SkillsCard (cognitive 20) ui/src/components/SkillsTab.tsx:341 — SkillsTab.SkillsCard has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 7, if/else 4, error handling 1 (nesting depth added 3). Of this number, 11 points are the body's own statements and 9 belong to 3 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.
D2 · Cognitive Complexity · Antigravity · ×1
  • Antigravity::detect_at (cognitive 19) src/local/harness/antigravity.rs:64 — Antigravity::detect_at has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 1 (3 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.
D2 · Cognitive Complexity · api.createApi.followOperation (cognitive 19) · ×1
  • api.createApi.followOperation (cognitive 19) ui/src/api.ts:2879 — api.createApi.followOperation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), error handling 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chatState.reducer (cognitive 19) · ×1
  • chatState.reducer (cognitive 19) ui/src/queries/chatState.ts:64 — chatState.reducer has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 4, if/else 1 (2 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · acp.nativeOptions (cognitive 19) · ×1
  • acp.nativeOptions (cognitive 19) ui/src/acp.ts:42 — acp.nativeOptions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 7 (8 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 50, 57, 45). 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.
D2 · Cognitive Complexity · SettingsPage.GithubSettings (cognitive 19) · ×1
  • SettingsPage.GithubSettings (cognitive 19) ui/src/components/SettingsPage.tsx:4181 — SettingsPage.GithubSettings has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (13 pts), boolean chains 5, if/else 1 (nesting depth added 6). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.shellCommandSegments · ×1
  • ChatPanel.shellCommandSegments::scanSubstitution (cognitive 19) ui/src/components/ChatPanel.tsx:1245 — ChatPanel.shellCommandSegments::scanSubstitution has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, 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. This shape REPEATS in the file: one other method here (ChatPanel.shellCommandSegments) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · FileViewer.FileViewer · ×1
  • FileViewer.FileViewer::save (cognitive 19) ui/src/components/FileViewer.tsx:355 — FileViewer.FileViewer::save has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (4 pts), boolean chains 2, error handling 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. This shape REPEATS in the file: one other method here (FileViewer.FileViewer) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ArchiveMenu.archiveActionsByExperiment (cognitive 19) · ×1
  • ArchiveMenu.archiveActionsByExperiment (cognitive 19) ui/src/components/ArchiveMenu.tsx:22 — ArchiveMenu.archiveActionsByExperiment has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 4 belong to 4 function items 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.
D2 · Cognitive Complexity · TreeView.ExpNode (cognitive 19) · ×1
  • TreeView.ExpNode (cognitive 19) ui/src/components/TreeView.tsx:227 — TreeView.ExpNode has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, ternaries 8 (9 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.
D2 · Cognitive Complexity · Duty · ×1
  • Duty::start (cognitive 18) crates/orx-host/src/rental.rs:54 — Duty::start has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 4, match/switch 2 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cursor · ×1
  • Cursor::detect_at (cognitive 18) src/local/harness/cursor.rs:58 — Cursor::detect_at has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AgentHost · ×1
  • AgentHost::ensure_started (cognitive 18) src/local/opencode.rs:917 — AgentHost::ensure_started has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · check-styles.findStyleViolations (cognitive 18) · ×1
  • check-styles.findStyleViolations (cognitive 18) ui/scripts/check-styles.mjs:26 — check-styles.findStyleViolations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · logWindow.createLogFollower.sync (cognitive 18) · ×1
  • logWindow.createLogFollower.sync (cognitive 18) ui/src/logWindow.ts:210 — logWindow.createLogFollower.sync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runDisplay.runDisplay (cognitive 18) · ×1
  • runDisplay.runDisplay (cognitive 18) ui/src/runDisplay.ts:64 — runDisplay.runDisplay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (7 pts), boolean chains 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.
D2 · Cognitive Complexity · UpdateBanner.UpdateBanner (cognitive 18) · ×1
  • UpdateBanner.UpdateBanner (cognitive 18) ui/src/components/UpdateBanner.tsx:129 — UpdateBanner.UpdateBanner has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 9 (14 pts), boolean chains 3, if/else 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsPage.RecordRow (cognitive 18) · ×1
  • SettingsPage.RecordRow (cognitive 18) ui/src/components/SettingsPage.tsx:968 — SettingsPage.RecordRow has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 4 (5 pts), if/else 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 3 belong to 5 function items 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.
D2 · Cognitive Complexity · StatusStrip.StatusStrip (cognitive 18) · ×1
  • StatusStrip.StatusStrip (cognitive 18) ui/src/components/StatusStrip.tsx:23 — StatusStrip.StatusStrip has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (5 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 42, 37, 49). 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.
D2 · Cognitive Complexity · QuestionDock.QuestionDock (cognitive 18) · ×1
  • QuestionDock.QuestionDock (cognitive 18) ui/src/components/QuestionDock.tsx:124 — QuestionDock.QuestionDock has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 5, ternaries 1. Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 154, 152, 192). 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.
D2 · Cognitive Complexity · ChatPanel.resolvePosixPath (cognitive 18) · ×1
  • ChatPanel.resolvePosixPath (cognitive 18) ui/src/components/ChatPanel.tsx:1186 — ChatPanel.resolvePosixPath has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatPanel.TurnStatusRow (cognitive 18) · ×1
  • ChatPanel.TurnStatusRow (cognitive 18) ui/src/components/ChatPanel.tsx:2627 — ChatPanel.TurnStatusRow has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (10 pts), boolean chains 4, if/else 4 (nesting depth added 4). Of this number, 15 points are the body's own statements and 3 belong to 2 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.
D2 · Cognitive Complexity · ArtifactsTab.PreviewPane (cognitive 18) · ×1
  • ArtifactsTab.PreviewPane (cognitive 18) ui/src/components/ArtifactsTab.tsx:209 — ArtifactsTab.PreviewPane has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 6, ternaries 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.
D2 · Cognitive Complexity · CsvTable.CsvTable (cognitive 18) · ×1
  • CsvTable.CsvTable (cognitive 18) ui/src/components/CsvTable.tsx:81 — CsvTable.CsvTable has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 4, if/else 2 (nesting depth added 2). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 202, 131, 162, …). 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.
D2 · Cognitive Complexity · check (cognitive 18) · ×1
  • check (cognitive 18) src/local/harness/acp/deepseek-auth.cjs:14 — check has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, other 4, loops 1, ternaries 1 (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.
D2 · Cognitive Complexity · workspaceState.parseDestination (cognitive 17) · ×1
  • workspaceState.parseDestination (cognitive 17) ui/src/workspaceState.ts:96 — workspaceState.parseDestination has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AcpAuthDialog.AcpAuth · ×1
  • AcpAuthDialog.AcpAuth::verify (cognitive 17) ui/src/components/AcpAuthDialog.tsx:59 — AcpAuthDialog.AcpAuth::verify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AcpAuthDialog.AcpAuth) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ModelList.ModelRow (cognitive 17) · ×1
  • ModelList.ModelRow (cognitive 17) ui/src/components/ModelList.tsx:428 — ModelList.ModelRow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, ternaries 4, if/else 2. Of this number, 12 points are the body's own statements and 5 belong to 3 function items 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.
D2 · Cognitive Complexity · experimentLineageModel.layoutLineage (cognitive 17) · ×1
  • experimentLineageModel.layoutLineage (cognitive 17) ui/src/components/experimentLineageModel.ts:211 — experimentLineageModel.layoutLineage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (nesting depth added 3). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (visit, lanesNeeded, size, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PlanStrip.PlanStrip (cognitive 17) · ×1
  • PlanStrip.PlanStrip (cognitive 17) ui/src/components/PlanStrip.tsx:25 — PlanStrip.PlanStrip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, ternaries 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 107, a function literal at line 58, a function literal at line 56, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · markdownLivePreview.collectMath (cognitive 17) · ×1
  • markdownLivePreview.collectMath (cognitive 17) ui/src/markdownLivePreview.ts:369 — markdownLivePreview.collectMath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), ternaries 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SshConfigDialog.SshConfigDialog (cognitive 17) · ×1
  • SshConfigDialog.SshConfigDialog (cognitive 17) ui/src/components/SshConfigDialog.tsx:29 — SshConfigDialog.SshConfigDialog has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (7 pts), if/else 2, error handling 1 (nesting depth added 2). Of this number, 10 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · dev.serve (cognitive 16) · ×1
  • dev.serve (cognitive 16) dev.ts:811 — dev.serve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 2 (3 pts), error handling 2, boolean chains 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · katexHealing.longestValidPrefix (cognitive 16) · ×1
  • katexHealing.longestValidPrefix (cognitive 16) ui/src/katexHealing.ts:99 — katexHealing.longestValidPrefix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LocalModelSetup.LocalModelGuide (cognitive 16) · ×1
  • LocalModelSetup.LocalModelGuide (cognitive 16) ui/src/components/LocalModelSetup.tsx:231 — LocalModelSetup.LocalModelGuide has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 6, if/else 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 3 belong to 3 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.
D2 · Cognitive Complexity · GitDiff.GitDiffExplorer (cognitive 16) · ×1
  • GitDiff.GitDiffExplorer (cognitive 16) ui/src/components/GitDiff.tsx:261 — GitDiff.GitDiffExplorer has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 3, if/else 2 (nesting depth added 4). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · chatRendering.agentTranscript (cognitive 16) · ×1
  • chatRendering.agentTranscript (cognitive 16) ui/src/chatRendering.ts:14 — chatRendering.agentTranscript has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 4). Of this number, 11 points are the body's own statements and 5 belong to 3 function items 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.
D2 · Cognitive Complexity · chatRendering.partIsVisible (cognitive 16) · ×1
  • chatRendering.partIsVisible (cognitive 16) ui/src/chatRendering.ts:121 — chatRendering.partIsVisible has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExperimentRunBanner.RunRow (cognitive 16) · ×1
  • ExperimentRunBanner.RunRow (cognitive 16) ui/src/components/ExperimentRunBanner.tsx:18 — ExperimentRunBanner.RunRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (7 pts) (nesting depth added 2). 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.
D2 · Cognitive Complexity · SettingsPage.harnessSetupPath (cognitive 16) · ×1
  • SettingsPage.harnessSetupPath (cognitive 16) ui/src/components/SettingsPage.tsx:390 — SettingsPage.harnessSetupPath has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 3, if/else 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.
D2 · Cognitive Complexity · ChatPanel.ToolRow (cognitive 16) · ×1
  • ChatPanel.ToolRow (cognitive 16) ui/src/components/ChatPanel.tsx:2700 — ChatPanel.ToolRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, ternaries 5 (6 pts), if/else 4 (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PdfPreview.PdfPreview (cognitive 16) · ×1
  • PdfPreview.PdfPreview (cognitive 16) ui/src/components/PdfPreview.tsx:54 — PdfPreview.PdfPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 79, a function literal at line 234, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · TreeView.elideHiddenRegions (cognitive 16) · ×1
  • TreeView.elideHiddenRegions (cognitive 16) ui/src/components/TreeView.tsx:129 — TreeView.elideHiddenRegions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). None of this is in the body itself: all 16 points belong to 3 function items inside it that branch (visit, a function literal at line 168, hasMine). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: openresearch_cli::config src/config.rs:18 — TooManyFunctions — 56 free functions. The bar is 30 free functions; this is 26 over it, 1.87× 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (80 shared lines) · ×1
  • Near-duplicate member pair (80 shared lines) src/updates/linux_app.rs:104 — src/updates/linux_app.rs:104-230 | src/updates/macos_app.rs:106-207 — These two members are variants of one another: 80 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) src/local/latex_templates.rs:131 — src/local/latex_templates.rs:131-193 | src/local/user_skills.rs:346-429 — These two members are variants of one another: 40 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/jobs/mod.rs:162 — src/jobs/mod.rs:162-172 | src/jobs/mod.rs:176-186 | src/jobs/mod.rs:190-200 | src/jobs/mod.rs:203-213 | src/jobs/mod.rs:217-227 — 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) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/commands/up.rs:5219 — src/commands/up.rs:5219-5233 | src/commands/up.rs:5239-5255 | src/commands/up.rs:5273-5291 | src/commands/up.rs:5298-5313 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) src/jobs/modal.rs:326 — src/jobs/modal.rs:326-374 | src/jobs/vercel.rs:885-922 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) src/commands/remote_host.rs:175 — src/commands/remote_host.rs:175-213 | REDACTED:126-165 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) src/local/harness/acp/auth.rs:121 — src/local/harness/acp/auth.rs:121-144 | src/local/harness/acp/auth.rs:146-173 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) src/local/harness/antigravity.rs:885 — src/local/harness/antigravity.rs:885-917 | src/local/harness/cursor.rs:1185-1219 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×1
  • Edited copy of a member (37 corresponding lines) src/store/costs.rs:83 — src/store/costs.rs:83-120 | src/store/costs.rs:124-160 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) src/commands/up.rs:3402 — src/commands/up.rs:3402-3430 | src/commands/up.rs:3433-3459 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) src/commands/up.rs:449 — src/commands/up.rs:449-475 | src/commands/up.rs:477-499 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) REDACTED:4995 — REDACTED:4995-5020 | REDACTED:5045-5071 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) REDACTED:3025 — REDACTED:3025-3046 | REDACTED:3049-3074 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 21+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 21+ corresponding lines) src/client.rs:1067 — src/client.rs:1067-1087 | src/client.rs:1125-1148 | src/client.rs:1448-1471 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) src/updates.rs:257 — src/updates.rs:257-283 | src/updates.rs:286-306 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 17+ corresponding lines) REDACTED:2244 — REDACTED:2244-2262 | REDACTED:2267-2297 | REDACTED:3758-3825 | REDACTED:4694-4710 | REDACTED:4715-4732 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) src/jobs/kubernetes.rs:87 — src/jobs/kubernetes.rs:87-100 | src/jobs/ray.rs:38-51 | src/jobs/slurm.rs:82-95 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) src/local/chat/mod.rs:968 — src/local/chat/mod.rs:968-986 | src/local/demo.rs:1387-1405 | src/local/harness/codex.rs:2437-2455 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) crates/orx-host/src/server.rs:1257 — crates/orx-host/src/server.rs:1257-1269 | src/compute.rs:171-185 | src/local/storage.rs:196-207 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) REDACTED:5506 — REDACTED:5506-5518 | REDACTED:5553-5564 | REDACTED:199-203 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 7+ corresponding lines) REDACTED:2169 — REDACTED:2169-2176 | REDACTED:3190-3197 | REDACTED:3199-3205 | REDACTED:3680-3688 | REDACTED:3723-3729 | REDACTED:5965-5973 | REDACTED:6026-6034 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) REDACTED:1952 — REDACTED:1952-1958 | REDACTED:2058-2064 | REDACTED:2066-2072 | REDACTED:2074-2080 | REDACTED:2082-2088 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 10+ corresponding lines) REDACTED:3928 — REDACTED:3928-3939 | REDACTED:4041-4058 | REDACTED:4979-4988 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) crates/orx-host/src/wrapper.rs:562 — crates/orx-host/src/wrapper.rs:562-568 | crates/orx-host/src/wrapper.rs:570-576 | REDACTED:2527-2533 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) src/updates/linux_app.rs:116 — src/updates/linux_app.rs:116-146 | src/updates/macos_app.rs:119-149 — before extracting anything, compare `src/updates/linux_app.rs` and `src/updates/macos_app.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/updates/linux_app.rs:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26–28 lines × 2) · ×1
  • Duplicated block (26–28 lines × 2) src/updates/linux_app.rs:147 — src/updates/linux_app.rs:147-172 | src/updates/macos_app.rs:152-179 — before extracting anything, compare `src/updates/linux_app.rs` and `src/updates/macos_app.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/updates/linux_app.rs:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • Duplicated block (25–26 lines × 2) src/jobs/localbox/windows.rs:66 — src/jobs/localbox/windows.rs:66-90 | src/local/codex.rs:1289-1314 — before extracting anything, compare `src/jobs/localbox/windows.rs` and `src/local/codex.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/localbox/windows.rs:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) src/updates/linux_app.rs:190 — src/updates/linux_app.rs:190-207 | src/updates/macos_app.rs:344-362 — before extracting anything, compare `src/updates/linux_app.rs` and `src/updates/macos_app.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) src/local/chat/mod.rs:4604 — src/local/chat/mod.rs:4604-4621 | src/local/chat/mod.rs:5159-5176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/chat/mod.rs:4604` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) src/commands/up.rs:10347 — src/commands/up.rs:10347-10363 | src/commands/up.rs:10375-10390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:10347` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/commands/up.rs:10365` calls `Some` and `src/commands/up.rs:10391` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–17 lines × 2) · ×1
  • Duplicated block (10–17 lines × 2) src/updates/linux_app.rs:211 — src/updates/linux_app.rs:211-227 | src/updates/macos_app.rs:195-204 — before extracting anything, compare `src/updates/linux_app.rs` and `src/updates/macos_app.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/updates/linux_app.rs:211` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) crates/orx-host/src/server.rs:995 — crates/orx-host/src/server.rs:995-1009 | crates/orx-host/src/server.rs:1087-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `crates/orx-host/src/server.rs:995` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) src/commands/up.rs:5199 — src/commands/up.rs:5199-5213 | src/commands/up.rs:5339-5352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:5199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) src/local/chat/mod.rs:553 — src/local/chat/mod.rs:553-564 | src/local/chat/mod.rs:8938-8952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) src/local/harness/codex.rs:1827 — src/local/harness/codex.rs:1827-1840 | src/local/harness/cursor.rs:223-232 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/harness/codex.rs:1827` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) src/local/latex_templates.rs:137 — src/local/latex_templates.rs:137-150 | src/local/user_skills.rs:354-367 — before extracting anything, compare `src/local/latex_templates.rs` and `src/local/user_skills.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/latex_templates.rs:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) src/jobs/modal.rs:343 — src/jobs/modal.rs:343-353 | src/jobs/vercel.rs:899-911 — before extracting anything, compare `src/jobs/modal.rs` and `src/jobs/vercel.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) src/local/claude.rs:1051 — src/local/claude.rs:1051-1063 | src/local/codex.rs:1110-1122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/local/claude.rs:1051` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) src/jobs/localbox/windows.rs:142 — src/jobs/localbox/windows.rs:142-152 | src/local/codex.rs:1359-1370 — before extracting anything, compare `src/jobs/localbox/windows.rs` and `src/local/codex.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/localbox/windows.rs:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) src/client.rs:1129 — src/client.rs:1129-1139 | src/client.rs:1197-1204 | src/client.rs:1413-1423 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/client.rs:1129` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/client.rs:1140` calls `canonical_reason`, `unwrap_or` and `src/client.rs:1205` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) src/updates/linux_app.rs:105 — src/updates/linux_app.rs:105-114 | src/updates/macos_app.rs:107-117 — before extracting anything, compare `src/updates/linux_app.rs` and `src/updates/macos_app.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 106 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/updates/linux_app.rs:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×1
  • Duplicated block (9 lines × 4) src/commands/up.rs:5220 — src/commands/up.rs:5220-5228 | src/commands/up.rs:5241-5249 | src/commands/up.rs:5275-5283 | src/commands/up.rs:5300-5308 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/commands/up.rs:5220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) src/client.rs:1455 — src/client.rs:1455-1463 | src/client.rs:1800-1808 | src/client.rs:1850-1858 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/client.rs:1455` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) src/commands/up.rs:2266 — src/commands/up.rs:2266-2272 | src/commands/up.rs:2295-2301 | src/commands/up.rs:2316-2323 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/commands/up.rs:2264` calls `Json` and `src/commands/up.rs:2293` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) src/engine/adapters/local.rs:399 — src/engine/adapters/local.rs:399-405 | src/engine/adapters/local.rs:419-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/engine/adapters/local.rs:399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) src/jobs/huggingface.rs:201 — src/jobs/huggingface.rs:201-207 | src/jobs/ray.rs:217-222 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/huggingface.rs:201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) src/local/harness/claude.rs:1346 — src/local/harness/claude.rs:1346-1351 | src/local/harness/cursor.rs:184-189 | src/local/harness/opencode.rs:202-207 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) src/client.rs:1074 — src/client.rs:1074-1085 | src/client.rs:1355-1366 | src/client.rs:1968-1979 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/client.rs:1074` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) src/jobs/mod.rs:164 — src/jobs/mod.rs:164-172 | src/jobs/mod.rs:178-186 | src/jobs/mod.rs:192-200 | src/jobs/mod.rs:205-213 | src/jobs/mod.rs:219-227 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/jobs/mod.rs:164` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (118 corresponding lines) · ×1
  • Edited copy of a member (118 corresponding lines) demo/nanochat/experiment/scripts/chat_sft.py:181 — demo/nanochat/base/scripts/chat_sft.py:181-298 | demo/nanochat/experiment/scripts/chat_sft.py:181-303 — These two members are one piece of code written twice and then edited apart: 118 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (53 lines × 2) · ×1
  • Duplicated block (53 lines × 2) demo/nanochat/experiment/scripts/chat_sft.py:210 — demo/nanochat/base/scripts/chat_sft.py:209-261 | demo/nanochat/experiment/scripts/chat_sft.py:210-262 — before extracting anything, compare `demo/nanochat/base/scripts/chat_sft.py` and `demo/nanochat/experiment/scripts/chat_sft.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `demo/nanochat/experiment/scripts/chat_sft.py:264` calls `any`, `print0` and `demo/nanochat/base/scripts/chat_sft.py:264` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) demo/nanochat/experiment/scripts/chat_sft.py:181 — demo/nanochat/base/scripts/chat_sft.py:181-208 | demo/nanochat/experiment/scripts/chat_sft.py:181-208 — before extracting anything, compare `demo/nanochat/base/scripts/chat_sft.py` and `demo/nanochat/experiment/scripts/chat_sft.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (35 lines × 2) · ×1
  • Duplicated block (35 lines × 2) demo/nanochat/experiment/scripts/chat_sft.py:269 — demo/nanochat/base/scripts/chat_sft.py:264-298 | demo/nanochat/experiment/scripts/chat_sft.py:269-303 — before extracting anything, compare `demo/nanochat/base/scripts/chat_sft.py` and `demo/nanochat/experiment/scripts/chat_sft.py` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 123 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `demo/nanochat/experiment/scripts/chat_sft.py:264` calls `any`, `print0` and `demo/nanochat/base/scripts/chat_sft.py:261` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: orx-host-proto — orx-host-proto: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: ApiClient (LCOM4 4) src/plane/local_plane.rs:531 — ApiClient's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Hollow method · ×1
  • Hollow method — returns a constant without doing the work src/commands/remote_host.rs:717 — `print_descriptor` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 250 typed · 145 plain JS — the untyped files are scripts/build-host.mjs, scripts/build-host.test.mjs, scripts/build-linux-appimage.test.mjs, scripts/canary-manifest.mjs, scripts/canary-tag.mjs, scripts/canary-tag.test.mjs (+139 more). 1 production file(s) opt out entirely with @ts-nocheck · 0 @ts-ignore suppression(s); the opted-out files are ui/src/routeTree.gen.ts.
R10 · Code Duplication · Duplicated block with local edits (53 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (53 matched lines × 2 locations) scripts/generate-dmg-background.mjs:15 — scripts/generate-dmg-background.mjs:15 · scripts/generate-icon.mjs:14 — the two spans are one implementation copied and then locally edited — 540 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.
R10 · Code Duplication · Duplicated block with local edits (51 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (51 matched lines × 2 locations) ui/src/queries/chat.ts:321 — ui/src/queries/chat.ts:321 · ui/src/queries/projects.ts:172 — the two spans are one implementation copied and then locally edited — 508 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.
R10 · Code Duplication · Duplicated block with local edits (48 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (48 matched lines × 2 locations) ui/src/components/SettingsPage.tsx:1272 — ui/src/components/SettingsPage.tsx:1272 · ui/src/components/SettingsPage.tsx:3302 — the two spans are one implementation copied and then locally edited — 309 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.
R10 · Code Duplication · Duplicated block with local edits (41 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (41 matched lines × 2 locations) ui/src/components/ProjectTerminal.tsx:34 — ui/src/components/ProjectTerminal.tsx:34 · ui/src/components/SshConnectTerminal.tsx:220 — the two spans are one implementation copied and then locally edited — 305 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.
R10 · Code Duplication · Duplicated block (39 lines × 2 locations) · ×1
  • Duplicated block (39 lines × 2 locations) ui/src/components/ChatPanel.tsx:2391 — ui/src/components/ChatPanel.tsx:2391 · ui/src/components/ChatPanel.tsx:2431 — 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) ui/src/components/SettingsPage.tsx:4344 — ui/src/components/SettingsPage.tsx:4344 · ui/src/components/SettingsPage.tsx:4374 — 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.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) ui/src/components/SettingsPage.tsx:3208 — ui/src/components/SettingsPage.tsx:3208 · ui/src/components/SettingsPage.tsx:3323 — 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 (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) ui/src/components/ChatPanel.tsx:8761 — ui/src/components/ChatPanel.tsx:8761 · ui/src/components/ChatPanel.tsx:8780 — 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 (17 lines × 2 locations) · ×1
  • Duplicated block (17 lines × 2 locations) ui/src/components/ChatPanel.tsx:7190 — ui/src/components/ChatPanel.tsx:7190 · ui/src/components/ChatPanel.tsx:7298 — 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 (17 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (17 matched lines × 2 locations) ui/src/components/ModelPicker.tsx:1125 — ui/src/components/ModelPicker.tsx:1125 · ui/src/components/WorkspaceTools.tsx:204 — the two spans are one implementation copied and then locally edited — 95 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.
R10 · Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) ui/src/components/Onboarding.tsx:344 — ui/src/components/Onboarding.tsx:344 · ui/src/components/Onboarding.tsx:373 — the two spans are one implementation copied and then locally edited — 100 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.
R10 · Code Duplication · Duplicated block (15 lines × 2 locations) · ×1
  • Duplicated block (15 lines × 2 locations) ui/src/components/SettingsPage.tsx:4849 — ui/src/components/SettingsPage.tsx:4849 · ui/src/components/SettingsPage.tsx:4899 — 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 (14 lines × 3 locations) · ×1
  • Duplicated block (14 lines × 3 locations) ui/src/components/SettingsPage.tsx:1428 — ui/src/components/SettingsPage.tsx:1428 · ui/src/components/SettingsPage.tsx:3202 · ui/src/components/SettingsPage.tsx:3317 — 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.
R10 · Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (14 matched lines × 2 locations) ui/src/components/tourGeometry.ts:115 — ui/src/components/tourGeometry.ts:115 · ui/src/components/tourGeometry.ts:129 — the two spans are one implementation copied and then locally edited — 79 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.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (11 matched lines × 2 locations) ui/src/components/MentionMenu.tsx:57 — ui/src/components/MentionMenu.tsx:57 · ui/src/components/SkillMenu.tsx:15 — the two spans are one implementation copied and then locally edited — 71 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.
R2 · Cyclomatic Complexity · Complex function ChatPanel (cyclomatic 326, cognitive 275) · ×1
  • Complex function ChatPanel (cyclomatic 326, cognitive 275) ui/src/components/ChatPanel.tsx:5485 — ChatPanel has cyclomatic complexity 326 and cognitive complexity 275; 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.
R2 · Cyclomatic Complexity · Complex function App (cyclomatic 253, cognitive 226) · ×1
  • Complex function App (cyclomatic 253, cognitive 226) ui/src/App.tsx:254 — App has cyclomatic complexity 253 and cognitive complexity 226; 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.
R2 · Cyclomatic Complexity · Complex function NewProjectForm (cyclomatic 202, cognitive 147) · ×1
  • Complex function NewProjectForm (cyclomatic 202, cognitive 147) ui/src/components/NewProjectForm.tsx:63 — NewProjectForm has cyclomatic complexity 202 and cognitive complexity 147; 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.
R2 · Cyclomatic Complexity · Complex function FileViewer (cyclomatic 183, cognitive 136) · ×1
  • Complex function FileViewer (cyclomatic 183, cognitive 136) ui/src/components/FileViewer.tsx:142 — FileViewer has cyclomatic complexity 183 and cognitive complexity 136; 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.
R2 · Cyclomatic Complexity · Complex function computeToolActivity (cyclomatic 176, cognitive 272) · ×1
  • Complex function computeToolActivity (cyclomatic 176, cognitive 272) ui/src/components/ChatPanel.tsx:1545 — computeToolActivity has cyclomatic complexity 176 and cognitive complexity 272; 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.
R2 · Cyclomatic Complexity · Complex function AddAgentDialog (cyclomatic 164, cognitive 165) · ×1
  • Complex function AddAgentDialog (cyclomatic 164, cognitive 165) ui/src/components/AddAgentDialog.tsx:270 — AddAgentDialog has cyclomatic complexity 164 and cognitive complexity 165; 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.
R2 · Cyclomatic Complexity · Complex function send (cyclomatic 129, cognitive 173) · ×1
  • Complex function send (cyclomatic 129, cognitive 173) ui/src/components/ChatPanel.tsx:6975 — send has cyclomatic complexity 129 and cognitive complexity 173; 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.
R2 · Cyclomatic Complexity · Complex function ModelPicker (cyclomatic 104, cognitive 87) · ×1
  • Complex function ModelPicker (cyclomatic 104, cognitive 87) ui/src/components/ModelPicker.tsx:300 — ModelPicker has cyclomatic complexity 104 and cognitive complexity 87; 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.
R2 · Cyclomatic Complexity · Complex function harnessRow (cyclomatic 81, cognitive 67) · ×1
  • Complex function harnessRow (cyclomatic 81, cognitive 67) ui/src/components/SettingsPage.tsx:610 — harnessRow has cyclomatic complexity 81 and cognitive complexity 67; 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.
R2 · Cyclomatic Complexity · Complex function Onboarding (cyclomatic 73, cognitive 66) · ×1
  • Complex function Onboarding (cyclomatic 73, cognitive 66) ui/src/components/Onboarding.tsx:64 — Onboarding has cyclomatic complexity 73 and cognitive complexity 66; 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.
R2 · Cyclomatic Complexity · Complex function OpenResearchSection (cyclomatic 73, cognitive 53) · ×1
  • Complex function OpenResearchSection (cyclomatic 73, cognitive 53) ui/src/components/SettingsPage.tsx:2502 — OpenResearchSection has cyclomatic complexity 73 and cognitive complexity 53; 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.
R2 · Cyclomatic Complexity · Complex function RemoteSetup (cyclomatic 61, cognitive 54) · ×1
  • Complex function RemoteSetup (cyclomatic 61, cognitive 54) ui/src/RemoteRuntime.tsx:159 — RemoteSetup has cyclomatic complexity 61 and cognitive complexity 54; 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.
R2 · Cyclomatic Complexity · Complex function ChatSearch (cyclomatic 56, cognitive 45) · ×1
  • Complex function ChatSearch (cyclomatic 56, cognitive 45) ui/src/components/ChatSearch.tsx:21 — ChatSearch has cyclomatic complexity 56 and cognitive complexity 45; 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.
R2 · Cyclomatic Complexity · Complex function ExpHoverCard (cyclomatic 55, cognitive 53) · ×1
  • Complex function ExpHoverCard (cyclomatic 55, cognitive 53) ui/src/components/ExpHoverCard.tsx:131 — ExpHoverCard has cyclomatic complexity 55 and cognitive complexity 53; 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.
R2 · Cyclomatic Complexity · Complex function UsageMenu (cyclomatic 55, cognitive 51) · ×1
  • Complex function UsageMenu (cyclomatic 55, cognitive 51) ui/src/components/UsageMenu.tsx:28 — UsageMenu has cyclomatic complexity 55 and cognitive complexity 51; 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.
R2 · Cyclomatic Complexity · Complex function GitTab (cyclomatic 55, cognitive 44) · ×1
  • Complex function GitTab (cyclomatic 55, cognitive 44) ui/src/components/SettingsPage.tsx:4414 — GitTab has cyclomatic complexity 55 and cognitive complexity 44; 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.
R2 · Cyclomatic Complexity · Complex function parsePane (cyclomatic 53, cognitive 50) · ×1
  • Complex function parsePane (cyclomatic 53, cognitive 50) ui/src/workspaceState.ts:54 — parsePane has cyclomatic complexity 53 and cognitive complexity 50; 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.
R2 · Cyclomatic Complexity · Complex function PromptCard (cyclomatic 52, cognitive 70) · ×1
  • Complex function PromptCard (cyclomatic 52, cognitive 70) ui/src/components/ChatPanel.tsx:3242 — PromptCard has cyclomatic complexity 52 and cognitive complexity 70; 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 52, cognitive 46) · ×1
  • Complex function (anonymous) (cyclomatic 52, cognitive 46) ui/src/components/SettingsPage.tsx:1848 — (anonymous) has cyclomatic complexity 52 and cognitive complexity 46; 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.
R2 · Cyclomatic Complexity · Complex function VercelSection (cyclomatic 52, cognitive 41) · ×1
  • Complex function VercelSection (cyclomatic 52, cognitive 41) ui/src/components/SettingsPage.tsx:1512 — VercelSection has cyclomatic complexity 52 and cognitive complexity 41; 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.
R2 · Cyclomatic Complexity · Complex function WorktreeTab (cyclomatic 45, cognitive 44) · ×1
  • Complex function WorktreeTab (cyclomatic 45, cognitive 44) ui/src/components/WorktreeTab.tsx:45 — WorktreeTab has cyclomatic complexity 45 and cognitive complexity 44; 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.
R2 · Cyclomatic Complexity · Complex function HarnessSetup (cyclomatic 42, cognitive 33) · ×1
  • Complex function HarnessSetup (cyclomatic 42, cognitive 33) ui/src/components/HarnessSetupDialog.tsx:48 — HarnessSetup has cyclomatic complexity 42 and cognitive complexity 33; 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.
R2 · Cyclomatic Complexity · Complex function enter (cyclomatic 41, cognitive 75) · ×1
  • Complex function enter (cyclomatic 41, cognitive 75) ui/src/markdownLivePreview.ts:257 — enter has cyclomatic complexity 41 and cognitive complexity 75; 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.
R2 · Cyclomatic Complexity · Complex function alphaxivActivity (cyclomatic 41, cognitive 42) · ×1
  • Complex function alphaxivActivity (cyclomatic 41, cognitive 42) ui/src/components/ChatPanel.tsx:1967 — alphaxivActivity has cyclomatic complexity 41 and cognitive complexity 42; 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.
R2 · Cyclomatic Complexity · Complex function AcpHarnessDialog (cyclomatic 39, cognitive 34) · ×1
  • Complex function AcpHarnessDialog (cyclomatic 39, cognitive 34) ui/src/components/AcpHarnessDialog.tsx:15 — AcpHarnessDialog has cyclomatic complexity 39 and cognitive complexity 34; 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.
R2 · Cyclomatic Complexity · Complex function OptionPicker (cyclomatic 37, cognitive 31) · ×1
  • Complex function OptionPicker (cyclomatic 37, cognitive 31) ui/src/components/ModelPicker.tsx:989 — OptionPicker has cyclomatic complexity 37 and cognitive complexity 31; 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.
R2 · Cyclomatic Complexity · Complex function Brand (cyclomatic 36, cognitive 33) · ×1
  • Complex function Brand (cyclomatic 36, cognitive 33) ui/src/components/Header.tsx:42 — Brand has cyclomatic complexity 36 and cognitive complexity 33; 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.
R2 · Cyclomatic Complexity · Complex function RunContactNotice (cyclomatic 35, cognitive 28) · ×1
  • Complex function RunContactNotice (cyclomatic 35, cognitive 28) ui/src/components/RunContactNotice.tsx:78 — RunContactNotice has cyclomatic complexity 35 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.
R2 · Cyclomatic Complexity · Complex function navigateKeyboardList (cyclomatic 34, cognitive 37) · ×1
  • Complex function navigateKeyboardList (cyclomatic 34, cognitive 37) ui/src/keyboardNavigation.ts:3 — navigateKeyboardList has cyclomatic complexity 34 and cognitive complexity 37; 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.
R2 · Cyclomatic Complexity · Complex function WorkspaceConnection (cyclomatic 34, cognitive 31) · ×1
  • Complex function WorkspaceConnection (cyclomatic 34, cognitive 31) ui/src/components/WorkspaceConnection.tsx:64 — WorkspaceConnection has cyclomatic complexity 34 and cognitive complexity 31; 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.
R2 · Cyclomatic Complexity · Complex function AgentList (cyclomatic 34, cognitive 27) · ×1
  • Complex function AgentList (cyclomatic 34, cognitive 27) ui/src/components/SettingsPage.tsx:419 — AgentList has cyclomatic complexity 34 and cognitive complexity 27; 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.
R2 · Cyclomatic Complexity · Complex function shellWords (cyclomatic 33, cognitive 55) · ×1
  • Complex function shellWords (cyclomatic 33, cognitive 55) REDACTED:41 — shellWords has cyclomatic complexity 33 and cognitive complexity 55; 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.
R2 · Cyclomatic Complexity · Complex function questionReplies (cyclomatic 33, cognitive 39) · ×1
  • Complex function questionReplies (cyclomatic 33, cognitive 39) ui/src/chatRendering.ts:68 — questionReplies has cyclomatic complexity 33 and cognitive complexity 39; 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.
R2 · Cyclomatic Complexity · Complex function visit (cyclomatic 33, cognitive 37) · ×1
  • Complex function visit (cyclomatic 33, cognitive 37) e2e/lint.ts:37 — visit has cyclomatic complexity 33 and cognitive complexity 37; 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.
R2 · Cyclomatic Complexity · Complex function OverleafPanel (cyclomatic 32, cognitive 38) · ×1
  • Complex function OverleafPanel (cyclomatic 32, cognitive 38) ui/src/components/OverleafPanel.tsx:239 — OverleafPanel has cyclomatic complexity 32 and cognitive complexity 38; 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.
R2 · Cyclomatic Complexity · Complex function ToolGroup (cyclomatic 32, cognitive 35) · ×1
  • Complex function ToolGroup (cyclomatic 32, cognitive 35) ui/src/components/ChatPanel.tsx:2816 — ToolGroup has cyclomatic complexity 32 and cognitive complexity 35; 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.
R2 · Cyclomatic Complexity · Complex function TerminalView (cyclomatic 32, cognitive 28) · ×1
  • Complex function TerminalView (cyclomatic 32, cognitive 28) ui/src/components/DetailDrawer.tsx:93 — TerminalView has cyclomatic complexity 32 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.
R2 · Cyclomatic Complexity · Complex function resize (cyclomatic 31, cognitive 28) · ×1
  • Complex function resize (cyclomatic 31, cognitive 28) REDACTED:189 — resize has cyclomatic complexity 31 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.
R2 · Cyclomatic Complexity · Complex function HfSection (cyclomatic 31, cognitive 24) · ×1
  • Complex function HfSection (cyclomatic 31, cognitive 24) ui/src/components/SettingsPage.tsx:3302 — HfSection has cyclomatic complexity 31 and cognitive complexity 24; 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.
R2 · Cyclomatic Complexity · Complex function commandRunIds (cyclomatic 30, cognitive 58) · ×1
  • Complex function commandRunIds (cyclomatic 30, cognitive 58) ui/src/components/ChatPanel.tsx:1430 — commandRunIds has cyclomatic complexity 30 and cognitive complexity 58; 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.
R3 · Large Files · ui/src/components/ChatPanel.tsx · ×1
  • ui/src/components/ChatPanel.tsx: 8585 lines of code ui/src/components/ChatPanel.tsx:1 — ui/src/components/ChatPanel.tsx has 8585 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/SettingsPage.tsx · ×1
  • ui/src/components/SettingsPage.tsx: 4782 lines of code ui/src/components/SettingsPage.tsx:1 — ui/src/components/SettingsPage.tsx has 4782 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/api.ts · ×1
  • ui/src/api.ts: 3045 lines of code ui/src/api.ts:1 — ui/src/api.ts has 3045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/App.tsx · ×1
  • ui/src/App.tsx: 2621 lines of code ui/src/App.tsx:1 — ui/src/App.tsx has 2621 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/ModelPicker.tsx · ×1
  • ui/src/components/ModelPicker.tsx: 1268 lines of code ui/src/components/ModelPicker.tsx:1 — ui/src/components/ModelPicker.tsx has 1268 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/AddAgentDialog.tsx · ×1
  • ui/src/components/AddAgentDialog.tsx: 1203 lines of code ui/src/components/AddAgentDialog.tsx:1 — ui/src/components/AddAgentDialog.tsx has 1203 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · dev.ts · ×1
  • dev.ts: 973 lines of code dev.ts:1 — dev.ts has 973 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/FileViewer.tsx · ×1
  • ui/src/components/FileViewer.tsx: 947 lines of code ui/src/components/FileViewer.tsx:1 — ui/src/components/FileViewer.tsx has 947 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/queries/settings.ts · ×1
  • ui/src/queries/settings.ts: 891 lines of code ui/src/queries/settings.ts:1 — ui/src/queries/settings.ts has 891 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/ArtifactsTab.tsx · ×1
  • ui/src/components/ArtifactsTab.tsx: 765 lines of code ui/src/components/ArtifactsTab.tsx:1 — ui/src/components/ArtifactsTab.tsx has 765 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/ComposerEditor.tsx · ×1
  • ui/src/components/ComposerEditor.tsx: 667 lines of code ui/src/components/ComposerEditor.tsx:1 — ui/src/components/ComposerEditor.tsx has 667 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/NewProjectForm.tsx · ×1
  • ui/src/components/NewProjectForm.tsx: 639 lines of code ui/src/components/NewProjectForm.tsx:1 — ui/src/components/NewProjectForm.tsx has 639 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/TreeView.tsx · ×1
  • ui/src/components/TreeView.tsx: 617 lines of code ui/src/components/TreeView.tsx:1 — ui/src/components/TreeView.tsx has 617 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/markdownLivePreview.ts · ×1
  • ui/src/markdownLivePreview.ts: 575 lines of code ui/src/markdownLivePreview.ts:1 — ui/src/markdownLivePreview.ts has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/RemoteRuntime.tsx · ×1
  • ui/src/RemoteRuntime.tsx: 532 lines of code ui/src/RemoteRuntime.tsx:1 — ui/src/RemoteRuntime.tsx has 532 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 525 lines of code REDACTED:1 — REDACTED has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/SkillsTab.tsx · ×1
  • ui/src/components/SkillsTab.tsx: 523 lines of code ui/src/components/SkillsTab.tsx:1 — ui/src/components/SkillsTab.tsx has 523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/Onboarding.tsx · ×1
  • ui/src/components/Onboarding.tsx: 502 lines of code ui/src/components/Onboarding.tsx:1 — ui/src/components/Onboarding.tsx has 502 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/ModelList.tsx · ×1
  • ui/src/components/ModelList.tsx: 486 lines of code ui/src/components/ModelList.tsx:1 — ui/src/components/ModelList.tsx has 486 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/components/HarnessLogo.tsx · ×1
  • ui/src/components/HarnessLogo.tsx: 461 lines of code ui/src/components/HarnessLogo.tsx:1 — ui/src/components/HarnessLogo.tsx has 461 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · ui/src/events.ts · ×1
  • ui/src/events.ts: 458 lines of code ui/src/events.ts:1 — ui/src/events.ts has 458 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · The declared test suite includes a file that cannot be loaded · ×1
  • The declared test suite includes a file that cannot be loaded ui/tests/abandonRun.test.mjs:5 — This repository declares test tooling, and the ✓ above records that declaration — but ui/tests/abandonRun.test.mjs and 47 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to.
R7 · Dead Code · Dead file (~104 LoC) · ×1
  • Dead file (~104 LoC) REDACTED — no import path from any entry point (22 application, 14 tooling, 143 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
R7 · Dead Code · Dead file (~23 LoC) · ×1
  • Dead file (~23 LoC) scripts/canary-manifest.mjs — no import path from any entry point (22 application, 14 tooling, 143 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
R7 · Dead Code · Dead file (~13 LoC) · ×1
  • Dead file (~13 LoC) scripts/canary-tag.mjs — no import path from any entry point (22 application, 14 tooling, 143 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
R8 · Dependency Hygiene · Unused dependency '@tanstack/router-cli' · ×1
  • Unused dependency '@tanstack/router-cli' ui/package.json:63 — Declared in ui/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.
X18 · Disposal-pattern correctness · Lock guard kept alive across a wait · ×1
  • Lock guard kept alive across a wait src/compute.rs:861 — `_guard` (line 861) is a synchronous lock guard, and it is still alive at the `.await` on line 887: the lock stays held while this task is suspended, so every other task or thread that needs it blocks — and a task that needs it on the same executor thread deadlocks. Release it before the wait — `drop(_guard);`, or confine it to an inner block that ends first — or, if it really must span the wait, use an async mutex (`tokio::sync::Mutex`) built to be held across `.await`.
X18 · Disposal-pattern correctness · Owned value's release suppressed and never restored · ×1
  • Owned value's release suppressed and never restored src/commands/app.rs:786 — `std::mem::forget(lock)` (line 786) takes `lock` out of Rust's ownership: its `Drop` never runs, so whatever it holds — a descriptor, a socket, a buffer, a lock — is never given back, and nothing can give it back later because the value is gone. Let it drop (or call its explicit close) where its work ends; if the handle must outlive this function, turn it into a raw handle with `into_raw`/`into_raw_fd` and reclaim it with the matching `from_raw` when the owner is done.
Minor — 73 finding(s)
X7 · Silent fallback defaults · Silent fallback default on Err · ×22
  • Silent fallback default on Err src/local/browser_cookies.rs:213 — `cookie_files` 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 src/local/chat/mod.rs:4456 — `renew_turn_leases` 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 src/commands/up/compute_settings.rs:602 — `expand_ssh_include` 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 src/config.rs:20 — `default_api_url` turns every `Err` into `"https://api.openresearch.sh".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:27 — `alphaxiv_api_url` turns every `Err` into `"https://api.alphaxiv.org".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:34 — `alphaxiv_web_url` turns every `Err` into `"https://www.alphaxiv.org".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:40 — `openalex_api_url` turns every `Err` into `"https://api.openalex.org".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:46 — `biorxiv_api_url` turns every `Err` into `"https://api.biorxiv.org".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:54 — `pubmed_api_url` turns every `Err` into `"https://eutils.ncbi.nlm.nih.gov/entrez/eutils".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:60 — `ncbi_email` turns every `Err` into `"orx@alphaxiv.org".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/config.rs:716 — `list_synced_env` 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 src/invocation.rs:23 — `orx` turns every `Err` into `"orx".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/jobs/huggingface.rs:76 — `endpoint` turns every `Err` into `"https://huggingface.co".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/local/datadir.rs:354 — `dir_size` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/local/harness/claude.rs:1548 — `installed_plugin_skills_dirs` 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 src/local/harness/claude.rs:1590 — `plugin_skill_roots` 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 src/local/harness/cursor.rs:594 — `read_log_tail` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err src/local/latex_templates.rs:294 — `list_in` 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 src/local/native_chats.rs:379 — `claude_sources` 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 src/local/overleaf.rs:328 — `support_files` 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 src/local/user_skills.rs:679 — `list_uploaded_in` 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 src/local/user_skills.rs:702 — `list_project_skills` 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.
X10 · Duplicated predicate · Duplicated predicate · ×21
  • Duplicated predicate ui/src/components/HarnessSetupDialog.tsx:358 — `!isRecord(value) || value.type !== "complete"` appears character-identically in 2 files — ui/src/components/HarnessSetupDialog.tsx, ui/src/components/SshConnectTerminal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/experimentLineageModel.ts:76 — `a.createdAt - b.createdAt || a.id.localeCompare(b.id)` appears character-identically in 2 files — ui/src/components/experimentLineageModel.ts, ui/src/delegates.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:86 — `end < text.length && !/\s/.test(text[end])` appears character-identically in 2 files — REDACTED, ui/src/fileMentions.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/ChatSearch.tsx:163 — `event.key === "ArrowDown" || event.key === "ArrowUp"` appears character-identically in 2 files — ui/src/components/ChatSearch.tsx, ui/src/components/ResumeDialog.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/queries/Events.tsx:121 — `event.type === "busy" || event.type === "usage"` appears character-identically in 2 files — ui/src/queries/Events.tsx, ui/src/queries/chat.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/StatusStrip.tsx:201 — `index > 0 && "border-t border-border-variant"` appears character-identically in 2 files — ui/src/components/StatusStrip.tsx, ui/src/components/UsageMenu.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/HarnessSetupDialog.tsx:238 — `isRecord(value) && value.type === "complete"` appears character-identically in 2 files — ui/src/components/HarnessSetupDialog.tsx, ui/src/components/SshConnectTerminal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:83 — `start > 0 && !/\s/.test(text[start - 1])` appears character-identically in 2 files — REDACTED, ui/src/fileMentions.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/DelegateCard.tsx:50 — `status === "asking" || status === "approval"` appears character-identically in 2 files — ui/src/components/DelegateCard.tsx, ui/src/components/WorkspaceTools.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/components/ArchiveMenu.tsx:87 — `typeof document !== "undefined" && document.documentElement.dir === "rtl"` appears character-identically in 6 files — ui/src/components/ArchiveMenu.tsx, ui/src/components/ComposerProjectPicker.tsx, ui/src/components/FileTreeActions.tsx, ui/src/components/ProjectInfoCard.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate ui/src/acp.ts:29 — `typeof value === "object" && value !== null && !Array.isArray(value)` appears character-identically in 2 files — ui/src/acp.ts, ui/src/workspaceState.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/local/harness/codex.rs:4834 — `ctx.native_session_id.is_some() && native_session.is_none()` appears character-identically in 2 files — src/local/harness/codex.rs, src/local/harness/opencode.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/local/harness/claude.rs:3201 — `ctx.native_session_id.is_some() && resume.is_none()` appears character-identically in 2 files — src/local/harness/claude.rs, src/local/harness/cursor.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/compute.rs:806 — `error.kind() == std::io::ErrorKind::WouldBlock && std::time::Instant::now() < deadline` appears character-identically in 2 files — src/compute.rs, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/jobs/localbox/windows.rs:26 — `handle.is_null() || handle == INVALID_HANDLE_VALUE` appears character-identically in 2 files — src/jobs/localbox/windows.rs, src/local/codex.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/engine/reconcile.rs:618 — `phase != Phase::Submitting && !tombstone` appears character-identically in 2 files — src/engine/reconcile.rs, src/engine/submit.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/orx-host/src/platform.rs:75 — `process.starttime == identity.starttime && process.live()` appears character-identically in 2 files — crates/orx-host/src/platform.rs, crates/orx-host/src/wrapper.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/engine/adapters/ssh.rs:808 — `range.end < range.start || range.end - range.start > MAX_PAGE_LEN` appears character-identically in 2 files — src/engine/adapters/ssh.rs, src/engine/fake.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/orx-host/src/legacy.rs:257 — `result.code == Some(0) && !result.timed_out` appears character-identically in 3 files — crates/orx-host/src/legacy.rs, crates/orx-host/src/server.rs, crates/orx-host/src/wrapper.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/orx-host/src/server.rs:964 — `result.code == Some(0) && !result.timed_out && !result.stdout_truncated` appears character-identically in 2 files — crates/orx-host/src/server.rs, src/engine/adapters/openresearch.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate src/remote.rs:22 — `std::env::var_os("NO_COLOR").is_none() && std::io::stderr().is_terminal()` appears character-identically in 2 files — src/remote.rs, src/updates.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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×3
  • Hand-rolled JSON/XML parsing via regex ui/src/researchActivity.ts:10 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex ui/src/researchActivity.ts:30 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex ui/src/researchActivity.ts:31 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: ui/src/components/GitDiff.tsx, src/commands/instance.rs, src/jobs/tinker.rs, src/commands/invocation_gate.rs, ui/src/chatRecovery.ts. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 4 significant file(s) lose their only recent owner: src/local/latex_templates.rs, src/jobs/localbox/python.rs, windows/launcher/src/main.rs, src/invocation.rs. Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×2
  • Projects may be oversized for their cohesion Cargo.toml:1 — `(repository root)` (205519 LoC, 672 module-visible types across 29 directories) overshoots its size bounds. 2 of 5 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion ui/package.json:1 — `ui` (53937 LoC, 521 module-visible types across 8 directories) overshoots its size bounds. 2 of 5 build unit(s) (Cargo, npm) overshoot their size bounds, lowering Project Cohesion to 2.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no build, run or usage example crates/orx-host/README.md:1 — `orx-host` is a binary crate (`src/main.rs`) and neither `crates/orx-host/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found Cargo.toml:17 — 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/`. ADRs are expected here because `Cargo.toml` makes this repository a deployable product (line 17).
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift demo/nanochat/base/README.md:26 — demo/nanochat/base/README.md links to `dev/LEADERBOARD.md`, but `demo/nanochat/base/dev/LEADERBOARD.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/5 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `.`, `windows/launcher`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation e2e/package.json:12 — `e2e/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'isImageFile' · ×1
  • Unused export 'isImageFile' ui/src/components/FileTypeIcon.tsx:9 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'GitDiff' · ×1
  • Unused export 'GitDiff' ui/src/components/GitDiff.tsx:239 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'useTourBounds' · ×1
  • Unused export 'useTourBounds' ui/src/components/tourGeometry.ts:15 — Nothing imports this binding — it is safe to review for removal.
R8 · Dependency Hygiene · Type-only dependency '@lezer/common' in production deps · ×1
  • Type-only dependency '@lezer/common' in production deps ui/src/markdownLivePreview.ts:22 — Every import is type-only — move it to devDependencies.
S1 · Web-Security Posture · Security headers incomplete · ×1
  • Security headers incomplete — Set: Content-Security-Policy, Cross-Origin-Opener-Policy, Referrer-Policy, X-Content-Type-Options, X-Frame-Options. Missing: Strict-Transport-Security — the four headers that carry the points of this card's security-headers term (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options), 0.5 each.(−0.5 on this card.) The server: `axum::serve(` (src/plane/local_plane.rs:627).
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 7/9 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X7 · Silent fallback defaults · Pending state with no failure state · ×1
  • Pending state with no failure state REDACTED:273 — The view draws `<div class="file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted">` under `page === null || page !== prepared . page`, but `page` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
Minor — 23 finding(s)
D12 · Dependency Hygiene · Outdated · ×22
  • Outdated: anyhow — `anyhow` is locked at 1.0.102 but 1.0.104 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p anyhow` and commit the updated REDACTED.
  • Outdated: cc — `cc` is locked at 1.2.63 but 1.11.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/orx-host/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
  • Outdated: clap — `clap` is locked at 4.6.1 but 4.6.8 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: embed-resource — `embed-resource` is locked at 3.0.11 but 3.0.12 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p embed-resource` and commit the updated REDACTED.
  • Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: futures — `futures` is locked at 0.3.32 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures` and commit the updated REDACTED.
  • Outdated: glob — `glob` is locked at 0.3.3 but 0.3.4 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p glob` and commit the updated REDACTED.
  • Outdated: hyper — `hyper` is locked at 1.10.1 but 1.12.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hyper` and commit the updated REDACTED.
  • Outdated: hyper-util — `hyper-util` is locked at 0.1.20 but 0.1.21 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p hyper-util` and commit the updated REDACTED.
  • Outdated: libc — `libc` is locked at 0.2.186 but 0.2.191 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p libc` and commit the updated REDACTED.
  • Outdated: objc2 — `objc2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p objc2` and commit the updated REDACTED.
  • Outdated: roxmltree — `roxmltree` is locked at 0.21.1 but 0.21.2 is the current stable release on crates.io, and it already satisfies the `"0.21"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p roxmltree` and commit the updated REDACTED.
  • Outdated: rust-embed — `rust-embed` is locked at 8.11.0 but 8.14.0 is the current stable release on crates.io, and it already satisfies the `"8"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rust-embed` and commit the updated REDACTED.
  • Outdated: serde — `serde` is locked at 1.0.228 but 1.0.229 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: socket2 — `socket2` is locked at 0.6.4 but 0.6.5 is the current stable release on crates.io, and it already satisfies the `"0.6"` requirement declared in tests/support/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p socket2` and commit the updated REDACTED.
  • Outdated: tao — `tao` is locked at 0.37.1 but 0.37.2 is the current stable release on crates.io, and it already satisfies the `"0.37"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tao` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.52.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: tokio-util — `tokio-util` is locked at 0.7.18 but 0.7.20 is the current stable release on crates.io, and it already satisfies the `"0.7"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio-util` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.4.2 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/orx-host/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.23.2 but 1.29.3 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
  • Outdated: wry — `wry` is locked at 0.57.0 but 0.57.2 is the current stable release on crates.io, and it already satisfies the `"0.57"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wry` and commit the updated REDACTED.
D24 · Comment Value · doc comments repeat the names · ×1
  • doc comments repeat the names ui/src/modelSelection.ts:22 — 0 of 0 documented parameters and 1 of 1315 summaries in `orx-ui` only repeat the member or parameter name (e.g. ""1 model available", "3 models available"." for `modelsAvailable`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-d9a85dffca3a4c2b8765b79c7c05b7cf/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=566" --report-format json --report-path /tmp/watchdog-gitleaks-d9a85dffca3a4c2b8765b79c7c05b7cf/history-1.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d9a85dffca3a4c2b8765b79c7c05b7cf/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .39artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .23artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 5 file(s) — `ui/src/api.ts`, `ui/src/components/AddAgentDialog.tsx`, `ui/src/components/HarnessLogo.tsx`, `ui/src/queries/chatStore.ts`, `ui/src/useProjectWorkspace.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e961-5816-7cb2-ba3c-ad08a3e9b986 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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