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

deeplethe/utopia

Measured 27 October 2026, 16:32 UTC, at code version 7ecf991

Regression: 4 dimensions fell since the last survey Code coverage: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 53out of 100 Adequate
CriticalWeakAdequateStrongExemplary
Down 4 since the last survey

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

A large codebase: 145,892 lines of product code in 11 projects, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Accessibility, 45

Findings by how serious they are

98 critical 823 serious 169 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 16:32 UTC

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

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

92of 92 dimensions measured by tools.
1050of 1090 findings point to an exact file and line, so you can open each one in the code. The other 40 concern the repository as a whole, such as missing documentation.
92dimensions across 8 lenses, read from 145,892 lines of product code in 11 projects.
Chapters

Executive summary

deeplethe/utopia falls short of our standard for a preview release, in part because it has labels or groups of fields with no name. It scores 53 out of 100 and is rated Adequate, and 71 of its 98 critical findings are security problems.

Accessibility, at 45, is the weakest lens and counts most in the score. The best first step is replacing the eight exposed passwords or keys and switching the old ones off, worth about 4 points. Adding text alternatives would lift Accessibility itself, also worth about 4. Raising Accessibility to 65 would lift the score to about 58.

Twenty-eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Twenty-five weaknesses in the code could be used by an attacker, and eight passwords or keys in the code and one in the code's history are open to anyone who can read the repository. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and replacing each exposed password or key would close these risks. Updating the vulnerable packages would fix the four packages with a known security hole, and limiting each secret to its own step would deal with the three secrets exposed to more of the pipeline than needed. The 18 labels or groups of fields with no name need connecting to their fields or naming.

The product code is 145,892 lines, about €210,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.
Accessibility 45 · counts for 45%Production Readiness 50 · counts for 25%Code Health 57 · counts for 14%Security and Compliance 67 · counts for 8%Architecture 78 · counts for 4%Maturity 86 · counts for 2%Domain Modelling 100 · counts for 1%Performance 100 · counts for 1%

If Accessibility rose from 45 to 65, the lowest score rated Strong, the score would rise from 53 to about 58.

Code composition: what the lines of code are
Product code 67%Tests 33%
New since the last survey: 123 findings

These 123 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

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

Fixed since the last survey: 91 findings

These 91 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.

  • Cognitive Complexity · utopia_ingest::parsers::spreadsheet_grid (cognitive 23) crates/utopia-ingest/src/parsers.rs
  • Cognitive Complexity · utopia_server::ontology_agent::adopt (cognitive 16) crates/utopia-server/src/ontology_agent.rs
  • God Classes · FunctionTooLong: utopia_server::ontology_agent::adopt crates/utopia-server/src/ontology_agent.rs
  • God Classes · FileTooLong: api/documents_routes.rs crates/utopia-server/src/api/documents_routes.rs
  • Code Duplication · Near-duplicate member pair (39 shared lines) crates/utopia-server/src/api/sources_routes.rs
  • Code Duplication · Edited copy of a member (30 corresponding lines) crates/utopia-store/src/documents.rs
  • Code Duplication · Duplicated block (19–20 lines × 2) crates/utopia-reason/src/rules.rs
  • Code Duplication · Duplicated block (18–19 lines × 2) crates/utopia-store/src/resolution.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/utopia-server/src/github_issues.rs
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Change Coupling · Change-coupling hub: extraction.rs → lib.rs, kbs.rs, mappings.rs crates/utopia-server/src/extraction.rs
  • Change Coupling · Change coupling: pipeline.rs ↔ api.ts crates/utopia-server/src/pipeline.rs
  • Change Coupling · Change coupling: AccountShell.tsx ↔ Shell.tsx web/src/pages/AccountShell.tsx
  • Supply-chain Provenance & Signing REDACTED
  • Code Duplication · Duplicated block with local edits (89 matched lines × 2 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (37 lines × 3 locations) web/src/pages/ontologyDialogs.tsx
  • Code Duplication · Duplicated block (18 lines × 2 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (17 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (16 lines × 5 locations) web/src/pages/Account.tsx
  • Code Duplication · Duplicated block (16 lines × 2 locations) web/src/pages/Chat.tsx
  • Code Duplication · Duplicated block (14 lines × 3 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (12 lines × 2 locations) web/src/pages/KbSettings.tsx
  • Code Duplication · Duplicated block (12 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (12 lines × 2 locations) web/src/pages/PendingFacts.tsx
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) web/src/pages/Chat.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) web/src/pages/Graph.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) web/src/pages/Graph.tsx
  • Code Duplication · Duplicated block (11 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (11 lines × 3 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/AccountShell.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/AlertBell.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/Graph.tsx
  • Code Duplication · Duplicated block (10 lines × 3 locations) web/src/pages/KbSettings.tsx
  • Code Duplication · Duplicated block (10 lines × 3 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/Settings.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/ontologyDialogs.tsx
  • Code Duplication · Duplicated block (10 lines × 2 locations) web/src/pages/ontologyDialogs.tsx
  • Code Duplication · Duplicated block (10 lines × 3 locations) web/src/pages/ontologyTables.tsx
  • Code Duplication · Duplicated block (9 lines × 3 locations) web/src/components/ui/dialog.tsx
  • Code Duplication · Duplicated block (9 lines × 2 locations) web/src/pages/Graph.tsx
  • Code Duplication · Duplicated block (9 lines × 2 locations) web/src/pages/KbSettings.tsx
  • Code Duplication · Duplicated block (9 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/api.ts
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/api.ts
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/pages/MyKbs.tsx
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (8 lines × 2 locations) web/src/router.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/AddOntologyRegressionDialog.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/Graph.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/KbSettings.tsx
  • Code Duplication · Duplicated block (7 lines × 3 locations) web/src/pages/KbSettings.tsx
  • Code Duplication · Duplicated block (7 lines × 4 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (7 lines × 3 locations) web/src/pages/PendingFacts.tsx
  • Code Duplication · Duplicated block (7 lines × 2 locations) web/src/pages/Review.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/KbSwitcher.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (6 lines × 5 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/Library.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/LoginScene.tsx
  • Code Duplication · Duplicated block (6 lines × 3 locations) web/src/pages/Mappings.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/Ontology.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/ReviewOverview.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/RulesPanel.tsx
  • Code Duplication · Duplicated block (6 lines × 2 locations) web/src/pages/ontologyDialogs.tsx
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) web/src/time.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) web/src/pages/Library.tsx
  • Cyclomatic Complexity · Complex function Graph (cyclomatic 43, cognitive 38) web/src/pages/Graph.tsx
  • Large Files · web/src/pages/Graph.tsx: 3537 lines of code web/src/pages/Graph.tsx
  • Large Files · web/src/api.ts: 2842 lines of code web/src/api.ts
  • Large Files · web/src/pages/Ontology.tsx: 2766 lines of code web/src/pages/Ontology.tsx
  • Large Files · web/src/i18n/en.ts: 2495 lines of code web/src/i18n/en.ts
  • Large Files · web/src/pages/Library.tsx: 2249 lines of code web/src/pages/Library.tsx
  • Large Files · web/src/pages/Review.tsx: 2232 lines of code web/src/pages/Review.tsx
  • Large Files · web/src/i18n/zh.ts: 2187 lines of code web/src/i18n/zh.ts
  • Large Files · web/src/ui/index.tsx: 1821 lines of code web/src/ui/index.tsx
  • Large Files · web/src/pages/Chat.tsx: 1110 lines of code web/src/pages/Chat.tsx
  • Large Files · web/src/pages/RulesPanel.tsx: 1023 lines of code web/src/pages/RulesPanel.tsx
  • Large Files · web/src/pages/ontologyDialogs.tsx: 832 lines of code web/src/pages/ontologyDialogs.tsx
  • Large Files · web/src/pages/KbSettings.tsx: 775 lines of code web/src/pages/KbSettings.tsx
  • Large Files · web/src/pages/Mappings.tsx: 734 lines of code web/src/pages/Mappings.tsx
  • Large Files · web/src/pages/ontologyTables.tsx: 622 lines of code web/src/pages/ontologyTables.tsx
  • Large Files · web/src/pages/Members.tsx: 516 lines of code web/src/pages/Members.tsx
  • Test Coverage · No test reaches this file web/src/unread.ts
  • Test Coverage · No test reaches this file web/src/useTitle.ts
  • Forms & labels · <Textarea> field component without a label web/src/pages/Library.tsx
  • Forms & labels · <Textarea> field component without a label web/src/pages/Library.tsx
Rebuild cost: about €210,000 · Estimate
Cost to rebuild€70,000 to €350,000, for 1,174 to 3,723 hours of work, about 1.5 person-years for 1 to 3 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.7 at a score of 53. 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: 145,892 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: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

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

1
Resolve the 8 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED.
Raises the score by about 4 points · Low effort · Secret Scanning
2
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.
Raises the score by about 4 points · Medium effort · Text alternatives
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 3 points · Medium effort · Forms & labels

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 €210,000 to build again, about 1.5 person-years of work. Its weakest lens is Accessibility, at 45 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 8 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 8 Secret Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.1 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 363,220 lines over the last 90 days, which is about 1,473,059 lines a year. At that pace, the extra work comes to an estimated 170.4 to 1022.3 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, 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 utopia-cli utopia-cli utopia-core utopia-core utopia-cli->utopia-core utopia-extract utopia-extract utopia-llm utopia-llm utopia-extract->utopia-llm utopia-ingest utopia-ingest utopia-reason utopia-reason utopia-search utopia-search utopia-server utopia-server utopia-server->utopia-core utopia-server->utopia-extract utopia-server->utopia-ingest utopia-server->utopia-llm utopia-server->utopia-reason utopia-server->utopia-search utopia-store utopia-store utopia-server->utopia-store utopia-store->utopia-core utopia-store->utopia-extract utopia-store->utopia-ingest utopia-store->utopia-reason utopia-web utopia-web

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.

207 modules, with 303 dependencies between them. 2 loops run through 4 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 167 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 utopia_core.error2 utopia_core.models3 utopia_ingest.blocks4 utopia_llm5 utopia_server.live6 utopia_server.query_engine7 utopia_store.paths8 web.src.pages9 utopia_extract.ontology_agent10 utopia_extract.phrase_align11 utopia_ingest.table12 utopia_reason.derive13 utopia_search14 utopia_server.api.chat_context15 utopia_server.llm_util16 utopia_extract.time17 utopia_reason18 utopia_server.api.chat_finalization19 utopia_server.state20 utopia_ingest.chunker21 utopia_server22 utopia_server.api.tools23 utopia_server.auth24 utopia_server.errata25 utopia_server.extraction_open26 utopia_server.governance27 utopia_server.implication28 utopia_server.ontology_agent29 utopia_server.phrase_alignment30 utopia_store.reasoning31 utopia_server.adjudication32 utopia_server.api.agent33 utopia_server.api.chat34 utopia_server.api.datasource_routes35 utopia_server.api.documents_routes36 utopia_server.api.graph_routes37 utopia_server.api.kbs38 utopia_server.api.ontology_routes39 utopia_server.api.sources_routes40 utopia_server.api.tools_graph
1 utopia_core.error
2 utopia_core.models
3 utopia_ingest.blocks
4 utopia_llm
5 utopia_server.live
6 utopia_server.query_engine
7 utopia_store.paths
8 web.src.pages
9 utopia_extract.ontology_agent1
10 utopia_extract.phrase_align1
11 utopia_ingest.table1
12 utopia_reason.derive21
13 utopia_search1
14 utopia_server.api.chat_context1
15 utopia_server.llm_util221
16 utopia_extract.time11
17 utopia_reason21
18 utopia_server.api.chat_finalization11
19 utopia_server.state112
20 utopia_ingest.chunker11
21 utopia_server1111
22 utopia_server.api.tools312
23 utopia_server.auth23
24 utopia_server.errata1111
25 utopia_server.extraction_open411
26 utopia_server.governance422
27 utopia_server.implication211
28 utopia_server.ontology_agent11121
29 utopia_server.phrase_alignment2111
30 utopia_store.reasoning174
31 utopia_server.adjudication111
32 utopia_server.api.agent1112
33 utopia_server.api.chat1111111
34 utopia_server.api.datasource_routes1111
35 utopia_server.api.documents_routes11112
36 utopia_server.api.graph_routes12112
37 utopia_server.api.kbs2112
38 utopia_server.api.ontology_routes3112
39 utopia_server.api.sources_routes1112
40 utopia_server.api.tools_graph425
Uses a module listed above itPart of a loopThe module itself
1 utopia_core.error2 utopia_core.models3 utopia_ingest.blocks4 utopia_llm5 utopia_server.live6 utopia_server.query_engine7 utopia_store.paths8 web.src.pages9 utopia_extract.ontology_agent10 utopia_extract.phrase_align11 utopia_ingest.table12 utopia_reason.derive13 utopia_search14 utopia_server.api.chat_context15 utopia_server.llm_util16 utopia_extract.time17 utopia_reason18 utopia_server.api.chat_finalization19 utopia_server.state20 utopia_ingest.chunker21 utopia_server22 utopia_server.api.tools23 utopia_server.auth24 utopia_server.errata25 utopia_server.extraction_open26 utopia_server.governance27 utopia_server.implication28 utopia_server.ontology_agent29 utopia_server.phrase_alignment30 utopia_store.reasoning31 utopia_server.adjudication32 utopia_server.api.agent33 utopia_server.api.chat34 utopia_server.api.datasource_routes35 utopia_server.api.documents_routes36 utopia_server.api.graph_routes37 utopia_server.api.kbs38 utopia_server.api.ontology_routes39 utopia_server.api.sources_routes40 utopia_server.api.tools_graphutopia_core.error1utopia_core.models2utopia_ingest.blocks3utopia_llm4utopia_server.live5utopia_server.query_engine6utopia_store.paths7web.src.pages8utopia_extract.ontology_agent9utopia_extract.phrase_align10utopia_ingest.table11utopia_reason.derive12utopia_search13utopia_server.api.chat_context14utopia_server.llm_util15utopia_extract.time16utopia_reason17utopia_server.api.chat_finalization18utopia_server.state19utopia_ingest.chunker20utopia_server21utopia_server.api.tools22utopia_server.auth23utopia_server.errata24utopia_server.extraction_open25utopia_server.governance26utopia_server.implication27utopia_server.ontology_agent28utopia_server.phrase_alignment29utopia_store.reasoning30utopia_server.adjudication31utopia_server.api.agent32utopia_server.api.chat33utopia_server.api.datasource_routes34utopia_server.api.documents_routes35utopia_server.api.graph_routes36utopia_server.api.kbs37utopia_server.api.ontology_routes38utopia_server.api.sources_routes39utopia_server.api.tools_graph4011121112211121111121111113122311114114222111112121111741111112111111111111111212112211231121112425+167 more modules (most-connected shown)

At a glance — Code Health · 57% · Adequate · gated by D1, D2, X3 ·

At a glance — Architecture · 78% · Strong ·

At a glance — Maturity · 86% · Exemplary ·

At a glance — Readiness · 50% · Adequate · gated by D13, P7 ·

At a glance — Security · 67% · Adequate · gated by D29, D30, D36 ·

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

At a glance — Accessibility · 45% · Adequate · gated by AC1, AC2 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection65High / Critical
A03:2025 — Software Supply Chain Failures43High / Critical
A07:2025 — Authentication Failures10High / Critical
A02:2025 — Security Misconfiguration5High / Critical

Roadmap

Immediately resolve the eight leaked secrets in configuration and script files to secure the codebase. Simultaneously, address the extensive accessibility gaps by labeling all form controls and buttons, adding text alternatives for media, and ensuring custom interactive elements are fully keyboard-operable. Finally, integrate accessibility enforcement into the development toolchain and CI pipeline to prevent future regressions.

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

Do thisHelpsEffortDimension
Resolve the 8 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED.+4.5 ptsLowSecret Scanning
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.+3.6 ptsMediumText alternatives
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+2.7 ptsMediumForms & labels
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+2.6 ptsMediumA11y enforcement
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.3 ptsMediumKeyboard semantics
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.9 ptsMediumVisual & motion safety
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.7 ptsMediumOutbound HTTP resilience
Swallowed exception (empty catch)+1.2 ptsMediumException handling

File quality

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

FileScoreBandWorst signal
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.4MixedSecret Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED

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

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

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

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

Could not be resolved — 10

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

Methodology & how to trust this report

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

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

What we checked — 92 dimensions across the health lenses
D1D2D3D4D5D6D7D9D10D12D13D14D15D16D17D19D20D25D26D28D29D30D31D34D35D36D37D43AC1AC2AC3AC4AC5AC6AC7AX10AX3AX4AX6AX9C1C2C3C4DM4DM6M1M2M3M4P1P10P2P3P4P5P6P7P8PF3R1R10R2R3R4R6R7R8R9S1X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X27X28X29X3X30X4X5

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a17e35-17b7-7c00-b0fb-8bb82227e9de.

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.

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 237 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 226 test source file(s) (.rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and did not finish re-running within its tier budget — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in web/ (307 tests)): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 1 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (docker-compose.build.yml). compose up failed (exit 17 — an image could not be built) — failed to solve: debian:bookworm-slim: failed to resolve source metadata for docker.io/library/debian:bookworm-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/debian/manifests/bookworm-slim": Forbidden; runtime evidence skipped.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9). 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.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 48 further occurrence(s) are not listed individually; the score already reflects all 88.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • 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 is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D25 ADR Conformance: ADR conformance is the LLM-scored fraction of sampled code that follows recorded decisions — it checks the decisions that were written down and the slices it sampled, not unrecorded rules or the whole tree.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • C3 Audit Trail: This control is scored from in-repo evidence only — a working control configured outside the repository leaves no signal a static scan can credit.
  • C4 Data Retention: This control is scored from in-repo evidence only — its real-world effectiveness, exercised only at runtime, is outside a static scan.
  • DM4 Rich vs anemic domain model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • 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 Complexity3.0 / 10Weak✓ 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 3.0 / 10 · rule-coverage 100% · ceiling Prevented

115 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Graph.Graph at 242. A further 1 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 ContentError::code at 17 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/utopia-server/src/rss_full_content.rs (ContentError::code at 17). 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.

utopia_server::phrase_alignment::align_phrases_locked (cyclomatic 84) · ×35crates/utopia-server/src/phrase_alignment.rs:727
utopia_store::graph::insert_fact_on (cyclomatic 60) · ×10REDACTED:595
utopia_ingest::parsers::docx_xml_to_text (cyclomatic 63) · ×8crates/utopia-ingest/src/parsers.rs:252
utopia_reason::derive::contradictions (cyclomatic 44) · ×6crates/utopia-reason/src/derive.rs:588
utopia_extract::ontology_agent::parse_proposal_response (cyclomatic 23) · ×5crates/utopia-extract/src/ontology_agent.rs:294

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with Graph.Graph (cyclomatic 242), Chat.Chat (cyclomatic 122). — 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 2 together lifts Cyclomatic Complexity from 3.0 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

173 method(s) exceeded the cognitive complexity threshold of 15; the worst was Graph.Graph at 289.

utopia_server::phrase_alignment::align_phrases_locked (cognitive 154) · ×50crates/utopia-server/src/phrase_alignment.rs:727
utopia_store::graph::insert_fact_on (cognitive 99) · ×21REDACTED:595
utopia_ingest::parsers::docx_xml_to_text (cognitive 108) · ×17crates/utopia-ingest/src/parsers.rs:252
utopia_extract::ontology_agent::parse_proposal_response (cognitive 37) · ×11crates/utopia-extract/src/ontology_agent.rs:294
utopia_reason::derive::contradictions (cognitive 112) · ×10crates/utopia-reason/src/derive.rs:588

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

What to do

  1. Bring the 26 bodies over 60 down to 60 or less in Cognitive Complexity — start with Graph.Graph (cognitive 289), Library.SourceModal (cognitive 244), utopia_server::phrase_alignment::align_phrases_locked (cognitive 154). — 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 26 together lifts Cognitive Complexity from 2.0 to about 4.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes7.6 / 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.6 / 10 · rule-coverage 100% · ceiling Prevented

159 god class(es) detected.

FunctionTooLong: Graph.Graph · ×103web/src/pages/Graph.tsx:268
FileTooLong: pages/Graph.tsx · ×46web/src/pages/Graph.tsx
ClassTooLong: Graph · ×8web/src/pages/Graph.tsx:1
MethodTooLong: DatabricksEngine.runcrates/utopia-server/src/query_engine/databricks.rs:126
TooManyFields: EntityFactcrates/utopia-core/src/models.rs:798

What to do

  1. Resolve the 103 FunctionTooLong finding(s) in God Classes — start with Ontology.tsx (6), Library.tsx (6), ontology_agent.rs (5). — One of this dimension's main actionable groups (103 warning-level).
  2. Resolve the 46 FileTooLong finding(s) in God Classes — start with lib.rs (2), governance.rs (2), Graph.tsx. — One of this dimension's main actionable groups (46 warning-level).
  3. Resolve the 8 ClassTooLong finding(s) in God Classes — start with Graph.tsx, api.ts, Review.tsx. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.6 / 10Stronggated by 127 serious findings✓ Tool-verified

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

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

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

125 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .tsx (20% 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) · ×19crates/utopia-extract/src/align.rs:116
Duplicated block (8 lines × 2) · ×11crates/utopia-reason/src/rules.rs:334
Duplicated block (9 lines × 2) · ×10crates/utopia-extract/src/governor.rs:136
Duplicated block (5 lines × 2) · ×9crates/utopia-ingest/src/parsers.rs:179
Duplicated block (7 lines × 2) · ×8crates/utopia-extract/src/ontology_agent.rs:156

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

What to do

  1. Resolve the 19 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with parsers.rs (3), sources_routes.rs (2), main.rs (2). — One of this dimension's main actionable groups (19 warning-level).
  2. Resolve the 11 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with tools_graph.rs (2), rules.rs, http_fetch.rs. — One of this dimension's main actionable groups (11 warning-level).
  3. Resolve the 10 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with tools_graph.rs (2), chat.rs (2), governor.rs. — One of this dimension's main actionable groups (10 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Prevented

10 production modules (Cargo+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 5 module(s) off the main sequence.

Off the main sequence: utopia-core · ×5

What to do

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

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

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 46 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

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

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Classify ADR enforcement: 0001 · Ontology import and governance · ×64docs/decisions/0001-ontology-import-and-governance.md

What to do

  1. Resolve the 64 Classify ADR enforcement finding(s) in Architectural Integrity — start with 0001-ontology-import-and-governance.md, 0002-reasoning-engine.md, 0003-ontology-growth-loop.md. — One of this dimension's main actionable groups (64 recommendation-level).
  2. Enforce Architectural Integrity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

1888 test methods: 1454 unit, 434 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 237 `it`/`test` case(s) across 49 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 1651 `#[test]` function(s) across 328 file(s) declaring at least one; its unit/integration split is Cargo's own — 160 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

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

Mock-dominated test: preserves the HTTP status and code for an already-running conversation · ×3web/src/chatStream.test.ts:57

✓ On the Gold path — maintain.

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

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

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

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

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

16 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: encoding_rs · ×16

✓ On the Gold path — maintain.

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

D13 · Secret Scanning0.0 / 10Critical✓ Tool-verified

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 0.0 / 10 · rule-coverage 100% · ceiling Prevented

7 secret(s) detected.

REDACTED

What to do

  1. Resolve the 8 Leaked secret finding(s) in Secret Scanning — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (8 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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 588 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 Apache-2.0, 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 Hotspots8.5 / 10Strong✓ 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 8.5 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: web/src/pages/Graph.tsx (68×242=16456); web/src/pages/Chat.tsx (41×122=5002); REDACTED (82×60=4920)

Hotspot: web/src/pages/Graph.tsx · ×67web/src/pages/Graph.tsx:268

What to do

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

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

D16 · Bus Factor7.6 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

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

59 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is web/src/ui/index.tsx. Counted over 244 of the 295 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
Further sole-owners (lower concentration)

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

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 145892 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 Quality10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 23 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality4.7 / 10Weak✓ Tool-verified

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

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

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

43 of 64 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question). How well each record argues its case is not measured.

ADR has no Context and Consequences section · ×37docs/decisions/0001-ontology-import-and-governance.md:1detected by adr-integrity
ADR has no Consequences section · ×3docs/decisions/0044-the-ontology-is-a-view-over-what-documents-say.md:1detected by adr-integrity
ADR has no Context and Decision section · ×2docs/decisions/0029-a-rule-may-say-or-once.md:1detected by adr-integrity
ADR has no Decision and Consequences sectiondocs/decisions/0051-a-human-phrase-decision-carries-its-materialization-work.md:1detected by adr-integrity

What to do

  1. Resolve the 37 ADR has no Context and Consequences section finding(s) in ADR Quality — start with 0001-ontology-import-and-governance.md, 0002-reasoning-engine.md, 0003-ontology-growth-loop.md. — One of this dimension's main actionable groups (37 recommendation-level).
  2. Resolve the 3 ADR has no Consequences section finding(s) in ADR Quality — start with 0044-the-ontology-is-a-view-over-what-documents-say.md, 0053-a-phrase-decision-records-the-inputs-it-considered.md, 0062-the-export-says-what-is-contested.md. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 2 ADR has no Context and Decision section finding(s) in ADR Quality — start with 0029-a-rule-may-say-or-once.md, 0032-a-rule-computes-what-it-concludes.md. — One of this dimension's main actionable groups (2 recommendation-level).

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

D25 · ADR Conformance6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code actually follows the decisions recorded in the project's ADRs.

Method: Judged by language model at low temperature against ADRs plus a deterministic structural code summary; findings linked to repo-rooted ADR paths for traceability. Advisory.

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

4 of 10 checkable records are broken by the code (10 of 48 binding records state a rule in checkable form; prose decisions are unverifiable).

ADR not followed: 0003 · The ontology grows out of the corpus · ×4docs/decisions/0003-ontology-growth-loop.md:43detected by adr-prohibition

What to do

  1. Resolve the 4 ADR not followed finding(s) in ADR Conformance — start with 0003-ontology-growth-loop.md, 0015-recording-a-sentence-is-not-asserting-a-fact.md, 0065-readers-choose-their-provider.md. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Enforce ADR Conformance in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D26 · Project Cohesion4.5 / 10Weak✓ Tool-verified

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

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

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

3 of 11 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)0.0 / 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.0 / 10 · rule-coverage 100% · ceiling Documented

66 finding(s): 0 critical, 57 high, 9 medium, 0 low. 28 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `scripts/smoke.sh` (line 63) — 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 3 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

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

What to do

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

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

D30 · Dependency Vulnerabilities1.5 / 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.

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

36 finding(s): 0 critical, 4 high, 32 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D31 · IaC & Container Security9.3 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

5 finding(s): 0 critical, 1 high, 3 medium, 1 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 High IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d31_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 244 of the 295 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 Coupling8.8 / 10Strong✓ Tool-verified

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. 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 8.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: alerts.rs↔zh.ts 80%; Graph.tsx↔OntologySchemaGraph.tsx 72%; phrase_alignment.rs↔type_alignment.rs 67%

Change coupling: Graph.tsx ↔ OntologySchemaGraph.tsx · ×6web/src/pages/Graph.tsx:1
Change-coupling hub: zh.ts → models.rs, ingest_sources.rs, alerts.rs, extraction_drops.rs, governance.rs · ×2web/src/i18n/zh.ts
Change coupling clique: AccountShell.tsx, Docs.tsx, Shell.tsxweb/src/pages/AccountShell.tsx

What to do

  1. Resolve the 6 Change coupling finding(s) in Change Coupling — start with ingest_sources.rs (2), Graph.tsx, phrase_alignment.rs. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with zh.ts, extraction.rs. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with AccountShell.tsx. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives2.7 / 10Weak✓ 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.

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×2) — web/src/pages/Graph.tsx:1697, web/src/pages/OntologySchemaGraph.tsx:1110

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 & labels3.8 / 10Weak✓ 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 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. (×2) — web/src/pages/Chat.tsx:559, web/src/pages/Library.tsx:1749
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — web/src/pages/Graph.tsx:2204
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×18) — web/src/pages/KbSettings.tsx:257, web/src/pages/KbSettings.tsx:264, web/src/pages/KbSettings.tsx:352, …
  • This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — web/src/pages/Library.tsx:1611, web/src/pages/Library.tsx:2022, web/src/pages/Tokens.tsx:347, …
  • 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) — web/src/ui/index.tsx:554, web/src/ui/index.tsx:730
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×3) — web/src/ui/index.tsx:778, web/src/ui/index.tsx:785, web/src/ui/toast.tsx:74
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — web/src/ui/index.tsx:1545

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 semantics4.8 / 10Adequate✓ 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> 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. — web/src/pages/Graph.tsx:2137
  • This <span> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler. — web/src/pages/Graph.tsx:2758

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.4 / 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.

  • `.u-scrub-island` moves (`transition: background-color var(--u-base) ease, width 300ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/src/styles.css:463
  • `.u-modal-in` moves (`animation: u-modal-panel-kf 0.18s cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/src/styles.css:534
  • `.u-progress-fill` moves (`transition: width 500ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/src/styles.css:904
  • `.u-thinking` moves (`animation: u-thinking-kf 1.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — web/src/styles.css:1375

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.
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 74 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with vitest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition6.2 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

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

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

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

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

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

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

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.

C1 · Data Protection6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

  • No in-app HTTPS enforcement, but the server reads the forwarded scheme (X-Forwarded-Proto, actix's connection_info().scheme(), Rocket's proxy_proto_header) — a TLS-terminating reverse proxy sits in front of it, where serving TLS in the app would be wrong. Verify the reverse proxy enforces TLS. — crates/utopia-server/src/auth.rs:99

What to do

  • Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, GCP KMS / Secret Manager, Azure Key Vault, HashiCorp Vault — not a key read from an environment variable beside the data) and encrypt the most sensitive columns (an AEAD over the field before Diesel/sqlx write it, SQLCipher, pgcrypto) — partial coverage still leaves gaps.
C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

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.

C3 · Audit Trail10.0 / 10Exemplary✓ Tool-verified

Other · Security — Whether changes to sensitive data are recorded (who, what, when) for compliance + incident response.

Method: Roslyn scan: audit-trail mechanism graded (SaveChanges interceptor/immutable AuditLog/[Audited] strong; bare IAuditable/AddAuditing weak). Deterministic.

C4 · Data Retention6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether data has a defined lifetime — retention periods, TTLs, cleanup jobs (storage limitation).

Method: Roslyn scan: retention/TTL configuration presence in schema; CascadeDelete detected but not scored as retention control. Deterministic, gated by PII presence.

  • A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.

What to do

  • Complete the data-lifecycle story: an expiry limit (a declared maximum age for the stored data — a retention-age setting, or a store-level TTL where your storage offers one), a scheduled purge/cleanup job that enforces it, and a documented retention period covering the personal data.
DM4 · Rich vs anemic domain model10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 10 of 10 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation10.0 / 10Exemplary✓ 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.

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

P10 · Library API & versioning6.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep implementation types off the public surface (Rust: `pub(crate)`, or keep the module private) so internals can change without breaking consumers.
P2 · Observability8.0 / 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.

What to do

  • Add OpenTelemetry tracing/metrics (opentelemetry with tracing-opentelemetry) so requests are traceable across the system, not just health-probable.
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.

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 & Rollback8.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.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.

  • `AgentBuilder::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/utopia-server/src/api/chat.rs:922

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.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, 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.

R1 · Type Safety9.6 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication8.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • web/src/pages/KbSettings.tsx:634 · web/src/pages/Members.tsx:135 — the two spans are one implementation copied and then locally edited — 878 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. — web/src/pages/KbSettings.tsx:634
  • web/src/pages/Library.tsx:1390 · web/src/pages/Library.tsx:1918 — the two spans are one implementation copied and then locally edited — 542 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. — web/src/pages/Library.tsx:1390
  • web/src/pages/ontologyDialogs.tsx:84 · web/src/pages/ontologyDialogs.tsx:309 — the two spans are one implementation copied and then locally edited — 582 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. — web/src/pages/ontologyDialogs.tsx:84
  • web/src/pages/Review.tsx:226 · web/src/pages/Review.tsx:376 — 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. — web/src/pages/Review.tsx:226
  • web/src/pages/Library.tsx:1606 · web/src/pages/Library.tsx:2017 — 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. — web/src/pages/Library.tsx:1606
  • web/src/pages/Mappings.tsx:644 · web/src/pages/Settings.tsx:118 — the two spans are one implementation copied and then locally edited — 307 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. — web/src/pages/Mappings.tsx:644
  • web/src/pages/Settings.tsx:1332 · web/src/pages/Settings.tsx:1435 — the two spans are one implementation copied and then locally edited — 238 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. — web/src/pages/Settings.tsx:1332
  • web/src/pages/KbSettings.tsx:589 · web/src/pages/Library.tsx:1279 — the two spans are one implementation copied and then locally edited — 227 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. — web/src/pages/KbSettings.tsx:589
  • web/src/pages/ontologyTables.tsx:340 · web/src/pages/ontologyTables.tsx:440 — the two spans are one implementation copied and then locally edited — 308 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. — web/src/pages/ontologyTables.tsx:340
  • web/src/pages/Settings.tsx:1204 · web/src/pages/Settings.tsx:1300 · web/src/pages/Settings.tsx:1470 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/pages/Settings.tsx:1204
  • web/src/pages/ontologyTables.tsx:196 · web/src/pages/ontologyTables.tsx:455 — the two spans are one implementation copied and then locally edited — 246 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. — web/src/pages/ontologyTables.tsx:196
  • web/src/pages/Settings.tsx:263 · web/src/pages/Settings.tsx:295 — 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. — web/src/pages/Settings.tsx:263
  • web/src/pages/ontologyDialogs.tsx:272 · web/src/pages/ontologyDialogs.tsx:579 — 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. — web/src/pages/ontologyDialogs.tsx:272
  • web/src/pages/Graph.tsx:1784 · web/src/pages/OntologySchemaGraph.tsx:1116 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/src/pages/Graph.tsx:1784
  • web/src/pages/ontologyDialogs.tsx:136 · web/src/pages/ontologyDialogs.tsx:387 · web/src/pages/ontologyDialogs.tsx:653 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/pages/ontologyDialogs.tsx:136
  • web/src/pages/Graph.tsx:2664 · web/src/pages/Graph.tsx:3630 — 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. — web/src/pages/Graph.tsx:2664
  • web/src/pages/Settings.tsx:746 · web/src/pages/Sso.tsx:97 — 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. — web/src/pages/Settings.tsx:746
  • web/src/components/ui/select.tsx:142 · web/src/components/ui/select.tsx:161 — 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. — web/src/components/ui/select.tsx:142
  • web/src/pages/Graph.tsx:2469 · web/src/pages/Graph.tsx:2731 — 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. — web/src/pages/Graph.tsx:2469
  • web/src/pages/Ontology.tsx:2508 · web/src/pages/Ontology.tsx:2752 — 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. — web/src/pages/Ontology.tsx:2508
  • web/src/pages/Ontology.tsx:2588 · web/src/pages/RulesPanel.tsx:527 · web/src/pages/Tokens.tsx:269 — the 3 copies are spread across 3 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. — web/src/pages/Ontology.tsx:2588
  • web/src/pages/Review.tsx:2026 · web/src/pages/Review.tsx:2047 — 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. — web/src/pages/Review.tsx:2026
  • web/src/pages/Review.tsx:2064 · web/src/pages/Review.tsx:2087 — 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. — web/src/pages/Review.tsx:2064
  • web/src/pages/Settings.tsx:1258 · web/src/pages/Settings.tsx:1501 — 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. — web/src/pages/Settings.tsx:1258
  • web/src/i18n/en.ts:1971 · web/src/i18n/zh.ts:1717 — 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. — web/src/i18n/en.ts:1971
  • web/src/pages/Graph.tsx:1267 · web/src/pages/OntologySchemaGraph.tsx:932 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — web/src/pages/Graph.tsx:1267
  • web/src/pages/Review.tsx:757 · web/src/pages/Review.tsx:796 — 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. — web/src/pages/Review.tsx:757
  • web/src/pages/ontologyTables.tsx:278 · web/src/pages/ontologyTables.tsx:407 · web/src/pages/ontologyTables.tsx:492 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — web/src/pages/ontologyTables.tsx:278
  • web/src/pages/Library.tsx:1718 · web/src/pages/Library.tsx:1748 · web/src/pages/Library.tsx:1783 — 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. — web/src/pages/Library.tsx:1718
  • web/src/pages/Members.tsx:283 · web/src/pages/Tokens.tsx:272 — 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. — web/src/pages/Members.tsx:283
  • web/src/pages/Members.tsx:463 · web/src/pages/Settings.tsx:550 — 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. — web/src/pages/Members.tsx:463
  • web/src/pages/Review.tsx:1965 · web/src/pages/Review.tsx:2011 — 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. — web/src/pages/Review.tsx:1965
  • web/src/pages/ontologyDialogs.tsx:190 · web/src/pages/ontologyDialogs.tsx:437 — 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. — web/src/pages/ontologyDialogs.tsx:190
  • web/src/pages/KbMenuList.tsx:190 · web/src/pages/KbMenuList.tsx:247 — the two spans are one implementation copied and then locally edited — 72 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. — web/src/pages/KbMenuList.tsx:190
  • web/src/pages/Review.tsx:322 · web/src/pages/Review.tsx:335 — 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. — web/src/pages/Review.tsx:322
  • web/src/pages/graphCanvas.ts:178 · web/src/pages/graphCanvas.ts:203 — 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. — web/src/pages/graphCanvas.ts:178
  • web/src/pages/graphCanvas.ts:207 · web/src/pages/graphCanvas.ts:233 — 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. — web/src/pages/graphCanvas.ts:207
  • web/src/pages/Chat.tsx:225 · web/src/ui/index.tsx:671 — 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. — web/src/pages/Chat.tsx:225
  • web/src/pages/Docs.tsx:58 · web/src/ui/citation.tsx:87 — the two spans are one implementation copied and then locally edited — 59 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. — web/src/pages/Docs.tsx:58
  • web/src/pages/Graph.tsx:1462 · web/src/pages/Graph.tsx: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. — web/src/pages/Graph.tsx:1462

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 Complexity7.0 / 10Strong✓ 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.

  • Ontology has cyclomatic complexity 59 and cognitive complexity 49; 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. — web/src/pages/Ontology.tsx:135
  • Settings has cyclomatic complexity 53 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. — web/src/pages/Settings.tsx:900
  • edgeReducer has cyclomatic complexity 51 and cognitive complexity 69; 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. — web/src/pages/Graph.tsx:1065
  • Library has cyclomatic complexity 48 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. — web/src/pages/Library.tsx:298
  • readExpression has cyclomatic complexity 46 and cognitive complexity 49; 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. — web/src/pages/ruleExpressions.ts:17
  • Graph has cyclomatic complexity 44 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 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. — web/src/pages/Graph.tsx:268
  • SourceModal has cyclomatic complexity 41 and cognitive complexity 29; 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. — web/src/pages/Library.tsx:1325
  • draw has cyclomatic complexity 38 and cognitive complexity 73; 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. — web/src/pages/LoginScene.tsx:196
  • SourceEditModal has cyclomatic complexity 38 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 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. — web/src/pages/Library.tsx:1872
  • Chat has cyclomatic complexity 37 and cognitive complexity 32; 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. — web/src/pages/Chat.tsx:112
  • SourceBar 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. — web/src/pages/Library.tsx:905
  • KbSettings has cyclomatic complexity 37 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. — web/src/pages/KbSettings.tsx:86
  • PropertyDialog 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. — web/src/pages/ontologyDialogs.tsx:290
  • buildSchemaGraph has cyclomatic complexity 35 and cognitive complexity 59; 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. — web/src/pages/OntologySchemaGraph.tsx:272
  • mutationFn has cyclomatic complexity 35 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. — web/src/pages/Library.tsx:1384
  • stepDetail has cyclomatic complexity 30 and cognitive complexity 29; 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. — web/src/steps.ts:40
  • nodeReducer has cyclomatic complexity 28 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 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. — web/src/pages/Graph.tsx:981
  • edgeReducer has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/pages/OntologySchemaGraph.tsx:848
  • AgentRow has cyclomatic complexity 24 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — web/src/pages/Review.tsx:532
  • CaseRow has cyclomatic complexity 21 and cognitive complexity 19; 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. — web/src/pages/OntologyRegressionsPanel.tsx:79

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files4.2 / 10Weak✓ 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.

  • web/src/pages/Graph.tsx has 3540 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Graph.tsx:1
  • web/src/api.ts has 2865 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/api.ts:1
  • web/src/pages/Ontology.tsx has 2772 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Ontology.tsx:1
  • web/src/i18n/en.ts has 2523 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/i18n/en.ts:1
  • web/src/pages/Library.tsx has 2280 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Library.tsx:1
  • web/src/pages/Review.tsx has 2236 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Review.tsx:1
  • web/src/i18n/zh.ts has 2208 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/i18n/zh.ts:1
  • web/src/ui/index.tsx has 1841 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/ui/index.tsx:1
  • web/src/pages/Settings.tsx has 1469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Settings.tsx:1
  • web/src/pages/OntologySchemaGraph.tsx has 1105 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/OntologySchemaGraph.tsx:1
  • web/src/pages/Chat.tsx has 1098 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Chat.tsx:1
  • web/src/pages/RulesPanel.tsx has 1028 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/RulesPanel.tsx:1
  • web/src/pages/ontologyDialogs.tsx has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/ontologyDialogs.tsx:1
  • web/src/pages/KbSettings.tsx has 788 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/KbSettings.tsx:1
  • web/src/pages/Mappings.tsx has 735 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Mappings.tsx:1
  • web/src/pages/ontologyTables.tsx has 632 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/ontologyTables.tsx:1
  • web/src/pages/Members.tsx has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — web/src/pages/Members.tsx:1

What to do

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

  • web/vite.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 34 unreached component module(s) can be tested as written, however the suite is authored: web/src/pages/Review.tsx, web/src/pages/Chat.tsx, web/src/pages/KbSettings.tsx, web/src/router.tsx, web/src/pages/AlertBell.tsx, web/src/pages/Docs.tsx and 28 more. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each. — web/vite.config.ts:1
  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×3) — scripts/e2e_type_drift.mjs:1, scripts/star-history.mjs:1, web/scripts/style-guard.mjs:1

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.

R7 · Dead Code9.4 / 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 13 application, 4 tooling and 48 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (13 application, 4 tooling, 48 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 (×9) — web/src/components/ui/table.tsx, web/src/components/ui/card.tsx, web/src/components/ui/tabs.tsx, …
  • Nothing imports this binding — it is safe to review for removal. (×4) — web/src/origin.ts:6, REDACTED:61, REDACTED:62, …

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 Hygiene9.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 web/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.1 / 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.

  • web/src/ui/dialog.tsx → web/src/ui/index.tsx → web/src/ui/dialog.tsx (one verified cycle inside a mutually-dependent group of 4 files) — web/src/ui/dialog.tsx:8

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.0 / 10Adequate✓ 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(` (crates/utopia-server/src/main.rs:312)), 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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — crates/utopia-server/src/github_repo.rs:84
  • None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (crates/utopia-server/src/main.rs:312).

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
  • Set security response headers on what the server sends — actix-web's `DefaultHeaders::new().add((header::X_CONTENT_TYPE_OPTIONS, "nosniff"))`, tower-http's `SetResponseHeaderLayer::overriding(…)` on an axum router, or keep Rocket's default `Shield` — with `Content-Security-Policy`, `X-Content-Type-Options` and a frame policy on every response.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 document10.0 / 10Exemplary○ Nothing flagged

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

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

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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.

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

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

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

X2 · Cancellation propagation7.0 / 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 1/2 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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.
  • `stargazerDates` 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 })`. — scripts/star-history.mjs:31

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.

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

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

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

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

X3 · Exception handling3.3 / 10Weak✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×12) — web/src/api.ts:42, web/src/api.ts:63, web/src/api.ts:2921, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — web/src/api.ts:2973

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging7.4 / 10Strong✓ Tool-verified

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

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

  • `info!` at line 145 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/main.rs:145
  • `info!` at line 300 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/main.rs:300
  • `info!` at line 308 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/main.rs:308
  • `info!` at line 673 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/main.rs:673
  • `info!` at line 691 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/phrase_alignment.rs:691
  • `info!` at line 96 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — crates/utopia-server/src/api/mod.rs:96

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types8.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

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

  • ~2.7 `!` null assertions per 1k TypeScript source lines — 111 assertion(s) across the 40733 source line(s) of the 109 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: web/src/pages/Review.tsx (20), web/src/pages/Library.tsx (15), web/src/pages/Graph.tsx (8). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

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
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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 Health57%Adequate — gated by D1, D2, X3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture78%StrongSolid.
Maturity86%ExemplarySolid.
Readiness50%Adequate — gated by D13, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67%Adequate — gated by D29, D30, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Accessibility45%Adequate — gated by AC1, AC2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplarySolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 4 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.

  • C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
Not included — 43 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: 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — compose up failed (exit 17 — an image could not be built) — failed to solve: debian:bookworm-slim: failed to resolve source metadata for docker.io/library/debian:bookworm-slim: failed to do request: Head "https://registry-1.docker.io/v2/library/debian/manifests/bookworm-slim": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • 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 is measured on C# only; JavaScript, Python, Rust, TypeScript not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — web/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Aggregate boundaries — this Rust crate declares no domain aggregate (a struct with private state and its own command methods), so DM1's aggregate-boundary read has no population to be taken over
  • DM2 Strongly-typed ids — the crate defines newtype typed-ids but declares no domain aggregate that could carry an id — so DM2's adoption ratio has no population to be taken over
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM5 Encapsulated state — this Rust crate declares no type implementing a hand-rolled Hash/PartialEq, so DM5's value-identity encapsulation read has no population to be taken over
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb. TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 98 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 3 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×18
  • <label> that labels no control web/src/pages/KbSettings.tsx:257 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/KbSettings.tsx:264 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/KbSettings.tsx:352 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1215 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1225 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1234 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1257 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1311 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1321 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1330 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1384 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1402 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1413 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1423 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1433 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1481 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1491 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control web/src/pages/Settings.tsx:1500 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
D13 · Secret Scanning · Leaked secret · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×3
  • <input> without a programmatic label web/src/pages/Graph.tsx:2204 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label web/src/ui/index.tsx:554 — 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 web/src/ui/index.tsx:730 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <button> with no accessible text · ×3
  • <button> with no accessible text web/src/ui/index.tsx:778 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/src/ui/index.tsx:785 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text web/src/ui/toast.tsx:74 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> web/src/pages/Graph.tsx:2137 — 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.
AC4 · Keyboard semantics · Focusable <span> isn't keyboard-operable · ×1
  • Focusable <span> isn't keyboard-operable web/src/pages/Graph.tsx:2758 — This <span> carries tabIndex={0}, so it is in the tab order and a keyboard user will land on it — but its behaviour is bound to the pointer only, with no key handler. A tabindex makes an element focusable, not operable: Enter and Space fire a click on a native <button> or <a href> and nowhere else, so this can be focused and never activated. Use a <button>, or handle Enter/Space in a key handler.
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · High IaC · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) web/src/ui/dialog.tsx:8 — web/src/ui/dialog.tsx → web/src/ui/index.tsx → web/src/ui/dialog.tsx (one verified cycle inside a mutually-dependent group of 4 files)
Serious — 823 finding(s)
D3 · God Classes · FunctionTooLong · ×103
  • FunctionTooLong: Graph.Graph web/src/pages/Graph.tsx:268 — FunctionTooLong — Graph runs 1151 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1051 over it, 11.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: Review.Review web/src/pages/Review.tsx:1351 — FunctionTooLong — Review runs 779 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 679 over it, 7.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.
  • FunctionTooLong: Chat.Chat web/src/pages/Chat.tsx:112 — FunctionTooLong — Chat runs 606 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 506 over it, 6.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: Ontology.Ontology web/src/pages/Ontology.tsx:135 — FunctionTooLong — Ontology runs 560 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 460 over it, 5.60× 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: utopia_server::phrase_alignment::align_phrases_locked crates/utopia-server/src/phrase_alignment.rs:727 — FunctionTooLong — utopia_server::phrase_alignment::align_phrases_locked runs 536 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 436 over it, 5.36× 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.Settings web/src/pages/Settings.tsx:900 — FunctionTooLong — Settings runs 509 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 409 over it, 5.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Library.Library web/src/pages/Library.tsx:298 — FunctionTooLong — Library runs 486 significant lines (blank, comment-only and punctuation-only lines excluded) 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: utopia_server::ontology_agent::propose_locked crates/utopia-server/src/ontology_agent.rs:117 — FunctionTooLong — utopia_server::ontology_agent::propose_locked runs 473 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 373 over it, 4.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Library.SourceModal web/src/pages/Library.tsx:1325 — FunctionTooLong — SourceModal runs 459 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 359 over it, 4.59× 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: OntologySchemaGraph.OntologySchemaGraph web/src/pages/OntologySchemaGraph.tsx:579 — FunctionTooLong — OntologySchemaGraph runs 393 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 293 over it, 3.93× 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: utopia_server::api::router crates/utopia-server/src/api/mod.rs:101 — FunctionTooLong — utopia_server::api::router runs 377 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 277 over it, 3.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: utopia_server::extraction_open::apply_open_extraction crates/utopia-server/src/extraction_open.rs:242 — FunctionTooLong — utopia_server::extraction_open::apply_open_extraction runs 371 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 271 over it, 3.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: KbSettings.KbSettings web/src/pages/KbSettings.tsx:86 — FunctionTooLong — KbSettings runs 335 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 235 over it, 3.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: RulesPanel.RulesPanel web/src/pages/RulesPanel.tsx:327 — FunctionTooLong — RulesPanel runs 302 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Members.Members web/src/pages/Members.tsx:121 — FunctionTooLong — Members runs 283 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Graph.EntityPanel web/src/pages/Graph.tsx:2828 — FunctionTooLong — EntityPanel runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.74× 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: LoginScene.LoginScene web/src/pages/LoginScene.tsx:63 — FunctionTooLong — LoginScene runs 266 significant lines (blank, comment-only and punctuation-only lines excluded) 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: utopia_server::owl_import::apply crates/utopia-server/src/owl_import.rs:406 — FunctionTooLong — utopia_server::owl_import::apply 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.
  • FunctionTooLong: ontologyDialogs.PropertyDialog web/src/pages/ontologyDialogs.tsx:290 — FunctionTooLong — PropertyDialog runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: RulesPanel.RuleDialog web/src/pages/RulesPanel.tsx:726 — FunctionTooLong — RuleDialog runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: utopia_store::materialize::materialize_in_tx crates/utopia-store/src/materialize.rs:155 — FunctionTooLong — utopia_store::materialize::materialize_in_tx runs 243 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 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: utopia_store::reasoning::resolve REDACTED:2071 — FunctionTooLong — utopia_store::reasoning::resolve runs 240 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 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: utopia_ingest::ontology_rdf::project crates/utopia-ingest/src/ontology_rdf.rs:249 — FunctionTooLong — utopia_ingest::ontology_rdf::project runs 238 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 138 over it, 2.38× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Graph.TimeScrubber web/src/pages/Graph.tsx:1931 — FunctionTooLong — TimeScrubber runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Library.SourceEditModal web/src/pages/Library.tsx:1872 — FunctionTooLong — SourceEditModal runs 237 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 137 over it, 2.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 78 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×67
  • Hotspot: web/src/pages/Graph.tsx web/src/pages/Graph.tsx:268 — web/src/pages/Graph.tsx changed 68 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 242 in Graph.Graph at line 268. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Graph.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: web/src/pages/Chat.tsx web/src/pages/Chat.tsx:112 — web/src/pages/Chat.tsx changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 122 in Chat.Chat at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Chat.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: REDACTED REDACTED:595 — REDACTED changed 82 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in utopia_store::graph::insert_fact_on at line 595. 2 of those changes were fix/bug commits, and the other 80 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +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: web/src/pages/Review.tsx web/src/pages/Review.tsx:1351 — web/src/pages/Review.tsx changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in Review.Review at line 1351. 1 of those changes was a fix/bug commit, and the other 45 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Review.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: web/src/pages/Ontology.tsx web/src/pages/Ontology.tsx:135 — web/src/pages/Ontology.tsx changed 58 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 66 in Ontology.Ontology at line 135. 2 of those changes were fix/bug commits, and the other 56 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Ontology.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: web/src/api.ts web/src/api.ts:2894 — web/src/api.ts changed 128 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in api.consumeChatStream at line 2894. 2 of those changes were fix/bug commits, and the other 126 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/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: crates/utopia-server/src/api/chat.rs crates/utopia-server/src/api/chat.rs:676 — crates/utopia-server/src/api/chat.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in utopia_server::api::chat::chat at line 676. 2 of those changes were fix/bug commits, and the other 58 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/api/chat.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: web/src/pages/Library.tsx web/src/pages/Library.tsx:1325 — web/src/pages/Library.tsx changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in Library.SourceModal at line 1325. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Library.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: crates/utopia-server/src/phrase_alignment.rs crates/utopia-server/src/phrase_alignment.rs:727 — crates/utopia-server/src/phrase_alignment.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in utopia_server::phrase_alignment::align_phrases_locked at line 727. 1 of those changes was a fix/bug commit, 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-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/phrase_alignment.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: web/src/pages/Settings.tsx web/src/pages/Settings.tsx:900 — web/src/pages/Settings.tsx changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in Settings.Settings at line 900. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/Settings.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: web/src/pages/OntologySchemaGraph.tsx web/src/pages/OntologySchemaGraph.tsx:579 — web/src/pages/OntologySchemaGraph.tsx changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in OntologySchemaGraph.OntologySchemaGraph at line 579. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/OntologySchemaGraph.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: crates/utopia-server/src/main.rs crates/utopia-server/src/main.rs:360 — crates/utopia-server/src/main.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in utopia_server::dispatch at line 360. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/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: crates/utopia-ingest/src/parsers.rs crates/utopia-ingest/src/parsers.rs:252 — crates/utopia-ingest/src/parsers.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 63 in utopia_ingest::parsers::docx_xml_to_text at line 252. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-ingest/src/parsers.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: crates/utopia-store/src/resolution.rs crates/utopia-store/src/resolution.rs:439 — crates/utopia-store/src/resolution.rs changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in utopia_store::resolution::resolve_by_name at line 439. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-store/src/resolution.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: crates/utopia-extract/src/lib.rs crates/utopia-extract/src/lib.rs:469 — crates/utopia-extract/src/lib.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in utopia_extract::scan_quantity at line 469. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-extract/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: web/src/ui/index.tsx web/src/ui/index.tsx:482 — web/src/ui/index.tsx changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in index.MultiSearchSelect at line 482. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/ui/index.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: REDACTED REDACTED:2071 — REDACTED changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in utopia_store::reasoning::resolve at line 2071. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +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: web/src/pages/KbSettings.tsx web/src/pages/KbSettings.tsx:86 — web/src/pages/KbSettings.tsx changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in KbSettings.KbSettings at line 86. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- web/src/pages/KbSettings.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: crates/utopia-server/src/extraction_open.rs crates/utopia-server/src/extraction_open.rs:242 — crates/utopia-server/src/extraction_open.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in utopia_server::extraction_open::apply_open_extraction at line 242. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/extraction_open.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: crates/utopia-store/src/ontology.rs crates/utopia-store/src/ontology.rs:798 — crates/utopia-store/src/ontology.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in utopia_store::ontology::update_relation_type at line 798. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-store/src/ontology.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: crates/utopia-ingest/src/ontology_rdf.rs crates/utopia-ingest/src/ontology_rdf.rs:249 — crates/utopia-ingest/src/ontology_rdf.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in utopia_ingest::ontology_rdf::project at line 249. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-ingest/src/ontology_rdf.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: crates/utopia-server/src/api/tools.rs crates/utopia-server/src/api/tools.rs:375 — crates/utopia-server/src/api/tools.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in utopia_server::api::tools::get_document at line 375. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/api/tools.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: crates/utopia-llm/src/lib.rs crates/utopia-llm/src/lib.rs:958 — crates/utopia-llm/src/lib.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in LlmClient::chat_tools_stream_with at line 958. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-llm/src/lib.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/utopia-server/src/owl_import.rs crates/utopia-server/src/owl_import.rs:406 — crates/utopia-server/src/owl_import.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in utopia_server::owl_import::apply at line 406. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/owl_import.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: crates/utopia-server/src/ontology_agent.rs crates/utopia-server/src/ontology_agent.rs:117 — crates/utopia-server/src/ontology_agent.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in utopia_server::ontology_agent::propose_locked at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-22..2026-10-20, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-22 13:06:52 +08:00' --until='2026-10-20 13:06:52 +08:00' --full-history --no-merges -- crates/utopia-server/src/ontology_agent.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 42 more in this group — see findings.md.
D2 · Cognitive Complexity · utopia_server · ×50
  • utopia_server::phrase_alignment::align_phrases_locked (cognitive 154) crates/utopia-server/src/phrase_alignment.rs:727 — utopia_server::phrase_alignment::align_phrases_locked has cognitive complexity 154 (threshold 15). Drivers by points: if/else 51 (105 pts), boolean chains 21, match/switch 9 (17 pts), loops 8 (11 pts) (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::ontology_agent::propose_locked (cognitive 141) crates/utopia-server/src/ontology_agent.rs:117 — utopia_server::ontology_agent::propose_locked has cognitive complexity 141 (threshold 15). Drivers by points: if/else 35 (80 pts), loops 19 (40 pts), match/switch 9 (16 pts), boolean chains 5 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::api::chat::chat (cognitive 122) crates/utopia-server/src/api/chat.rs:676 — utopia_server::api::chat::chat has cognitive complexity 122 (threshold 15). Drivers by points: if/else 41 (94 pts), match/switch 6 (12 pts), loops 4 (11 pts), boolean chains 5 (nesting depth added 66). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::extraction_open::apply_open_extraction (cognitive 83) crates/utopia-server/src/extraction_open.rs:242 — utopia_server::extraction_open::apply_open_extraction has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (50 pts), match/switch 7 (19 pts), loops 7 (11 pts), boolean chains 3 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::time_resolution::resolve_document (cognitive 82) crates/utopia-server/src/time_resolution.rs:456 — utopia_server::time_resolution::resolve_document has cognitive complexity 82 (threshold 15). Drivers by points: if/else 28 (57 pts), match/switch 4 (11 pts), loops 7 (10 pts), boolean chains 4 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::type_alignment::align_types_locked (cognitive 73) crates/utopia-server/src/type_alignment.rs:161 — utopia_server::type_alignment::align_types_locked has cognitive complexity 73 (threshold 15). Drivers by points: if/else 15 (39 pts), match/switch 7 (19 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::owl_import::apply (cognitive 64) crates/utopia-server/src/owl_import.rs:406 — utopia_server::owl_import::apply has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (48 pts), loops 10 (11 pts), match/switch 2 (5 pts) (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.
  • utopia_server::governance::rounds (cognitive 57) crates/utopia-server/src/governance.rs:168 — utopia_server::governance::rounds has cognitive complexity 57 (threshold 15). Drivers by points: loops 13 (31 pts), if/else 8 (25 pts), boolean chains 1 (nesting depth added 35). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • utopia_server::time_resolution::resolve_one (cognitive 50) crates/utopia-server/src/time_resolution.rs:240 — utopia_server::time_resolution::resolve_one has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (32 pts), match/switch 7 (16 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::adjudication::adjudicate_entities (cognitive 47) REDACTED:167 — utopia_server::adjudication::adjudicate_entities has cognitive complexity 47 (threshold 15). Drivers by points: if/else 9 (28 pts), match/switch 4 (12 pts), loops 4 (7 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.
  • utopia_server::errata::review_document (cognitive 42) crates/utopia-server/src/errata.rs:126 — utopia_server::errata::review_document has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 6 (12 pts), loops 4 (8 pts), boolean chains 3 (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.
  • utopia_server::main (cognitive 41) crates/utopia-server/src/main.rs:95 — utopia_server::main has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 7 (13 pts), loops 5 (9 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::webdav::parse_multistatus (cognitive 40) crates/utopia-server/src/webdav.rs:59 — utopia_server::webdav::parse_multistatus has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (25 pts), match/switch 4 (13 pts), boolean chains 1, loops 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.
  • utopia_server::extraction_open::run_open (cognitive 38) crates/utopia-server/src/extraction_open.rs:964 — utopia_server::extraction_open::run_open has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (27 pts), loops 3 (4 pts), match/switch 2 (4 pts), boolean chains 3 (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.
  • utopia_server::mappings::explore (cognitive 37) crates/utopia-server/src/mappings.rs:211 — utopia_server::mappings::explore has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (29 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::webdav::fetch (cognitive 35) crates/utopia-server/src/webdav.rs:198 — utopia_server::webdav::fetch has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (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.
  • utopia_server::api::rig_model::push_message (cognitive 34) crates/utopia-server/src/api/rig_model.rs:284 — utopia_server::api::rig_model::push_message has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (8 pts), match/switch 3 (7 pts) (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.
  • utopia_server::api::export_routes::export (cognitive 33) crates/utopia-server/src/api/export_routes.rs:39 — utopia_server::api::export_routes::export has cognitive complexity 33 (threshold 15). Drivers by points: loops 14 (20 pts), if/else 7 (13 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • utopia_server::api::sources_routes::validate_statements_payload (cognitive 33) crates/utopia-server/src/api/sources_routes.rs:682 — utopia_server::api::sources_routes::validate_statements_payload has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (26 pts), loops 5, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::ontology_agent::adopt_map_to (cognitive 33) crates/utopia-server/src/ontology_agent.rs:1284 — utopia_server::ontology_agent::adopt_map_to has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::implication::read_phrases (cognitive 30) crates/utopia-server/src/implication.rs:234 — utopia_server::implication::read_phrases has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 3 (10 pts), loops 2 (5 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_server::pipeline::run (cognitive 29) crates/utopia-server/src/pipeline.rs:118 — utopia_server::pipeline::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 4 (9 pts), boolean chains 1 (nesting depth added 9). 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.
  • utopia_server::owl_import::plan (cognitive 28) crates/utopia-server/src/owl_import.rs:172 — utopia_server::owl_import::plan has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 2 (7 pts), loops 2, 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.
  • utopia_server::type_resolution::resolve_with (cognitive 27) crates/utopia-server/src/type_resolution.rs:484 — utopia_server::type_resolution::resolve_with has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 3, 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.
  • utopia_server::api::tools_graph::entity_facts (cognitive 26) crates/utopia-server/src/api/tools_graph.rs:681 — utopia_server::api::tools_graph::entity_facts has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 2 (5 pts), match/switch 4 (5 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.
  • + 25 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×46
  • FileTooLong: pages/Graph.tsx web/src/pages/Graph.tsx — FileTooLong — 2667 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2167 over it, 5.33× 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: pages/Ontology.tsx web/src/pages/Ontology.tsx — FileTooLong — 2281 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1781 over it, 4.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 51 free functions. The bar is 500 significant lines; this is 1737 over it, 4.47× 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 web/src/api.ts — FileTooLong — 2082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1582 over it, 4.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/resolution.rs crates/utopia-store/src/resolution.rs — FileTooLong — 2009 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 58 free functions. The bar is 500 significant lines; this is 1509 over it, 4.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: pages/Library.tsx web/src/pages/Library.tsx — FileTooLong — 1951 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1451 over it, 3.90× 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: pages/Review.tsx web/src/pages/Review.tsx — FileTooLong — 1896 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1396 over it, 3.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1742 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 48 free functions. The bar is 500 significant lines; this is 1242 over it, 3.48× 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/documents.rs crates/utopia-store/src/documents.rs — FileTooLong — 1568 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 1068 over it, 3.14× 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/ontology.rs crates/utopia-store/src/ontology.rs — FileTooLong — 1509 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 52 free functions. The bar is 500 significant lines; this is 1009 over it, 3.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/index.tsx web/src/ui/index.tsx — FileTooLong — 1345 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 845 over it, 2.69× 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/temporal.rs crates/utopia-store/src/temporal.rs — FileTooLong — 1210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 710 over it, 2.42× 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: pages/Settings.tsx web/src/pages/Settings.tsx — FileTooLong — 1195 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 695 over it, 2.39× 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/ontology_agent.rs crates/utopia-server/src/ontology_agent.rs — FileTooLong — 1194 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 694 over it, 2.39× 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: api/chat.rs crates/utopia-server/src/api/chat.rs — FileTooLong — 1123 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 623 over it, 2.25× 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 — 1110 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 610 over it, 2.22× 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/phrase_alignment.rs crates/utopia-server/src/phrase_alignment.rs — FileTooLong — 1010 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 510 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/ingest_sources.rs crates/utopia-server/src/ingest_sources.rs — FileTooLong — 987 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 487 over it, 1.97× 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: api/tools_graph.rs crates/utopia-server/src/api/tools_graph.rs — FileTooLong — 975 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 475 over it, 1.95× 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/models.rs crates/utopia-core/src/models.rs — FileTooLong — 964 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 464 over it, 1.93× 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/parsers.rs crates/utopia-ingest/src/parsers.rs — FileTooLong — 962 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 462 over it, 1.92× 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: api/tools.rs crates/utopia-server/src/api/tools.rs — FileTooLong — 899 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 399 over it, 1.80× 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/extraction_open.rs crates/utopia-server/src/extraction_open.rs — FileTooLong — 870 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 370 over it, 1.74× 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: pages/RulesPanel.tsx web/src/pages/RulesPanel.tsx — FileTooLong — 864 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 364 over it, 1.73× 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: pages/Chat.tsx web/src/pages/Chat.tsx — FileTooLong — 860 significant lines (blank, comment-only and punctuation-only lines excluded), about 70% of them inside a single declaration: Chat (112-904). The bar is 500 significant lines; this is 360 over it, 1.72× 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.
  • + 21 more in this group — see findings.md.
D1 · Cyclomatic Complexity · utopia_server · ×35
  • utopia_server::phrase_alignment::align_phrases_locked (cyclomatic 84) crates/utopia-server/src/phrase_alignment.rs:727 — utopia_server::phrase_alignment::align_phrases_locked has cyclomatic complexity 84 (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.
  • utopia_server::ontology_agent::propose_locked (cyclomatic 67) crates/utopia-server/src/ontology_agent.rs:117 — utopia_server::ontology_agent::propose_locked has cyclomatic complexity 67 (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.
  • utopia_server::api::chat::chat (cyclomatic 58) crates/utopia-server/src/api/chat.rs:676 — utopia_server::api::chat::chat has cyclomatic complexity 58 (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.
  • utopia_server::time_resolution::resolve_document (cyclomatic 42) crates/utopia-server/src/time_resolution.rs:456 — utopia_server::time_resolution::resolve_document has cyclomatic complexity 42 (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.
  • utopia_server::extraction_open::apply_open_extraction (cyclomatic 41) crates/utopia-server/src/extraction_open.rs:242 — utopia_server::extraction_open::apply_open_extraction 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.
  • utopia_server::owl_import::apply (cyclomatic 36) crates/utopia-server/src/owl_import.rs:406 — utopia_server::owl_import::apply 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.
  • utopia_server::type_alignment::align_types_locked (cyclomatic 33) crates/utopia-server/src/type_alignment.rs:161 — utopia_server::type_alignment::align_types_locked 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.
  • utopia_server::dispatch (cyclomatic 29) crates/utopia-server/src/main.rs:360 — utopia_server::dispatch has cyclomatic complexity 29 (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.
  • utopia_server::api::sources_routes::validate_statements_payload (cyclomatic 27) crates/utopia-server/src/api/sources_routes.rs:682 — utopia_server::api::sources_routes::validate_statements_payload 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.
  • utopia_server::extraction_open::run_open (cyclomatic 27) crates/utopia-server/src/extraction_open.rs:964 — utopia_server::extraction_open::run_open 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.
  • utopia_server::api::rule_expression_input::compile_ast (cyclomatic 25) crates/utopia-server/src/api/rule_expression_input.rs:125 — utopia_server::api::rule_expression_input::compile_ast has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • utopia_server::time_resolution::resolve_one (cyclomatic 25) crates/utopia-server/src/time_resolution.rs:240 — utopia_server::time_resolution::resolve_one 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.
  • utopia_server::webdav::parse_multistatus (cyclomatic 24) crates/utopia-server/src/webdav.rs:59 — utopia_server::webdav::parse_multistatus 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.
  • utopia_server::errata::review_document (cyclomatic 23) crates/utopia-server/src/errata.rs:126 — utopia_server::errata::review_document has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • utopia_server::governance::rounds (cyclomatic 23) crates/utopia-server/src/governance.rs:168 — utopia_server::governance::rounds has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • utopia_server::main (cyclomatic 22) crates/utopia-server/src/main.rs:95 — utopia_server::main 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.
  • utopia_server::api::export_routes::export (cyclomatic 22) crates/utopia-server/src/api/export_routes.rs:39 — utopia_server::api::export_routes::export has cyclomatic complexity 22 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • utopia_server::rdf::emit_fact (cyclomatic 22) crates/utopia-server/src/rdf.rs:460 — utopia_server::rdf::emit_fact 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.
  • utopia_server::mappings::explore (cyclomatic 21) crates/utopia-server/src/mappings.rs:211 — utopia_server::mappings::explore 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.
  • utopia_server::extraction_open::call_and_parse_one_chunk (cyclomatic 20) crates/utopia-server/src/extraction_open.rs:68 — utopia_server::extraction_open::call_and_parse_one_chunk has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • utopia_server::pipeline::run (cyclomatic 20) crates/utopia-server/src/pipeline.rs:118 — utopia_server::pipeline::run has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • utopia_server::http_fetch::is_public_ip (cyclomatic 19) crates/utopia-server/src/http_fetch.rs:385 — utopia_server::http_fetch::is_public_ip has cyclomatic complexity 19 (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.
  • utopia_server::time_text::span (cyclomatic 19) crates/utopia-server/src/time_text.rs:89 — utopia_server::time_text::span has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • utopia_server::type_resolution::resolve_with (cyclomatic 19) crates/utopia-server/src/type_resolution.rs:484 — utopia_server::type_resolution::resolve_with 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.
  • utopia_server::adjudication::adjudicate_entities (cyclomatic 18) REDACTED:167 — utopia_server::adjudication::adjudicate_entities 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.
  • + 10 more in this group — see findings.md.
D2 · Cognitive Complexity · utopia_store · ×21
  • utopia_store::graph::insert_fact_on (cognitive 99) REDACTED:595 — utopia_store::graph::insert_fact_on has cognitive complexity 99 (threshold 15). Drivers by points: if/else 31 (68 pts), match/switch 9 (16 pts), boolean chains 15 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • utopia_store::paths::paths_between (cognitive 90) crates/utopia-store/src/paths.rs:115 — utopia_store::paths::paths_between has cognitive complexity 90 (threshold 15). Drivers by points: if/else 21 (49 pts), loops 14 (38 pts), boolean chains 3 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::reasoning::resolve (cognitive 85) REDACTED:2071 — utopia_store::reasoning::resolve has cognitive complexity 85 (threshold 15). Drivers by points: if/else 16 (61 pts), loops 6 (17 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::errata::record (cognitive 49) REDACTED:379 — utopia_store::errata::record has cognitive complexity 49 (threshold 15). Drivers by points: match/switch 15 (31 pts), if/else 8 (14 pts), boolean chains 4 (nesting depth added 22). 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.
  • utopia_store::resolution::resolve_by_name (cognitive 42) crates/utopia-store/src/resolution.rs:439 — utopia_store::resolution::resolve_by_name has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (35 pts), match/switch 3 (5 pts), boolean chains 1, 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.
  • utopia_store::reasoning::materialize (cognitive 37) REDACTED:2413 — utopia_store::reasoning::materialize has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 11 (14 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.
  • utopia_store::reasoning::attribute_rules (cognitive 34) REDACTED:1578 — utopia_store::reasoning::attribute_rules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 3, match/switch 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.
  • utopia_store::governance::name_shape (cognitive 33) crates/utopia-store/src/governance.rs:315 — utopia_store::governance::name_shape has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::resolution::resolve_type_drift (cognitive 30) crates/utopia-store/src/resolution.rs:1045 — utopia_store::resolution::resolve_type_drift has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 3 (5 pts), loops 2, boolean chains 1 (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.
  • utopia_store::temporal::merge_would_overlap (cognitive 22) crates/utopia-store/src/temporal.rs:616 — utopia_store::temporal::merge_would_overlap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::pending::confirm (cognitive 21) crates/utopia-store/src/pending.rs:295 — utopia_store::pending::confirm has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • utopia_store::temporal::plan_closures (cognitive 21) crates/utopia-store/src/temporal.rs:1730 — utopia_store::temporal::plan_closures has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), match/switch 1 (3 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.
  • utopia_store::ontology::update_relation_type (cognitive 20) crates/utopia-store/src/ontology.rs:798 — utopia_store::ontology::update_relation_type has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 6 (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.
  • utopia_store::business_rules::validate_conditions (cognitive 19) REDACTED:896 — utopia_store::business_rules::validate_conditions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (2 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.
  • utopia_store::reasoning::premise_meta (cognitive 19) REDACTED:1147 — utopia_store::reasoning::premise_meta has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::resolution::name_stem (cognitive 19) crates/utopia-store/src/resolution.rs:108 — utopia_store::resolution::name_stem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::resolution::fold_markdown_markers (cognitive 18) crates/utopia-store/src/resolution.rs:62 — utopia_store::resolution::fold_markdown_markers has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 4 (7 pts), match/switch 1 (2 pts), 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.
  • utopia_store::graph::neighborhood (cognitive 17) REDACTED:1531 — utopia_store::graph::neighborhood has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_store::business_rules::update (cognitive 16) REDACTED:222 — utopia_store::business_rules::update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 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.
  • utopia_store::temporal::tidy (cognitive 16) crates/utopia-store/src/temporal.rs:558 — utopia_store::temporal::tidy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 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.
  • utopia_store::temporal::uniqueness_candidates (cognitive 16) crates/utopia-store/src/temporal.rs:1588 — utopia_store::temporal::uniqueness_candidates has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×19
  • Duplicated block (6 lines × 2) crates/utopia-extract/src/align.rs:116 — crates/utopia-extract/src/align.rs:116-121 | crates/utopia-extract/src/implication.rs:108-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/utopia-ingest/src/parsers.rs:256 — crates/utopia-ingest/src/parsers.rs:256-262 | crates/utopia-ingest/src/parsers.rs:1262-1267 — 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) crates/utopia-ingest/src/parsers.rs:462 — crates/utopia-ingest/src/parsers.rs:462-467 | crates/utopia-ingest/src/parsers.rs:1363-1368 — 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) crates/utopia-ingest/src/parsers.rs:469 — crates/utopia-ingest/src/parsers.rs:469-476 | crates/utopia-ingest/src/parsers.rs:1370-1375 — 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) crates/utopia-server/src/api/graph_routes.rs:37 — crates/utopia-server/src/api/graph_routes.rs:37-42 | crates/utopia-server/src/api/kbs.rs:354-359 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/utopia-server/src/api/ontology_routes.rs:208 — crates/utopia-server/src/api/ontology_routes.rs:208-215 | crates/utopia-server/src/api/ontology_routes.rs:251-256 — 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) crates/utopia-server/src/api/sources_routes.rs:528 — crates/utopia-server/src/api/sources_routes.rs:528-534 | crates/utopia-server/src/api/sources_routes.rs:830-835 — 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) crates/utopia-server/src/api/sources_routes.rs:535 — crates/utopia-server/src/api/sources_routes.rs:535-540 | crates/utopia-server/src/api/sources_routes.rs:836-841 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/utopia-server/src/ontology_agent.rs:571 — crates/utopia-server/src/ontology_agent.rs:571-576 | crates/utopia-server/src/ontology_agent.rs:588-593 — 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) crates/utopia-server/src/phrase_alignment.rs:412 — crates/utopia-server/src/phrase_alignment.rs:412-417 | crates/utopia-server/src/type_alignment.rs:98-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/utopia-extract/src/errata.rs:302 — crates/utopia-extract/src/errata.rs:302-307 | crates/utopia-extract/src/implication.rs:324-329 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/utopia-extract/src/open.rs:495 — crates/utopia-extract/src/open.rs:495-500 | crates/utopia-extract/src/time.rs:564-569 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) REDACTED:197 — REDACTED:197-202 | crates/utopia-server/src/query_engine/postgres.rs:31-36 — before extracting anything, compare `REDACTED` and `crates/utopia-server/src/query_engine/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/utopia-store/src/documents.rs:1327 — crates/utopia-store/src/documents.rs:1327-1332 | crates/utopia-store/src/jobs.rs:71-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/utopia-ingest/src/ontology_rdf.rs:446 — crates/utopia-ingest/src/ontology_rdf.rs:446-451 | crates/utopia-ingest/src/ontology_rdf.rs:452-458 — 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) crates/utopia-server/src/main.rs:374 — crates/utopia-server/src/main.rs:374-379 | crates/utopia-server/src/main.rs:424-429 — 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) crates/utopia-server/src/main.rs:555 — crates/utopia-server/src/main.rs:555-560 | crates/utopia-server/src/main.rs:613-618 — 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) crates/utopia-store/src/ontology.rs:454 — crates/utopia-store/src/ontology.rs:454-459 | crates/utopia-store/src/ontology.rs:977-982 — 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) crates/utopia-server/src/ingest_sources.rs:1023 — crates/utopia-server/src/ingest_sources.rs:1023-1028 | crates/utopia-server/src/ingest_sources.rs:1264-1269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D2 · Cognitive Complexity · utopia_ingest · ×17
  • utopia_ingest::parsers::docx_xml_to_text (cognitive 108) crates/utopia-ingest/src/parsers.rs:252 — utopia_ingest::parsers::docx_xml_to_text has cognitive complexity 108 (threshold 15). Drivers by points: if/else 19 (76 pts), match/switch 13 (29 pts), boolean chains 2, loops 1 (nesting depth added 73). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::ontology_rdf::project (cognitive 85) crates/utopia-ingest/src/ontology_rdf.rs:249 — utopia_ingest::ontology_rdf::project has cognitive complexity 85 (threshold 15). Drivers by points: if/else 35 (68 pts), loops 8, boolean chains 7, match/switch 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::parsers::pptx_xml_to_text (cognitive 66) crates/utopia-ingest/src/parsers.rs:1242 — utopia_ingest::parsers::pptx_xml_to_text has cognitive complexity 66 (threshold 15). Drivers by points: if/else 8 (36 pts), match/switch 10 (28 pts), boolean chains 1, loops 1 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::table::render_rows (cognitive 64) crates/utopia-ingest/src/table.rs:476 — utopia_ingest::table::render_rows has cognitive complexity 64 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 9 (15 pts), boolean chains 11, match/switch 3 (7 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.
  • utopia_ingest::blocks::parse (cognitive 37) crates/utopia-ingest/src/blocks.rs:48 — utopia_ingest::blocks::parse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (19 pts), match/switch 4 (16 pts), boolean chains 1, loops 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.
  • utopia_ingest::html::prune_empty_table_columns (cognitive 33) crates/utopia-ingest/src/html.rs:422 — utopia_ingest::html::prune_empty_table_columns has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 4 (9 pts), boolean chains 8 (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.
  • utopia_ingest::chunker::units (cognitive 30) crates/utopia-ingest/src/chunker.rs:84 — utopia_ingest::chunker::units has cognitive complexity 30 (threshold 15). Drivers by points: loops 4 (13 pts), if/else 4 (12 pts), boolean chains 3, match/switch 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.
  • utopia_ingest::ontology_rdf::shape_signatures (cognitive 29) crates/utopia-ingest/src/ontology_rdf.rs:625 — utopia_ingest::ontology_rdf::shape_signatures has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (5 pts), match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::parsers::xlsx_sheet (cognitive 28) crates/utopia-ingest/src/parsers.rs:837 — utopia_ingest::parsers::xlsx_sheet has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (9 pts), match/switch 1 (2 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.
  • utopia_ingest::parsers::pptx_slide_ids (cognitive 26) crates/utopia-ingest/src/parsers.rs:655 — utopia_ingest::parsers::pptx_slide_ids has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::table::kind (cognitive 22) crates/utopia-ingest/src/table.rs:254 — utopia_ingest::table::kind has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5 (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.
  • utopia_ingest::parsers::spreadsheet (cognitive 19) crates/utopia-ingest/src/parsers.rs:774 — utopia_ingest::parsers::spreadsheet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), loops 2 (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.
  • utopia_ingest::parsers::docx_heading_styles (cognitive 18) crates/utopia-ingest/src/parsers.rs:169 — utopia_ingest::parsers::docx_heading_styles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::mineru::reading (cognitive 17) crates/utopia-ingest/src/mineru.rs:23 — utopia_ingest::mineru::reading has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_ingest::html::promote_first_row_headers (cognitive 16) crates/utopia-ingest/src/html.rs:340 — utopia_ingest::html::promote_first_row_headers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2, match/switch 1 (2 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.
  • utopia_ingest::parsers::pptx_relationships (cognitive 16) crates/utopia-ingest/src/parsers.rs:586 — utopia_ingest::parsers::pptx_relationships has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 2, match/switch 1 (2 pts), 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.
  • utopia_ingest::parsers::spreadsheet_row (cognitive 16) crates/utopia-ingest/src/parsers.rs:1056 — utopia_ingest::parsers::spreadsheet_row has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 1 (3 pts), boolean chains 2, 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×13
  • Swallowed exception (empty catch) web/src/api.ts:42 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/api.ts:63 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/api.ts:2921 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/api.ts:2966 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/api.ts:2973 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) web/src/clipboard.ts:17 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/theme.ts:56 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/unread.ts:39 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/unread.ts:92 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/pages/Graph.tsx:2223 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/pages/Ontology.tsx:157 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/i18n/index.ts:25 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) web/src/i18n/index.ts:51 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D2 · Cognitive Complexity · utopia_extract · ×11
  • utopia_extract::ontology_agent::parse_proposal_response (cognitive 37) crates/utopia-extract/src/ontology_agent.rs:294 — utopia_extract::ontology_agent::parse_proposal_response has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, match/switch 2 (4 pts), loops 2 (3 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.
  • utopia_extract::open::salvage (cognitive 34) crates/utopia-extract/src/open.rs:365 — utopia_extract::open::salvage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 5 (12 pts), boolean chains 3, loops 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.
  • utopia_extract::scan_quantity (cognitive 33) crates/utopia-extract/src/lib.rs:469 — utopia_extract::scan_quantity has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, 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.
  • utopia_extract::ontology_agent::build_proposal_messages (cognitive 30) crates/utopia-extract/src/ontology_agent.rs:150 — utopia_extract::ontology_agent::build_proposal_messages has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 7 (9 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.
  • utopia_extract::close_brackets (cognitive 22) crates/utopia-extract/src/lib.rs:95 — utopia_extract::close_brackets has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2, match/switch 1 (2 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.
  • utopia_extract::time::headings_at (cognitive 22) crates/utopia-extract/src/time.rs:134 — utopia_extract::time::headings_at has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 5, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_extract::implication::parse_rule_response (cognitive 21) crates/utopia-extract/src/implication.rs:132 — utopia_extract::implication::parse_rule_response has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (4 pts), boolean chains 1, 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.
  • utopia_extract::question_agent::build_question_messages (cognitive 21) crates/utopia-extract/src/question_agent.rs:64 — utopia_extract::question_agent::build_question_messages has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 6 (7 pts), match/switch 1 (2 pts), boolean chains 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.
  • utopia_extract::errata::parse_errata_response (cognitive 20) crates/utopia-extract/src/errata.rs:165 — utopia_extract::errata::parse_errata_response has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_extract::implication::build_rule_messages (cognitive 19) crates/utopia-extract/src/implication.rs:63 — utopia_extract::implication::build_rule_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_extract::phrase_align::build_phrase_messages (cognitive 19) crates/utopia-extract/src/phrase_align.rs:199 — utopia_extract::phrase_align::build_phrase_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×11
  • Duplicated block (8 lines × 2) crates/utopia-reason/src/rules.rs:334 — crates/utopia-reason/src/rules.rs:334-342 | crates/utopia-reason/src/rules.rs:496-503 — 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) crates/utopia-server/src/http_fetch.rs:416 — crates/utopia-server/src/http_fetch.rs:416-423 | crates/utopia-server/src/http_fetch.rs:426-433 — 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) crates/utopia-store/src/documents.rs:137 — crates/utopia-store/src/documents.rs:137-144 | crates/utopia-store/src/documents.rs:285-292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/utopia-store/src/paths.rs:131 — crates/utopia-store/src/paths.rs:131-138 | crates/utopia-store/src/paths.rs:143-150 — 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) crates/utopia-store/src/resolution.rs:832 — crates/utopia-store/src/resolution.rs:832-839 | crates/utopia-store/src/resolution.rs:1056-1063 — 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) crates/utopia-server/src/query_engine/snowflake.rs:222 — crates/utopia-server/src/query_engine/snowflake.rs:222-229 | crates/utopia-server/src/query_engine/trino.rs:154-161 — 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) crates/utopia-ingest/src/ontology_rdf.rs:391 — crates/utopia-ingest/src/ontology_rdf.rs:391-401 | crates/utopia-ingest/src/ontology_rdf.rs:434-441 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/utopia-server/src/api/tools_graph.rs:935 — crates/utopia-server/src/api/tools_graph.rs:935-944 | crates/utopia-server/src/api/tools_graph.rs:1075-1082 — 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) REDACTED:133 — REDACTED:133-140 | REDACTED:1080-1087 — 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) crates/utopia-server/src/api/tools_graph.rs:1023 — crates/utopia-server/src/api/tools_graph.rs:1023-1030 | crates/utopia-server/src/api/tools_graph.rs:1144-1151 — 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) crates/utopia-store/src/ontology.rs:327 — crates/utopia-store/src/ontology.rs:327-334 | crates/utopia-store/src/ontology.rs:657-664 — 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.
D1 · Cyclomatic Complexity · utopia_store · ×10
  • utopia_store::graph::insert_fact_on (cyclomatic 60) REDACTED:595 — utopia_store::graph::insert_fact_on 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.
  • utopia_store::paths::paths_between (cyclomatic 37) crates/utopia-store/src/paths.rs:115 — utopia_store::paths::paths_between has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • utopia_store::errata::record (cyclomatic 34) REDACTED:379 — utopia_store::errata::record has cyclomatic complexity 34 (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.
  • utopia_store::governance::name_shape (cyclomatic 28) crates/utopia-store/src/governance.rs:315 — utopia_store::governance::name_shape 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.
  • utopia_store::reasoning::resolve (cyclomatic 28) REDACTED:2071 — utopia_store::reasoning::resolve 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.
  • utopia_store::reasoning::materialize (cyclomatic 24) REDACTED:2413 — utopia_store::reasoning::materialize 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.
  • utopia_store::resolution::resolve_by_name (cyclomatic 22) crates/utopia-store/src/resolution.rs:439 — utopia_store::resolution::resolve_by_name 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.
  • utopia_store::reasoning::attribute_rules (cyclomatic 20) REDACTED:1578 — utopia_store::reasoning::attribute_rules 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.
  • utopia_store::ontology::update_relation_type (cyclomatic 18) crates/utopia-store/src/ontology.rs:798 — utopia_store::ontology::update_relation_type 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.
  • utopia_store::resolution::resolve_type_drift (cyclomatic 18) crates/utopia-store/src/resolution.rs:1045 — utopia_store::resolution::resolve_type_drift 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 · utopia_reason · ×10
  • utopia_reason::derive::contradictions (cognitive 112) crates/utopia-reason/src/derive.rs:588 — utopia_reason::derive::contradictions has cognitive complexity 112 (threshold 15). Drivers by points: if/else 29 (78 pts), loops 10 (28 pts), boolean chains 6 (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.
  • utopia_reason::rules::evaluate_with_pool (cognitive 101) crates/utopia-reason/src/rules.rs:269 — utopia_reason::rules::evaluate_with_pool has cognitive complexity 101 (threshold 15). Drivers by points: if/else 13 (55 pts), loops 9 (29 pts), match/switch 3 (16 pts), boolean chains 1 (nesting depth added 75). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_reason::rules::joined_evaluate (cognitive 99) crates/utopia-reason/src/rules.rs:441 — utopia_reason::rules::joined_evaluate has cognitive complexity 99 (threshold 15). Drivers by points: if/else 12 (56 pts), loops 11 (30 pts), match/switch 5 (13 pts) (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_reason::derive::derive (cognitive 56) crates/utopia-reason/src/derive.rs:172 — utopia_reason::derive::derive has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (40 pts), loops 7 (16 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_reason::components (cognitive 41) crates/utopia-reason/src/lib.rs:325 — utopia_reason::components has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 3 (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.
  • utopia_reason::ontology::check_ontology (cognitive 34) crates/utopia-reason/src/ontology.rs:91 — utopia_reason::ontology::check_ontology has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (8 pts), boolean chains 4, match/switch 1 (3 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.
  • utopia_reason::clashes (cognitive 22) crates/utopia-reason/src/lib.rs:476 — utopia_reason::clashes has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 6 (11 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.
  • utopia_reason::check_all (cognitive 19) crates/utopia-reason/src/lib.rs:172 — utopia_reason::check_all has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • utopia_reason::derive::emit (cognitive 16) crates/utopia-reason/src/derive.rs:406 — utopia_reason::derive::emit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 2). 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.
  • utopia_reason::ontology::unsatisfiable (cognitive 16) crates/utopia-reason/src/ontology.rs:287 — utopia_reason::ontology::unsatisfiable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (8 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) crates/utopia-extract/src/governor.rs:136 — crates/utopia-extract/src/governor.rs:136-144 | crates/utopia-extract/src/lib.rs:291-299 — 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) crates/utopia-llm/src/lib.rs:636 — crates/utopia-llm/src/lib.rs:636-644 | crates/utopia-llm/src/lib.rs:900-908 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/utopia-server/src/api/tools_graph.rs:893 — crates/utopia-server/src/api/tools_graph.rs:893-901 | crates/utopia-server/src/api/tools_graph.rs:1035-1043 — 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) crates/utopia-server/src/api/tools_graph.rs:952 — crates/utopia-server/src/api/tools_graph.rs:952-960 | crates/utopia-server/src/api/tools_graph.rs:1093-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.
  • Duplicated block (9 lines × 2) crates/utopia-store/src/paths.rs:340 — crates/utopia-store/src/paths.rs:340-348 | crates/utopia-store/src/paths.rs:372-380 — 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) crates/utopia-server/src/api/chat.rs:1510 — crates/utopia-server/src/api/chat.rs:1510-1518 | crates/utopia-server/src/api/tools.rs:1002-1010 — 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) crates/utopia-server/src/api/chat.rs:1549 — crates/utopia-server/src/api/chat.rs:1549-1557 | crates/utopia-server/src/api/tools.rs:1326-1334 — 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) crates/utopia-store/src/ontology.rs:495 — crates/utopia-store/src/ontology.rs:495-503 | crates/utopia-store/src/ontology.rs:999-1008 — 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) crates/utopia-store/src/resolution.rs:2085 — crates/utopia-store/src/resolution.rs:2085-2093 | crates/utopia-store/src/resolution.rs:2095-2104 — 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) crates/utopia-store/src/alerts.rs:242 — crates/utopia-store/src/alerts.rs:242-250 | crates/utopia-store/src/alerts.rs:297-306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×9
  • Duplicated block (5 lines × 2) crates/utopia-ingest/src/parsers.rs:179 — crates/utopia-ingest/src/parsers.rs:179-183 | crates/utopia-ingest/src/parsers.rs:276-280 — 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) crates/utopia-ingest/src/parsers.rs:597 — crates/utopia-ingest/src/parsers.rs:597-601 | crates/utopia-ingest/src/parsers.rs:663-667 — 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:2275 — REDACTED:2275-2279 | REDACTED:2342-2348 — 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) crates/utopia-extract/src/align.rs:311 — crates/utopia-extract/src/align.rs:311-315 | crates/utopia-extract/src/phrase_align.rs:439-443 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/utopia-server/src/api/auth_routes.rs:86 — crates/utopia-server/src/api/auth_routes.rs:86-90 | crates/utopia-server/src/api/auth_routes.rs:154-158 — 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) crates/utopia-server/src/api/datasource_routes.rs:201 — crates/utopia-server/src/api/datasource_routes.rs:201-205 | crates/utopia-server/src/api/datasource_routes.rs:246-250 — 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) crates/utopia-server/src/extraction_open.rs:818 — crates/utopia-server/src/extraction_open.rs:818-822 | crates/utopia-server/src/extraction_open.rs:833-837 — 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) crates/utopia-server/src/owl_import.rs:190 — crates/utopia-server/src/owl_import.rs:190-194 | crates/utopia-server/src/owl_import.rs:195-199 — 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) crates/utopia-store/src/paths.rs:360 — crates/utopia-store/src/paths.rs:360-364 | crates/utopia-store/src/paths.rs:391-395 — 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.
D1 · Cyclomatic Complexity · utopia_ingest · ×8
  • utopia_ingest::parsers::docx_xml_to_text (cyclomatic 63) crates/utopia-ingest/src/parsers.rs:252 — utopia_ingest::parsers::docx_xml_to_text has cyclomatic complexity 63 (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.
  • utopia_ingest::ontology_rdf::project (cyclomatic 62) crates/utopia-ingest/src/ontology_rdf.rs:249 — utopia_ingest::ontology_rdf::project has cyclomatic complexity 62 (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.
  • utopia_ingest::table::render_rows (cyclomatic 44) crates/utopia-ingest/src/table.rs:476 — utopia_ingest::table::render_rows has cyclomatic complexity 44 (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.
  • utopia_ingest::parsers::pptx_xml_to_text (cyclomatic 42) crates/utopia-ingest/src/parsers.rs:1242 — utopia_ingest::parsers::pptx_xml_to_text has cyclomatic complexity 42 (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.
  • utopia_ingest::html::prune_empty_table_columns (cyclomatic 19) crates/utopia-ingest/src/html.rs:422 — utopia_ingest::html::prune_empty_table_columns 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.
  • utopia_ingest::blocks::parse (cyclomatic 18) crates/utopia-ingest/src/blocks.rs:48 — utopia_ingest::blocks::parse 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.
  • utopia_ingest::ontology_rdf::shape_signatures (cyclomatic 17) crates/utopia-ingest/src/ontology_rdf.rs:625 — utopia_ingest::ontology_rdf::shape_signatures 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.
  • utopia_ingest::parsers::xlsx_sheet (cyclomatic 17) crates/utopia-ingest/src/parsers.rs:837 — utopia_ingest::parsers::xlsx_sheet 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.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: Graph web/src/pages/Graph.tsx:1 — ClassTooLong — 1151 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 751 over it, 2.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: api web/src/api.ts:1 — ClassTooLong — 859 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 459 over it, 2.15× 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: Review web/src/pages/Review.tsx:1 — ClassTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 379 over it, 1.95× 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: Chat web/src/pages/Chat.tsx:1 — ClassTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 206 over it, 1.52× 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: Ontology web/src/pages/Ontology.tsx:1 — ClassTooLong — 560 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 160 over it, 1.40× 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: Settings web/src/pages/Settings.tsx:1 — ClassTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 109 over it, 1.27× 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: Library web/src/pages/Library.tsx:1 — ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 86 over it, 1.22× 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: LlmClient crates/utopia-llm/src/lib.rs:438 — ClassTooLong — 428 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 438-1155. The bar is 400 significant lines; this is 28 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×8
  • Duplicated block (7 lines × 2) crates/utopia-extract/src/ontology_agent.rs:156 — crates/utopia-extract/src/ontology_agent.rs:156-162 | crates/utopia-extract/src/question_agent.rs:72-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/utopia-server/src/api/ontology_routes.rs:192 — crates/utopia-server/src/api/ontology_routes.rs:192-198 | crates/utopia-server/src/api/ontology_routes.rs:383-389 — 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) crates/utopia-server/src/rdf.rs:332 — crates/utopia-server/src/rdf.rs:332-338 | crates/utopia-server/src/rdf.rs:370-376 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) REDACTED:976 — REDACTED:976-982 | REDACTED:996-1002 — 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) REDACTED:973 — REDACTED:973-979 | REDACTED:1091-1097 — 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) crates/utopia-extract/src/align.rs:295 — crates/utopia-extract/src/align.rs:295-301 | crates/utopia-extract/src/time.rs:498-504 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/utopia-extract/src/ontology_agent.rs:166 — crates/utopia-extract/src/ontology_agent.rs:166-172 | crates/utopia-extract/src/question_agent.rs:82-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) crates/utopia-server/src/readers.rs:230 — crates/utopia-server/src/readers.rs:230-236 | crates/utopia-server/src/readers.rs:293-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) crates/utopia-store/src/documents.rs:224 — crates/utopia-store/src/documents.rs:224-236 | crates/utopia-store/src/documents.rs:464-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) REDACTED:155 — REDACTED:155-188 | REDACTED:1796-1808 — 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) crates/utopia-server/src/phrase_alignment.rs:696 — crates/utopia-server/src/phrase_alignment.rs:696-708 | crates/utopia-server/src/type_alignment.rs:129-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) crates/utopia-store/src/governance.rs:90 — crates/utopia-store/src/governance.rs:90-102 | crates/utopia-store/src/governance.rs:103-116 — 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) crates/utopia-store/src/documents.rs:968 — crates/utopia-store/src/documents.rs:968-980 | crates/utopia-store/src/documents.rs:1080-1093 — 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) REDACTED:598 — REDACTED:598-610 | REDACTED:622-634 — 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) crates/utopia-store/src/name_vectors.rs:68 — crates/utopia-store/src/name_vectors.rs:68-80 | crates/utopia-store/src/signature_vectors.rs:56-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) crates/utopia-server/src/main.rs:540 — crates/utopia-server/src/main.rs:540-551 | crates/utopia-server/src/main.rs:557-568 — 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) crates/utopia-store/src/jobs.rs:54 — crates/utopia-store/src/jobs.rs:54-65 | crates/utopia-store/src/jobs.rs:116-127 — 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) REDACTED:2903 — REDACTED:2903-2914 | REDACTED:2979-2990 — 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) crates/utopia-store/src/ontology.rs:1516 — crates/utopia-store/src/ontology.rs:1516-1531 | crates/utopia-store/src/ontology.rs:1588-1599 — 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) crates/utopia-server/src/api/tools_graph.rs:904 — crates/utopia-server/src/api/tools_graph.rs:904-916 | crates/utopia-server/src/api/tools_graph.rs:1045-1056 — 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) crates/utopia-server/src/api/admin_routes.rs:172 — crates/utopia-server/src/api/admin_routes.rs:172-183 | crates/utopia-server/src/api/admin_routes.rs:197-208 — 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) crates/utopia-server/src/api/tools_graph.rs:922 — crates/utopia-server/src/api/tools_graph.rs:922-933 | crates/utopia-server/src/api/tools_graph.rs:1062-1073 — 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.
D1 · Cyclomatic Complexity · utopia_reason · ×6
  • utopia_reason::derive::contradictions (cyclomatic 44) crates/utopia-reason/src/derive.rs:588 — utopia_reason::derive::contradictions has cyclomatic complexity 44 (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.
  • utopia_reason::rules::joined_evaluate (cyclomatic 29) crates/utopia-reason/src/rules.rs:441 — utopia_reason::rules::joined_evaluate 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.
  • utopia_reason::rules::evaluate_with_pool (cyclomatic 27) crates/utopia-reason/src/rules.rs:269 — utopia_reason::rules::evaluate_with_pool 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.
  • utopia_reason::derive::derive (cyclomatic 20) crates/utopia-reason/src/derive.rs:172 — utopia_reason::derive::derive 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.
  • utopia_reason::ontology::check_ontology (cyclomatic 19) crates/utopia-reason/src/ontology.rs:91 — utopia_reason::ontology::check_ontology 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.
  • utopia_reason::rules::satisfies (cyclomatic 18) crates/utopia-reason/src/rules.rs:656 — utopia_reason::rules::satisfies has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D35 · Change Coupling · Change coupling · ×6
  • Change coupling: Graph.tsx ↔ OntologySchemaGraph.tsx web/src/pages/Graph.tsx:1 — `web/src/pages/Graph.tsx` and `web/src/pages/OntologySchemaGraph.tsx` change together 72% of the time (13 of the 18 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 13 shared commits counted here, the most recent 3 are `d116534b` A highlighted edge draws last on both canvases (#625); `cb323566` Colours the light theme missed (#606); `2767877a` The interface has a light side (#599) — run `git show` on any of them.
  • Change coupling: phrase_alignment.rs ↔ type_alignment.rs crates/utopia-server/src/phrase_alignment.rs:1 — `crates/utopia-server/src/phrase_alignment.rs` and `crates/utopia-server/src/type_alignment.rs` change together 67% of the time (8 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) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `fa6cd6cc` A reply that keeps repeating itself comes back cut instead of running…; `fce1f8e0` Every model call uses the workspace's reasoning effort, and none is a…; `c7435ecc` Refresh the ontology vector index when the editor creates or relabels… — run `git show` on any of them.
  • Change coupling: mod.rs ↔ api.ts crates/utopia-server/src/api/mod.rs:1 — `crates/utopia-server/src/api/mod.rs` and `web/src/api.ts` change together 61% of the time (43 of the 71 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 43 shared commits counted here, the most recent 3 are `2bce3280` SSO-only deployments: trusted domains sign in without linking, passwo…; `70bf7a7f` A system admin can make another user a system admin (#1234); `bb5cde28` Show saved property regression comparisons so people can check ontolo… — run `git show` on any of them.
  • Change coupling: ingest_sources.rs ↔ Library.tsx crates/utopia-server/src/ingest_sources.rs:1 — `crates/utopia-server/src/ingest_sources.rs` and `web/src/pages/Library.tsx` change together 59% of the time (10 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) 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 10 shared commits counted here, the most recent 3 are `d62e880b` A base can follow a GitHub repository's markdown files, fetching only…; `22c21eac` Let a source push statements in the open contract (#884); `e02f820f` Deleting a document is an event, and it can be undone (#273) — run `git show` on any of them.
  • Change coupling: ingest_sources.rs ↔ SourcesRail.tsx crates/utopia-server/src/ingest_sources.rs:1 — `crates/utopia-server/src/ingest_sources.rs` and `web/src/pages/SourcesRail.tsx` 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) 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 9 shared commits counted here, the most recent 3 are `d62e880b` A base can follow a GitHub repository's markdown files, fetching only…; `22c21eac` Let a source push statements in the open contract (#884); `83099a77` Every source kind the UI offers can be created (#253) — run `git show` on any of them.
  • Change coupling: DocViewer.tsx ↔ Ontology.tsx web/src/pages/DocViewer.tsx:1 — `web/src/pages/DocViewer.tsx` and `web/src/pages/Ontology.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 `bb5cde28` Show saved property regression comparisons so people can check ontolo…; `f8655b23` Every page titles itself with one PageHeader (#452); `88e53f15` The area right of a rail fills it, and a form inside a card stops at … — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×6
  • Duplicated block (11 lines × 2) crates/utopia-server/src/api/mapping_routes.rs:276 — crates/utopia-server/src/api/mapping_routes.rs:276-286 | crates/utopia-server/src/api/mapping_routes.rs:365-375 — 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) crates/utopia-server/src/api/oidc_routes.rs:893 — crates/utopia-server/src/api/oidc_routes.rs:893-903 | crates/utopia-server/src/api/oidc_routes.rs:951-961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/utopia-server/src/mapping_index.rs:154 — crates/utopia-server/src/mapping_index.rs:154-164 | crates/utopia-server/src/retrieval.rs:89-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) REDACTED:121 — REDACTED:121-131 | REDACTED:1076-1086 — 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) crates/utopia-store/src/alerts.rs:269 — crates/utopia-store/src/alerts.rs:269-283 | crates/utopia-store/src/alerts.rs:317-327 — 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) REDACTED:432 — REDACTED:432-444 | REDACTED:471-481 — 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.
D1 · Cyclomatic Complexity · utopia_extract · ×5
  • utopia_extract::ontology_agent::parse_proposal_response (cyclomatic 23) crates/utopia-extract/src/ontology_agent.rs:294 — utopia_extract::ontology_agent::parse_proposal_response 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.
  • utopia_extract::scan_quantity (cyclomatic 22) crates/utopia-extract/src/lib.rs:469 — utopia_extract::scan_quantity 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.
  • utopia_extract::open::salvage (cyclomatic 22) crates/utopia-extract/src/open.rs:365 — utopia_extract::open::salvage 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.
  • utopia_extract::ontology_agent::build_proposal_messages (cyclomatic 20) crates/utopia-extract/src/ontology_agent.rs:150 — utopia_extract::ontology_agent::build_proposal_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.
  • utopia_extract::question_agent::build_question_messages (cyclomatic 16) crates/utopia-extract/src/question_agent.rs:64 — utopia_extract::question_agent::build_question_messages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×5
  • Duplicated block (10 lines × 2) crates/utopia-server/src/main.rs:248 — crates/utopia-server/src/main.rs:248-262 | crates/utopia-server/src/main.rs:268-277 — 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) REDACTED:897 — REDACTED:897-906 | REDACTED:1144-1153 — 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) crates/utopia-store/src/ontology.rs:1666 — crates/utopia-store/src/ontology.rs:1666-1675 | crates/utopia-store/src/ontology.rs:1760-1769 — 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) crates/utopia-store/src/jobs.rs:174 — crates/utopia-store/src/jobs.rs:174-183 | crates/utopia-store/src/jobs.rs:200-211 — 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) REDACTED:229 — REDACTED:229-238 | crates/utopia-server/src/query_engine/postgres.rs:54-63 — before extracting anything, compare `REDACTED` and `crates/utopia-server/src/query_engine/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 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.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) crates/utopia-store/src/ontology.rs:366 — crates/utopia-store/src/ontology.rs:366-379 | crates/utopia-store/src/ontology.rs:911-933 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) REDACTED:205 — REDACTED:205-224 | crates/utopia-server/src/query_engine/postgres.rs:39-52 — before extracting anything, compare `REDACTED` and `crates/utopia-server/src/query_engine/postgres.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) crates/utopia-store/src/type_bindings.rs:562 — crates/utopia-store/src/type_bindings.rs:562-576 | crates/utopia-store/src/type_bindings.rs:630-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/utopia-store/src/conversations.rs:84 — crates/utopia-store/src/conversations.rs:84-97 | crates/utopia-store/src/mappings.rs:187-201 — before extracting anything, compare `crates/utopia-store/src/conversations.rs` and `crates/utopia-store/src/mappings.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (14 lines × 2) crates/utopia-server/src/query_engine/snowflake.rs:204 — crates/utopia-server/src/query_engine/snowflake.rs:204-217 | crates/utopia-server/src/query_engine/trino.rs:136-149 — 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.
D5 · Coupling · Off the main sequence · ×5
  • Off the main sequence: utopia-core — utopia-core: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: utopia-ingest — utopia-ingest: 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.
  • Off the main sequence: utopia-llm — utopia-llm: 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.
  • Off the main sequence: utopia-reason — utopia-reason: 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.
  • Off the main sequence: utopia-search — utopia-search: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
R10 · Code Duplication · Duplicated block (17 lines × 2 locations) · ×5
  • Duplicated block (17 lines × 2 locations) web/src/pages/Graph.tsx:2469 — web/src/pages/Graph.tsx:2469 · web/src/pages/Graph.tsx:2731 — 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 (17 lines × 2 locations) web/src/pages/Ontology.tsx:2508 — web/src/pages/Ontology.tsx:2508 · web/src/pages/Ontology.tsx:2752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) web/src/pages/Review.tsx:2026 — web/src/pages/Review.tsx:2026 · web/src/pages/Review.tsx:2047 — 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 (17 lines × 2 locations) web/src/pages/Review.tsx:2064 — web/src/pages/Review.tsx:2064 · web/src/pages/Review.tsx:2087 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2 locations) web/src/pages/Settings.tsx:1258 — web/src/pages/Settings.tsx:1258 · web/src/pages/Settings.tsx:1501 — 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.
AC2 · Forms & labels · <Textarea> field component without a label · ×4
  • <Textarea> field component without a label web/src/pages/Chat.tsx:559 — 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.
  • <Textarea> field component without a label web/src/pages/Library.tsx:1611 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label web/src/pages/Library.tsx:1749 — 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.
  • <Textarea> field component without a label web/src/pages/Library.tsx:2022 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×4
  • Animation without a prefers-reduced-motion guard web/src/styles.css:463 — `.u-scrub-island` moves (`transition: background-color var(--u-base) ease, width 300ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard web/src/styles.css:534 — `.u-modal-in` moves (`animation: u-modal-panel-kf 0.18s cubic-bezier(0.16, 1, 0.3, 1) both`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard web/src/styles.css:904 — `.u-progress-fill` moves (`transition: width 500ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard web/src/styles.css:1375 — `.u-thinking` moves (`animation: u-thinking-kf 1.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×4
  • Duplicated block (14 lines × 2 locations) web/src/pages/Members.tsx:283 — web/src/pages/Members.tsx:283 · web/src/pages/Tokens.tsx:272 — 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) web/src/pages/Members.tsx:463 — web/src/pages/Members.tsx:463 · web/src/pages/Settings.tsx:550 — 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 (14 lines × 2 locations) web/src/pages/Review.tsx:1965 — web/src/pages/Review.tsx:1965 · web/src/pages/Review.tsx:2011 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (14 lines × 2 locations) web/src/pages/ontologyDialogs.tsx:190 — web/src/pages/ontologyDialogs.tsx:190 · web/src/pages/ontologyDialogs.tsx:437 — 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.
D2 · Cognitive Complexity · LlmClient · ×3
  • LlmClient::chat_tools_stream_with (cognitive 63) crates/utopia-llm/src/lib.rs:958 — LlmClient::chat_tools_stream_with has cognitive complexity 63 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 5 (17 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LlmClient::chat_stream_raw (cognitive 36) crates/utopia-llm/src/lib.rs:1068 — LlmClient::chat_stream_raw has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (30 pts), loops 3 (6 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.
  • LlmClient::chat_at_streaming (cognitive 25) crates/utopia-llm/src/lib.rs:664 — LlmClient::chat_at_streaming has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D31 · IaC & Container Security · Medium IaC · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) crates/utopia-reason/src/rules.rs:347 — crates/utopia-reason/src/rules.rs:347-365 | crates/utopia-reason/src/rules.rs:512-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/utopia-server/src/api/sources_routes.rs:570 — crates/utopia-server/src/api/sources_routes.rs:570-588 | crates/utopia-server/src/api/sources_routes.rs:629-646 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) crates/utopia-store/src/resolution.rs:565 — crates/utopia-store/src/resolution.rs:565-583 | crates/utopia-store/src/resolution.rs:643-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×3
  • Duplicated block (15 lines × 2) crates/utopia-store/src/ontology.rs:1657 — crates/utopia-store/src/ontology.rs:1657-1671 | crates/utopia-store/src/ontology.rs:1738-1758 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) crates/utopia-store/src/conversations.rs:41 — crates/utopia-store/src/conversations.rs:41-55 | crates/utopia-store/src/mappings.rs:286-301 — before extracting anything, compare `crates/utopia-store/src/conversations.rs` and `crates/utopia-store/src/mappings.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 (15 lines × 2) REDACTED:984 — REDACTED:984-998 | REDACTED:2754-2768 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) crates/utopia-store/src/audit.rs:174 — crates/utopia-store/src/audit.rs:174-182 | crates/utopia-store/src/conversations.rs:49-56 | crates/utopia-store/src/documents.rs:538-546 | crates/utopia-store/src/mappings.rs:294-304 — before extracting anything, compare `crates/utopia-store/src/conversations.rs` and `crates/utopia-store/src/mappings.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 × 4) crates/utopia-store/src/audit.rs:175 — crates/utopia-store/src/audit.rs:175-183 | crates/utopia-store/src/conversations.rs:50-57 | REDACTED:2455-2465 | crates/utopia-store/src/mappings.rs:295-305 — before extracting anything, compare `crates/utopia-store/src/conversations.rs` and `crates/utopia-store/src/mappings.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 × 4) crates/utopia-server/src/api/tools_graph.rs:689 — crates/utopia-server/src/api/tools_graph.rs:689-696 | crates/utopia-server/src/api/tools_graph.rs:900-909 | crates/utopia-server/src/api/tools_graph.rs:1042-1049 | crates/utopia-server/src/api/tools_graph.rs:1233-1240 — 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.
R10 · Code Duplication · Duplicated block (16 lines × 2 locations) · ×3
  • Duplicated block (16 lines × 2 locations) web/src/i18n/en.ts:1971 — web/src/i18n/en.ts:1971 · web/src/i18n/zh.ts:1717 — 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 (16 lines × 2 locations) web/src/pages/Graph.tsx:1267 — web/src/pages/Graph.tsx:1267 · web/src/pages/OntologySchemaGraph.tsx:932 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (16 lines × 2 locations) web/src/pages/Review.tsx:757 — web/src/pages/Review.tsx:757 · web/src/pages/Review.tsx:796 — 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 (13 lines × 2 locations) · ×3
  • Duplicated block (13 lines × 2 locations) web/src/pages/Review.tsx:322 — web/src/pages/Review.tsx:322 · web/src/pages/Review.tsx:335 — 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) web/src/pages/graphCanvas.ts:178 — web/src/pages/graphCanvas.ts:178 · web/src/pages/graphCanvas.ts:203 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (13 lines × 2 locations) web/src/pages/graphCanvas.ts:207 — web/src/pages/graphCanvas.ts:207 · web/src/pages/graphCanvas.ts:233 — 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.
R4 · Test Coverage · No test reaches this file · ×3
  • No test reaches this file scripts/e2e_type_drift.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file scripts/star-history.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file web/scripts/style-guard.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
AC1 · Text alternatives · <canvas> without a text alternative · ×2
  • <canvas> without a text alternative web/src/pages/Graph.tsx:1697 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative web/src/pages/OntologySchemaGraph.tsx:1110 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels · <RadioGroup> field component without a label · ×2
  • <RadioGroup> field component without a label web/src/pages/Tokens.tsx:347 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <RadioGroup> field component without a label web/src/pages/graphDialogs.tsx:186 — This UI-library field component has no label / aria-label / aria-labelledby / id — and neither does anything it renders (a name prop is the form-submission key, not a label) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
D1 · Cyclomatic Complexity · LlmClient · ×2
  • LlmClient::chat_tools_stream_with (cyclomatic 21) crates/utopia-llm/src/lib.rs:958 — LlmClient::chat_tools_stream_with 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.
  • LlmClient::chat_at_streaming (cyclomatic 16) crates/utopia-llm/src/lib.rs:664 — LlmClient::chat_at_streaming 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: zh.ts → models.rs, ingest_sources.rs, alerts.rs, extraction_drops.rs, governance.rs web/src/i18n/zh.ts — `web/src/i18n/zh.ts` changes together with 5 other files — `crates/utopia-core/src/models.rs`, `crates/utopia-server/src/ingest_sources.rs`, `crates/utopia-store/src/alerts.rs`, `crates/utopia-store/src/extraction_drops.rs`, `crates/utopia-store/src/governance.rs` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
  • Change-coupling hub: extraction.rs → lib.rs, kbs.rs, mappings.rs, pending.rs crates/utopia-server/src/extraction.rs — `crates/utopia-server/src/extraction.rs` changes together with 4 other files — `crates/utopia-extract/src/lib.rs`, `crates/utopia-server/src/api/kbs.rs`, `crates/utopia-server/src/mappings.rs`, `crates/utopia-store/src/pending.rs` — 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×2
  • Duplicated block (13 lines × 3) crates/utopia-store/src/documents.rs:116 — crates/utopia-store/src/documents.rs:116-128 | crates/utopia-store/src/documents.rs:204-216 | crates/utopia-store/src/documents.rs:448-460 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (13 lines × 3) REDACTED:213 — REDACTED:213-225 | REDACTED:600-612 | REDACTED:624-636 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) crates/utopia-extract/src/governor.rs:146 — crates/utopia-extract/src/governor.rs:146-157 | crates/utopia-extract/src/lib.rs:301-313 — 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 (12–13 lines × 2) crates/utopia-llm/src/lib.rs:967 — crates/utopia-llm/src/lib.rs:967-978 | crates/utopia-llm/src/lib.rs:1076-1088 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) crates/utopia-server/src/api/sources_routes.rs:589 — crates/utopia-server/src/api/sources_routes.rs:589-598 | crates/utopia-server/src/api/sources_routes.rs:647-655 — 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–10 lines × 2) crates/utopia-store/src/accounts.rs:68 — crates/utopia-store/src/accounts.rs:68-77 | crates/utopia-store/src/accounts.rs:104-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) crates/utopia-server/src/api/settings_routes.rs:66 — crates/utopia-server/src/api/settings_routes.rs:66-71 | crates/utopia-server/src/api/settings_routes.rs:149-154 | crates/utopia-server/src/api/settings_routes.rs:208-213 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) crates/utopia-server/src/main.rs:219 — crates/utopia-server/src/main.rs:219-224 | crates/utopia-server/src/main.rs:258-263 | crates/utopia-server/src/main.rs:273-278 — 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 (12 lines × 2 locations) · ×2
  • Duplicated block (12 lines × 2 locations) web/src/pages/Chat.tsx:225 — web/src/pages/Chat.tsx:225 · web/src/ui/index.tsx:671 — 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 (12 lines × 2 locations) web/src/pages/Graph.tsx:1462 — web/src/pages/Graph.tsx:1462 · web/src/pages/Graph.tsx: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.
AC2 · Forms & labels · <Select> field component without a label · ×1
  • <Select> field component without a label web/src/ui/index.tsx:1545 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing it renders carries one either (a name prop is the form-submission key, not a label). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 74 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · Graph.Graph (cyclomatic 242) · ×1
  • Graph.Graph (cyclomatic 242) web/src/pages/Graph.tsx:268 — Graph.Graph has cyclomatic complexity 242 (threshold 15). Of this number, 34 points are the body's own statements and 208 belong to 44 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 · Chat.Chat (cyclomatic 122) · ×1
  • Chat.Chat (cyclomatic 122) web/src/pages/Chat.tsx:112 — Chat.Chat has cyclomatic complexity 122 (threshold 15). Of this number, 36 points are the body's own statements and 86 belong to 30 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 · Review.Review (cyclomatic 90) · ×1
  • Review.Review (cyclomatic 90) web/src/pages/Review.tsx:1351 — Review.Review has cyclomatic complexity 90 (threshold 15). Of this number, 78 points are the body's own statements and 12 belong to 11 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 · Library.SourceModal (cyclomatic 81) · ×1
  • Library.SourceModal (cyclomatic 81) web/src/pages/Library.tsx:1325 — Library.SourceModal has cyclomatic complexity 81 (threshold 15). Of this number, 41 points are the body's own statements and 40 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 · OntologySchemaGraph.OntologySchemaGraph (cyclomatic 78) · ×1
  • OntologySchemaGraph.OntologySchemaGraph (cyclomatic 78) web/src/pages/OntologySchemaGraph.tsx:579 — OntologySchemaGraph.OntologySchemaGraph has cyclomatic complexity 78 (threshold 15). Most of this is not in the body itself: 11 of the 78 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 848, a function literal at line 812, a function literal at line 740, …). 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 · Ontology.Ontology (cyclomatic 66) · ×1
  • Ontology.Ontology (cyclomatic 66) web/src/pages/Ontology.tsx:135 — Ontology.Ontology has cyclomatic complexity 66 (threshold 15). Of this number, 51 points are the body's own statements and 15 belong to 12 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 · Library.Library (cyclomatic 61) · ×1
  • Library.Library (cyclomatic 61) web/src/pages/Library.tsx:298 — Library.Library has cyclomatic complexity 61 (threshold 15). Of this number, 40 points are the body's own statements and 21 belong to 11 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 · LoginScene.LoginScene (cyclomatic 58) · ×1
  • LoginScene.LoginScene (cyclomatic 58) web/src/pages/LoginScene.tsx:63 — LoginScene.LoginScene has cyclomatic complexity 58 (threshold 15). Most of this is not in the body itself: 2 of the 58 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 196, 70, 153, …). 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 · Settings.Settings (cyclomatic 51) · ×1
  • Settings.Settings (cyclomatic 51) web/src/pages/Settings.tsx:900 — Settings.Settings has cyclomatic complexity 51 (threshold 15). Of this number, 44 points are the body's own statements and 7 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 · ruleExpressions.readExpression (cyclomatic 44) · ×1
  • ruleExpressions.readExpression (cyclomatic 44) web/src/pages/ruleExpressions.ts:17 — ruleExpressions.readExpression has cyclomatic complexity 44 (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 · Graph.EntityPanel (cyclomatic 44) · ×1
  • Graph.EntityPanel (cyclomatic 44) web/src/pages/Graph.tsx:2828 — Graph.EntityPanel has cyclomatic complexity 44 (threshold 15). Of this number, 20 points are the body's own statements and 24 belong to 14 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 · Graph.TimeScrubber (cyclomatic 41) · ×1
  • Graph.TimeScrubber (cyclomatic 41) web/src/pages/Graph.tsx:1931 — Graph.TimeScrubber has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 2167, 1966, 2028, …). 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 · Library.SourceEditModal (cyclomatic 40) · ×1
  • Library.SourceEditModal (cyclomatic 40) web/src/pages/Library.tsx:1872 — Library.SourceEditModal has cyclomatic complexity 40 (threshold 15). Of this number, 27 points are the body's own statements and 13 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 · Graph.FactRow (cyclomatic 38) · ×1
  • Graph.FactRow (cyclomatic 38) web/src/pages/Graph.tsx:3350 — Graph.FactRow has cyclomatic complexity 38 (threshold 15). Of this number, 31 points are the body's own statements and 7 belong to 5 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 · KbSettings.KbSettings (cyclomatic 38) · ×1
  • KbSettings.KbSettings (cyclomatic 38) web/src/pages/KbSettings.tsx:86 — KbSettings.KbSettings has cyclomatic complexity 38 (threshold 15). Of this number, 36 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 · ruleDependencies.ruleDependencies (cyclomatic 36) · ×1
  • ruleDependencies.ruleDependencies (cyclomatic 36) web/src/pages/ruleDependencies.ts:8 — ruleDependencies.ruleDependencies has cyclomatic complexity 36 (threshold 15). Of this number, 17 points are the body's own statements and 19 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 · RulesPanel.RulesPanel (cyclomatic 36) · ×1
  • RulesPanel.RulesPanel (cyclomatic 36) web/src/pages/RulesPanel.tsx:327 — RulesPanel.RulesPanel has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 546, 376, 381, …). 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 · OntologySchemaGraph.buildSchemaGraph (cyclomatic 34) · ×1
  • OntologySchemaGraph.buildSchemaGraph (cyclomatic 34) web/src/pages/OntologySchemaGraph.tsx:272 — OntologySchemaGraph.buildSchemaGraph 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.
D1 · Cyclomatic Complexity · Library.SourceBar (cyclomatic 32) · ×1
  • Library.SourceBar (cyclomatic 32) web/src/pages/Library.tsx:905 — Library.SourceBar has cyclomatic complexity 32 (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 · RulesPanel.RuleDialog (cyclomatic 32) · ×1
  • RulesPanel.RuleDialog (cyclomatic 32) web/src/pages/RulesPanel.tsx:726 — RulesPanel.RuleDialog 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 9 function items inside it that branch (a function literal at line 942, a function literal at line 857, a function literal at line 845, …). 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 · Docs.DocsPage (cyclomatic 29) · ×1
  • Docs.DocsPage (cyclomatic 29) web/src/pages/Docs.tsx:107 — Docs.DocsPage has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 158, onScrollSpy, a function literal at line 142, …). 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 · ontologyDialogs.PropertyDialog (cyclomatic 29) · ×1
  • ontologyDialogs.PropertyDialog (cyclomatic 29) web/src/pages/ontologyDialogs.tsx:290 — ontologyDialogs.PropertyDialog has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body's own statements and 8 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 · api.consumeChatStream (cyclomatic 28) · ×1
  • api.consumeChatStream (cyclomatic 28) web/src/api.ts:2894 — api.consumeChatStream has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 2907, a function literal at line 2928, fail). 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 · steps.stepDetail (cyclomatic 28) · ×1
  • steps.stepDetail (cyclomatic 28) web/src/steps.ts:40 — steps.stepDetail has cyclomatic complexity 28 (threshold 15). Of this number, 26 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 · Ontology.QuestionsPanel (cyclomatic 28) · ×1
  • Ontology.QuestionsPanel (cyclomatic 28) web/src/pages/Ontology.tsx:1899 — Ontology.QuestionsPanel has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 2037, a function literal at line 1918, submit, …). 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 · Ontology.MissesPanel (cyclomatic 27) · ×1
  • Ontology.MissesPanel (cyclomatic 27) web/src/pages/Ontology.tsx:2110 — Ontology.MissesPanel has cyclomatic complexity 27 (threshold 15). Of this number, 16 points are the body's own statements and 11 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 · index.MultiSearchSelect (cyclomatic 26) · ×1
  • index.MultiSearchSelect (cyclomatic 26) web/src/ui/index.tsx:482 — index.MultiSearchSelect has cyclomatic complexity 26 (threshold 15). Of this number, 13 points are the body's own statements and 13 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 · DocViewer.DocViewer (cyclomatic 26) · ×1
  • DocViewer.DocViewer (cyclomatic 26) web/src/pages/DocViewer.tsx:23 — DocViewer.DocViewer has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 110, 155, 46, …). 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 · Mappings.Mappings (cyclomatic 24) · ×1
  • Mappings.Mappings (cyclomatic 24) web/src/pages/Mappings.tsx:87 — Mappings.Mappings has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 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 · Members.Members (cyclomatic 23) · ×1
  • Members.Members (cyclomatic 23) web/src/pages/Members.tsx:121 — Members.Members has cyclomatic complexity 23 (threshold 15). Of this number, 12 points are the body's own statements and 11 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 · Library.SchedulePicker (cyclomatic 22) · ×1
  • Library.SchedulePicker (cyclomatic 22) web/src/pages/Library.tsx:124 — Library.SchedulePicker has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (emit, a function literal at line 233, a function literal at line 239, …). 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 · predicateText.predicateSentence (cyclomatic 21) · ×1
  • predicateText.predicateSentence (cyclomatic 21) web/src/predicateText.ts:20 — predicateText.predicateSentence has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 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 · ontologyTables.OntologyTables (cyclomatic 20) · ×1
  • ontologyTables.OntologyTables (cyclomatic 20) web/src/pages/ontologyTables.tsx:511 — ontologyTables.OntologyTables has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 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 · MyKbs.MyKbs (cyclomatic 19) · ×1
  • MyKbs.MyKbs (cyclomatic 19) web/src/pages/MyKbs.tsx:43 — MyKbs.MyKbs has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 144, 74, 83, …). 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 · Review.AgentRow (cyclomatic 19) · ×1
  • Review.AgentRow (cyclomatic 19) web/src/pages/Review.tsx:532 — Review.AgentRow has cyclomatic complexity 19 (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 · Review.AlignmentPhraseRow (cyclomatic 19) · ×1
  • Review.AlignmentPhraseRow (cyclomatic 19) web/src/pages/Review.tsx:811 — Review.AlignmentPhraseRow has cyclomatic complexity 19 (threshold 15). Of this number, 16 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 · Expr · ×1
  • Expr::decode (cyclomatic 18) crates/utopia-reason/src/expressions.rs:149 — Expr::decode 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 · ExpressionDraftEditor.DraftNode (cyclomatic 18) · ×1
  • ExpressionDraftEditor.DraftNode (cyclomatic 18) web/src/pages/ExpressionDraftEditor.tsx:20 — ExpressionDraftEditor.DraftNode has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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 · Chat.TurnView (cyclomatic 18) · ×1
  • Chat.TurnView (cyclomatic 18) web/src/pages/Chat.tsx:1040 — Chat.TurnView 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, 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 · Login.Login (cyclomatic 18) · ×1
  • Login.Login (cyclomatic 18) web/src/pages/Login.tsx:32 — Login.Login has cyclomatic complexity 18 (threshold 15). Of this number, 16 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 · ontologyDialogs.ClassDialog (cyclomatic 18) · ×1
  • ontologyDialogs.ClassDialog (cyclomatic 18) web/src/pages/ontologyDialogs.tsx:70 — ontologyDialogs.ClassDialog has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 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 · Ontology.RefinePanel (cyclomatic 18) · ×1
  • Ontology.RefinePanel (cyclomatic 18) web/src/pages/Ontology.tsx:1443 — Ontology.RefinePanel 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 · Settings.NewDataSourceDialog (cyclomatic 17) · ×1
  • Settings.NewDataSourceDialog (cyclomatic 17) web/src/pages/Settings.tsx:554 — Settings.NewDataSourceDialog has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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 · Tokens.Tokens (cyclomatic 17) · ×1
  • Tokens.Tokens (cyclomatic 17) web/src/pages/Tokens.tsx:199 — Tokens.Tokens has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 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 · KbMenuList.KbGroupRow (cyclomatic 17) · ×1
  • KbMenuList.KbGroupRow (cyclomatic 17) web/src/pages/KbMenuList.tsx:103 — KbMenuList.KbGroupRow has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 142, onRowKey, onSubmenuKey, …). 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 · OntologyRegressionsPanel.CaseRow (cyclomatic 17) · ×1
  • OntologyRegressionsPanel.CaseRow (cyclomatic 17) web/src/pages/OntologyRegressionsPanel.tsx:79 — OntologyRegressionsPanel.CaseRow 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 · objectValue.fmtObjectValue (cyclomatic 16) · ×1
  • objectValue.fmtObjectValue (cyclomatic 16) web/src/objectValue.ts:9 — objectValue.fmtObjectValue 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 · ontologyTables.ClassesTable (cyclomatic 16) · ×1
  • ontologyTables.ClassesTable (cyclomatic 16) web/src/pages/ontologyTables.tsx:158 — ontologyTables.ClassesTable has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 219, a function literal at line 191, a function literal at line 179, …). 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 · Mappings.MappingRow (cyclomatic 16) · ×1
  • Mappings.MappingRow (cyclomatic 16) web/src/pages/Mappings.tsx:340 — Mappings.MappingRow 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.
D2 · Cognitive Complexity · Graph.Graph (cognitive 289) · ×1
  • Graph.Graph (cognitive 289) web/src/pages/Graph.tsx:268 — Graph.Graph has cognitive complexity 289 (threshold 15). Drivers by points: if/else 88 (122 pts), ternaries 39 (83 pts), boolean chains 70, loops 8 (14 pts) (nesting depth added 84). Of this number, 33 points are the body's own statements and 256 belong to 44 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 · Library.SourceModal (cognitive 244) · ×1
  • Library.SourceModal (cognitive 244) web/src/pages/Library.tsx:1325 — Library.SourceModal has cognitive complexity 244 (threshold 15). Drivers by points: ternaries 35 (220 pts), boolean chains 24 (nesting depth added 185). Of this number, 21 points are the body's own statements and 223 belong to 6 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 · Chat.Chat (cognitive 115) · ×1
  • Chat.Chat (cognitive 115) web/src/pages/Chat.tsx:112 — Chat.Chat has cognitive complexity 115 (threshold 15). Drivers by points: if/else 37 (44 pts), boolean chains 38, ternaries 16 (30 pts), error handling 3 (nesting depth added 21). Of this number, 36 points are the body's own statements and 79 belong to 30 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 · LoginScene.LoginScene (cognitive 98) · ×1
  • LoginScene.LoginScene (cognitive 98) web/src/pages/LoginScene.tsx:63 — LoginScene.LoginScene has cognitive complexity 98 (threshold 15). Drivers by points: if/else 30 (59 pts), loops 22 (31 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 40). Most of this is not in the body itself: 1 of the 98 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 196, 70, 153, …). 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 · OntologySchemaGraph.OntologySchemaGraph (cognitive 98) · ×1
  • OntologySchemaGraph.OntologySchemaGraph (cognitive 98) web/src/pages/OntologySchemaGraph.tsx:579 — OntologySchemaGraph.OntologySchemaGraph has cognitive complexity 98 (threshold 15). Drivers by points: if/else 38 (50 pts), ternaries 15 (26 pts), boolean chains 21, loops 1 (nesting depth added 23). Most of this is not in the body itself: 10 of the 98 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 848, a function literal at line 812, a function literal at line 740, …). 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 · Ontology.Ontology (cognitive 95) · ×1
  • Ontology.Ontology (cognitive 95) web/src/pages/Ontology.tsx:135 — Ontology.Ontology has cognitive complexity 95 (threshold 15). Drivers by points: ternaries 25 (69 pts), boolean chains 14, if/else 8 (10 pts), error handling 2 (nesting depth added 46). Of this number, 73 points are the body's own statements and 22 belong to 12 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 · Library.Library (cognitive 67) · ×1
  • Library.Library (cognitive 67) web/src/pages/Library.tsx:298 — Library.Library has cognitive complexity 67 (threshold 15). Drivers by points: boolean chains 29, ternaries 13 (29 pts), if/else 7 (8 pts), loops 1 (nesting depth added 17). Of this number, 41 points are the body's own statements and 26 belong to 11 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 · Review.Review (cognitive 62) · ×1
  • Review.Review (cognitive 62) web/src/pages/Review.tsx:1351 — Review.Review has cognitive complexity 62 (threshold 15). Drivers by points: boolean chains 50, ternaries 10, if/else 2. Of this number, 54 points are the body's own statements and 8 belong to 11 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 · OntologySchemaGraph.buildSchemaGraph (cognitive 58) · ×1
  • OntologySchemaGraph.buildSchemaGraph (cognitive 58) web/src/pages/OntologySchemaGraph.tsx:272 — OntologySchemaGraph.buildSchemaGraph has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 11 (18 pts), boolean chains 6, ternaries 1 (2 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.
D2 · Cognitive Complexity · ruleDependencies.ruleDependencies (cognitive 48) · ×1
  • ruleDependencies.ruleDependencies (cognitive 48) web/src/pages/ruleDependencies.ts:8 — ruleDependencies.ruleDependencies has cognitive complexity 48 (threshold 15). Drivers by points: if/else 21 (32 pts), loops 6 (9 pts), boolean chains 7 (nesting depth added 14). Of this number, 27 points are the body's own statements and 21 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 · Settings.Settings (cognitive 44) · ×1
  • Settings.Settings (cognitive 44) web/src/pages/Settings.tsx:900 — Settings.Settings has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 17 (24 pts), boolean chains 18, if/else 2 (nesting depth added 7). 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, split the body into named stages: move each independent 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 · Graph.TimeScrubber (cognitive 44) · ×1
  • Graph.TimeScrubber (cognitive 44) web/src/pages/Graph.tsx:1931 — Graph.TimeScrubber has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 19 (24 pts), if/else 9, boolean chains 7, loops 3, error handling 1 (nesting depth added 5). Most of this is not in the body itself: 12 of the 44 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 2167, 1966, 2028, …). 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 · Library.SourceEditModal (cognitive 43) · ×1
  • Library.SourceEditModal (cognitive 43) web/src/pages/Library.tsx:1872 — Library.SourceEditModal has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 10 (23 pts), boolean chains 20 (nesting depth added 13). Of this number, 19 points are the body's own statements and 24 belong to 4 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 · ruleExpressions.readExpression (cognitive 40) · ×1
  • ruleExpressions.readExpression (cognitive 40) web/src/pages/ruleExpressions.ts:17 — ruleExpressions.readExpression has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 14, ternaries 4 (7 pts), loops 1 (2 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 · Graph.FactRow (cognitive 40) · ×1
  • Graph.FactRow (cognitive 40) web/src/pages/Graph.tsx:3350 — Graph.FactRow has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 16 (19 pts), boolean chains 16, if/else 4 (5 pts) (nesting depth added 4). Of this number, 32 points are the body's own statements and 8 belong to 5 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 · RulesPanel.RulesPanel (cognitive 40) · ×1
  • RulesPanel.RulesPanel (cognitive 40) web/src/pages/RulesPanel.tsx:327 — RulesPanel.RulesPanel has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 17, if/else 5 (nesting depth added 5). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 546, 376, 381, …). 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 · Mappings.Mappings (cognitive 38) · ×1
  • Mappings.Mappings (cognitive 38) web/src/pages/Mappings.tsx:87 — Mappings.Mappings has cognitive complexity 38 (threshold 15). Drivers by points: ternaries 9 (17 pts), if/else 5 (11 pts), boolean chains 10 (nesting depth added 14). Of this number, 22 points are the body's own statements and 16 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 · api.consumeChatStream (cognitive 37) · ×1
  • api.consumeChatStream (cognitive 37) web/src/api.ts:2894 — api.consumeChatStream has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (25 pts), error handling 3 (5 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 37 points belong to 3 function items inside it that branch (a function literal at line 2907, a function literal at line 2928, fail). 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 · Graph.EntityPanel (cognitive 29) · ×1
  • Graph.EntityPanel (cognitive 29) web/src/pages/Graph.tsx:2828 — Graph.EntityPanel has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, ternaries 4 (6 pts), if/else 4 (5 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 13 of the 29 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 2870, a function literal at line 2931, a function literal at line 3027, …). 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 · Ontology.UniquenessPanel (cognitive 29) · ×1
  • Ontology.UniquenessPanel (cognitive 29) web/src/pages/Ontology.tsx:1673 — Ontology.UniquenessPanel has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (22 pts), boolean chains 3, if/else 2 (3 pts), error handling 1 (nesting depth added 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 1747, apply). 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 · steps.stepDetail (cognitive 28) · ×1
  • steps.stepDetail (cognitive 28) web/src/steps.ts:40 — steps.stepDetail has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 5 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 11). Of this number, 26 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 · RulesPanel.RuleDialog (cognitive 28) · ×1
  • RulesPanel.RuleDialog (cognitive 28) web/src/pages/RulesPanel.tsx:726 — RulesPanel.RuleDialog has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, ternaries 12 (13 pts) (nesting depth added 1). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 942, a function literal at line 857, a function literal at line 845, …). 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 · Ontology.MissesPanel (cognitive 28) · ×1
  • Ontology.MissesPanel (cognitive 28) web/src/pages/Ontology.tsx:2110 — Ontology.MissesPanel has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 17, if/else 6 (7 pts), ternaries 3 (4 pts) (nesting depth added 2). Of this number, 14 points are the body's own statements and 14 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 · citations.walk (cognitive 26) · ×1
  • citations.walk (cognitive 26) web/src/citations.ts:122 — citations.walk has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (4 pts), 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.
D2 · Cognitive Complexity · objectValue.fmtObjectValue (cognitive 26) · ×1
  • objectValue.fmtObjectValue (cognitive 26) web/src/objectValue.ts:9 — objectValue.fmtObjectValue has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 7 (11 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 · ontologyDialogs.PropertyDialog (cognitive 26) · ×1
  • ontologyDialogs.PropertyDialog (cognitive 26) web/src/pages/ontologyDialogs.tsx:290 — ontologyDialogs.PropertyDialog has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 16, ternaries 9 (10 pts) (nesting depth added 1). Of this number, 18 points are the body's own statements and 8 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 · Docs.DocsPage (cognitive 25) · ×1
  • Docs.DocsPage (cognitive 25) web/src/pages/Docs.tsx:107 — Docs.DocsPage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 9 (10 pts), loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 158, onScrollSpy, a function literal at line 142, …). 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 · KbSettings.KbSettings (cognitive 25) · ×1
  • KbSettings.KbSettings (cognitive 25) web/src/pages/KbSettings.tsx:86 — KbSettings.KbSettings has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 20, if/else 3, ternaries 2. Of this number, 23 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 · Expr · ×1
  • Expr::decode (cognitive 23) crates/utopia-reason/src/expressions.rs:149 — Expr::decode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, loops 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 · ExpressionDraftEditor.DraftNode (cognitive 22) · ×1
  • ExpressionDraftEditor.DraftNode (cognitive 22) web/src/pages/ExpressionDraftEditor.tsx:20 — ExpressionDraftEditor.DraftNode has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (15 pts), if/else 4, boolean chains 3 (nesting depth added 5). Of this number, 14 points are the body's own statements and 8 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 · Graph.layOutParallelEdges (cognitive 22) · ×1
  • Graph.layOutParallelEdges (cognitive 22) web/src/pages/Graph.tsx:154 — Graph.layOutParallelEdges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (7 pts), loops 5, boolean chains 1 (nesting depth added 6). Of this number, 13 points are the body's own statements and 9 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 · Library.SourceBar (cognitive 22) · ×1
  • Library.SourceBar (cognitive 22) web/src/pages/Library.tsx:905 — Library.SourceBar has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 20, ternaries 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 · Reading · ×1
  • Reading::chunk (cognitive 21) crates/utopia-ingest/src/reading.rs:44 — Reading::chunk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (3 pts), match/switch 1 (3 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 · predicateText.predicateSentence (cognitive 21) · ×1
  • predicateText.predicateSentence (cognitive 21) web/src/predicateText.ts:20 — predicateText.predicateSentence has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 7, loops 1, ternaries 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 3 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 · EntityHistory.EventRow (cognitive 21) · ×1
  • EntityHistory.EventRow (cognitive 21) web/src/pages/EntityHistory.tsx:96 — EntityHistory.EventRow has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 3 (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 · ontologyTables.ClassesTable (cognitive 21) · ×1
  • ontologyTables.ClassesTable (cognitive 21) web/src/pages/ontologyTables.tsx:158 — ontologyTables.ClassesTable has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 191, a function literal at line 219, a function literal at line 179, …). 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 · Ontology.QuestionsPanel (cognitive 21) · ×1
  • Ontology.QuestionsPanel (cognitive 21) web/src/pages/Ontology.tsx:1899 — Ontology.QuestionsPanel has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (5 pts), if/else 4 (nesting depth added 1). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 2037, a function literal at line 1918, submit, …). 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 · Search · ×1
  • Search::walk (cognitive 20) crates/utopia-reason/src/lib.rs:397 — Search::walk has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tokens.Tokens (cognitive 20) · ×1
  • Tokens.Tokens (cognitive 20) web/src/pages/Tokens.tsx:199 — Tokens.Tokens has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (11 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 242, 380, 213, …). 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 · DocViewer.DocViewer (cognitive 20) · ×1
  • DocViewer.DocViewer (cognitive 20) web/src/pages/DocViewer.tsx:23 — DocViewer.DocViewer has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (5 pts), ternaries 4, loops 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 110, 46, 63, …). 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 · ontologyTables.OntologyTables (cognitive 20) · ×1
  • ontologyTables.OntologyTables (cognitive 20) web/src/pages/ontologyTables.tsx:511 — ontologyTables.OntologyTables has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 10 (16 pts), boolean chains 4 (nesting depth added 6). Of this number, 16 points are the body's own statements and 4 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 · SnowflakeEngine · ×1
  • SnowflakeEngine::run (cognitive 19) crates/utopia-server/src/query_engine/snowflake.rs:68 — SnowflakeEngine::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (4 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 · ClickHouseEngine · ×1
  • ClickHouseEngine::post (cognitive 18) crates/utopia-server/src/query_engine/clickhouse.rs:250 — ClickHouseEngine::post has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 7). 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 · Members.Members (cognitive 18) · ×1
  • Members.Members (cognitive 18) web/src/pages/Members.tsx:121 — Members.Members has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, ternaries 3. Of this number, 10 points are the body's own statements and 8 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 · Packer · ×1
  • Packer::place (cognitive 17) crates/utopia-ingest/src/chunker.rs:307 — Packer::place has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (17 pts) (nesting depth added 9). 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 · DatabricksEngine · ×1
  • DatabricksEngine::run (cognitive 17) crates/utopia-server/src/query_engine/databricks.rs:126 — DatabricksEngine::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · unread.liveAnswer.subscribe() (cognitive 17) · ×1
  • unread.liveAnswer.subscribe() (cognitive 17) web/src/unread.ts:59 — unread.liveAnswer.subscribe() has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 3 (5 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 · index.MultiSearchSelect (cognitive 17) · ×1
  • index.MultiSearchSelect (cognitive 17) web/src/ui/index.tsx:482 — index.MultiSearchSelect has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 1. Of this number, 10 points are the body's own statements and 7 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 · graphVisuals.drawWorldGrid (cognitive 17) · ×1
  • graphVisuals.drawWorldGrid (cognitive 17) REDACTED:226 — graphVisuals.drawWorldGrid has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (7 pts), if/else 5 (6 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · OntologySchemaGraph.layOutParallelEdges (cognitive 17) · ×1
  • OntologySchemaGraph.layOutParallelEdges (cognitive 17) web/src/pages/OntologySchemaGraph.tsx:432 — OntologySchemaGraph.layOutParallelEdges has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 7 (12 pts), if/else 3 (4 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function items inside it that branch (typeFor, a function literal at line 451, a function literal at line 434). 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 · OntologyRegressionsPanel.CaseRow (cognitive 17) · ×1
  • OntologyRegressionsPanel.CaseRow (cognitive 17) web/src/pages/OntologyRegressionsPanel.tsx:79 — OntologyRegressionsPanel.CaseRow has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 4 (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 · ontologyDialogs.parentOptions (cognitive 17) · ×1
  • ontologyDialogs.parentOptions (cognitive 17) web/src/pages/ontologyDialogs.tsx:26 — ontologyDialogs.parentOptions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 8). Of this number, 14 points are the body's own statements and 3 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 · star-history.stargazerDates (cognitive 16) · ×1
  • star-history.stargazerDates (cognitive 16) scripts/star-history.mjs:31 — star-history.stargazerDates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ruleExpressions.expressionText (cognitive 16) · ×1
  • ruleExpressions.expressionText (cognitive 16) web/src/pages/ruleExpressions.ts:59 — ruleExpressions.expressionText has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 7, loops 1 (nesting depth added 4). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (render, literal). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · graphDialogs.FactTimeDialog (cognitive 16) · ×1
  • graphDialogs.FactTimeDialog (cognitive 16) web/src/pages/graphDialogs.tsx:103 — graphDialogs.FactTimeDialog has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 5, boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 129, 147). 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 · Library.SchedulePicker (cognitive 16) · ×1
  • Library.SchedulePicker (cognitive 16) web/src/pages/Library.tsx:124 — Library.SchedulePicker has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 2 (4 pts), if/else 1, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (emit, a function literal at line 233, a function literal at line 239, …). 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 · Library.DocRow (cognitive 16) · ×1
  • Library.DocRow (cognitive 16) web/src/pages/Library.tsx:2216 — Library.DocRow has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · MyKbs.MyKbs (cognitive 16) · ×1
  • MyKbs.MyKbs (cognitive 16) web/src/pages/MyKbs.tsx:43 — MyKbs.MyKbs has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 3 (4 pts), if/else 2 (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 4 function literals inside it that branch (lines 144, 74, 83, …). 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 · OntologySchemaGraph.schemaScope (cognitive 16) · ×1
  • OntologySchemaGraph.schemaScope (cognitive 16) web/src/pages/OntologySchemaGraph.tsx:192 — OntologySchemaGraph.schemaScope has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 4 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 3). 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 · ontologyDialogs.ClassDialog (cognitive 16) · ×1
  • ontologyDialogs.ClassDialog (cognitive 16) web/src/pages/ontologyDialogs.tsx:70 — ontologyDialogs.ClassDialog has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 5 (nesting depth added 1). Of this number, 12 points are the body's own statements and 4 belong to 4 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 · Review.AlignmentPhraseRow (cognitive 16) · ×1
  • Review.AlignmentPhraseRow (cognitive 16) web/src/pages/Review.tsx:811 — Review.AlignmentPhraseRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 11, ternaries 5. Of this number, 13 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · MethodTooLong · ×1
  • MethodTooLong: DatabricksEngine.run crates/utopia-server/src/query_engine/databricks.rs:126 — MethodTooLong — run runs 128 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 28 over it, 1.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.
D3 · God Classes · TooManyFields · ×1
  • TooManyFields: EntityFact crates/utopia-core/src/models.rs:798 — TooManyFields — 38 stored fields. The bar is 30 stored fields; this is 8 over it, 1.27× 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) · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: AccountShell.tsx, Docs.tsx, Shell.tsx web/src/pages/AccountShell.tsx — 3 files — `web/src/pages/AccountShell.tsx`, `web/src/pages/Docs.tsx`, `web/src/pages/Shell.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (59 shared lines) · ×1
  • Near-duplicate member pair (59 shared lines) crates/utopia-server/src/api/tools_graph.rs:892 — crates/utopia-server/src/api/tools_graph.rs:892-1030 | crates/utopia-server/src/api/tools_graph.rs:1034-1151 — These two members are variants of one another: 59 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) crates/utopia-store/src/documents.rs:99 — crates/utopia-store/src/documents.rs:99-157 | crates/utopia-store/src/documents.rs:203-250 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18–24 lines × 2) · ×1
  • Duplicated block (18–24 lines × 2) crates/utopia-server/src/ingest_sources.rs:1221 — crates/utopia-server/src/ingest_sources.rs:1221-1244 | crates/utopia-server/src/ingest_sources.rs:1275-1292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) crates/utopia-server/src/extraction_open.rs:337 — crates/utopia-server/src/extraction_open.rs:337-356 | crates/utopia-server/src/extraction_open.rs:645-664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×1
  • Duplicated block (19 lines × 2) REDACTED:1508 — REDACTED:1508-1526 | REDACTED:1857-1875 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–19 lines × 2) · ×1
  • Duplicated block (16–19 lines × 2) crates/utopia-store/src/temporal.rs:1110 — crates/utopia-store/src/temporal.rs:1110-1125 | crates/utopia-store/src/temporal.rs:1186-1204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) crates/utopia-server/src/errata.rs:183 — crates/utopia-server/src/errata.rs:183-197 | crates/utopia-server/src/errata.rs:222-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) crates/utopia-server/src/api/sources_routes.rs:554 — crates/utopia-server/src/api/sources_routes.rs:554-568 | crates/utopia-server/src/api/sources_routes.rs:614-627 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) crates/utopia-store/src/documents.rs:372 — crates/utopia-store/src/documents.rs:372-385 | crates/utopia-store/src/documents.rs:427-440 | crates/utopia-store/src/documents.rs:475-488 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) crates/utopia-server/src/api/tools.rs:1120 — crates/utopia-server/src/api/tools.rs:1120-1131 | crates/utopia-server/src/api/tools_graph.rs:398-409 | crates/utopia-server/src/api/tools_graph.rs:1160-1171 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (10–12 lines × 3) · ×1
  • Duplicated block (10–12 lines × 3) REDACTED:466 — REDACTED:466-477 | REDACTED:668-678 | REDACTED:934-943 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (3–12 lines × 3) · ×1
  • Duplicated block (3–12 lines × 3) crates/utopia-extract/src/align.rs:103 — crates/utopia-extract/src/align.rs:103-105 | crates/utopia-extract/src/implication.rs:68-79 | crates/utopia-extract/src/phrase_align.rs:202-213 — 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 (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) crates/utopia-llm/src/lib.rs:985 — crates/utopia-llm/src/lib.rs:985-993 | crates/utopia-llm/src/lib.rs:1091-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.
D4 · Code Duplication · Duplicated block (6–9 lines × 3) · ×1
  • Duplicated block (6–9 lines × 3) crates/utopia-server/src/main.rs:539 — crates/utopia-server/src/main.rs:539-547 | crates/utopia-server/src/main.rs:556-564 | crates/utopia-server/src/main.rs:603-608 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) crates/utopia-extract/src/implication.rs:143 — crates/utopia-extract/src/implication.rs:143-151 | crates/utopia-extract/src/implication.rs:247-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) crates/utopia-server/src/api/rig_model.rs:55 — crates/utopia-server/src/api/rig_model.rs:55-62 | crates/utopia-server/src/api/rig_model.rs:81-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) crates/utopia-server/src/extraction.rs:338 — crates/utopia-server/src/extraction.rs:338-344 | crates/utopia-server/src/pipeline.rs:283-288 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) crates/utopia-store/src/resolution.rs:353 — crates/utopia-store/src/resolution.rs:353-362 | crates/utopia-store/src/resolution.rs:961-980 | crates/utopia-store/src/resolution.rs:2872-2884 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×1
  • Duplicated block (16 lines × 2) crates/utopia-store/src/temporal.rs:1140 — crates/utopia-store/src/temporal.rs:1140-1155 | crates/utopia-store/src/temporal.rs:1218-1234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) crates/utopia-server/src/api/tools_graph.rs:688 — crates/utopia-server/src/api/tools_graph.rs:688-695 | crates/utopia-server/src/api/tools_graph.rs:899-908 | crates/utopia-server/src/api/tools_graph.rs:1041-1048 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) crates/utopia-llm/src/lib.rs:637 — crates/utopia-llm/src/lib.rs:637-643 | crates/utopia-llm/src/lib.rs:901-907 | crates/utopia-llm/src/lib.rs:1131-1137 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (2–7 lines × 3) · ×1
  • Duplicated block (2–7 lines × 3) crates/utopia-store/src/ontology.rs:1791 — crates/utopia-store/src/ontology.rs:1791-1792 | crates/utopia-store/src/ontology.rs:1817-1823 | crates/utopia-store/src/ontology.rs:1848-1854 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×1
  • Duplicated block (5 lines × 6) crates/utopia-server/src/errata.rs:54 — crates/utopia-server/src/errata.rs:54-58 | crates/utopia-server/src/implication.rs:240-244 | crates/utopia-server/src/ontology_agent.rs:76-81 | crates/utopia-server/src/ontology_agent.rs:1462-1466 | crates/utopia-server/src/phrase_alignment.rs:669-674 | crates/utopia-server/src/type_alignment.rs:114-118 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — web/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience crates/utopia-server/src/api/chat.rs:922 — `AgentBuilder::new(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Duplicated block with local edits (145 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (145 matched lines × 2 locations) web/src/pages/KbSettings.tsx:634 — web/src/pages/KbSettings.tsx:634 · web/src/pages/Members.tsx:135 — the two spans are one implementation copied and then locally edited — 878 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 (86 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (86 matched lines × 2 locations) web/src/pages/Library.tsx:1390 — web/src/pages/Library.tsx:1390 · web/src/pages/Library.tsx:1918 — the two spans are one implementation copied and then locally edited — 542 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 (79 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (79 matched lines × 2 locations) web/src/pages/ontologyDialogs.tsx:84 — web/src/pages/ontologyDialogs.tsx:84 · web/src/pages/ontologyDialogs.tsx:309 — the two spans are one implementation copied and then locally edited — 582 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 (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) web/src/pages/Review.tsx:226 — web/src/pages/Review.tsx:226 · web/src/pages/Review.tsx:376 — 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 (46 lines × 2 locations) · ×1
  • Duplicated block (46 lines × 2 locations) web/src/pages/Library.tsx:1606 — web/src/pages/Library.tsx:1606 · web/src/pages/Library.tsx:2017 — 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 (46 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (46 matched lines × 2 locations) web/src/pages/Mappings.tsx:644 — web/src/pages/Mappings.tsx:644 · web/src/pages/Settings.tsx:118 — the two spans are one implementation copied and then locally edited — 307 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 (43 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (43 matched lines × 2 locations) web/src/pages/Settings.tsx:1332 — web/src/pages/Settings.tsx:1332 · web/src/pages/Settings.tsx:1435 — the two spans are one implementation copied and then locally edited — 238 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 (39 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (39 matched lines × 2 locations) web/src/pages/KbSettings.tsx:589 — web/src/pages/KbSettings.tsx:589 · web/src/pages/Library.tsx:1279 — the two spans are one implementation copied and then locally edited — 227 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 (38 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (38 matched lines × 2 locations) web/src/pages/ontologyTables.tsx:340 — web/src/pages/ontologyTables.tsx:340 · web/src/pages/ontologyTables.tsx:440 — the two spans are one implementation copied and then locally edited — 308 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 (31 lines × 3 locations) · ×1
  • Duplicated block (31 lines × 3 locations) web/src/pages/Settings.tsx:1204 — web/src/pages/Settings.tsx:1204 · web/src/pages/Settings.tsx:1300 · web/src/pages/Settings.tsx:1470 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (31 matched lines × 2 locations) web/src/pages/ontologyTables.tsx:196 — web/src/pages/ontologyTables.tsx:196 · web/src/pages/ontologyTables.tsx:455 — the two spans are one implementation copied and then locally edited — 246 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 (25 lines × 2 locations) · ×1
  • Duplicated block (25 lines × 2 locations) web/src/pages/Settings.tsx:263 — web/src/pages/Settings.tsx:263 · web/src/pages/Settings.tsx:295 — 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 (24 lines × 2 locations) · ×1
  • Duplicated block (24 lines × 2 locations) web/src/pages/ontologyDialogs.tsx:272 — web/src/pages/ontologyDialogs.tsx:272 · web/src/pages/ontologyDialogs.tsx:579 — 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 (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) web/src/pages/Graph.tsx:1784 — web/src/pages/Graph.tsx:1784 · web/src/pages/OntologySchemaGraph.tsx:1116 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (22 lines × 3 locations) · ×1
  • Duplicated block (22 lines × 3 locations) web/src/pages/ontologyDialogs.tsx:136 — web/src/pages/ontologyDialogs.tsx:136 · web/src/pages/ontologyDialogs.tsx:387 · web/src/pages/ontologyDialogs.tsx:653 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) web/src/pages/Graph.tsx:2664 — web/src/pages/Graph.tsx:2664 · web/src/pages/Graph.tsx:3630 — 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 (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) web/src/pages/Settings.tsx:746 — web/src/pages/Settings.tsx:746 · web/src/pages/Sso.tsx:97 — 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.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×1
  • Duplicated block (18 lines × 2 locations) web/src/components/ui/select.tsx:142 — web/src/components/ui/select.tsx:142 · web/src/components/ui/select.tsx:161 — 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 (17 lines × 3 locations) · ×1
  • Duplicated block (17 lines × 3 locations) web/src/pages/Ontology.tsx:2588 — web/src/pages/Ontology.tsx:2588 · web/src/pages/RulesPanel.tsx:527 · web/src/pages/Tokens.tsx:269 — the 3 copies are spread across 3 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.
R10 · Code Duplication · Duplicated block (16 lines × 3 locations) · ×1
  • Duplicated block (16 lines × 3 locations) web/src/pages/ontologyTables.tsx:278 — web/src/pages/ontologyTables.tsx:278 · web/src/pages/ontologyTables.tsx:407 · web/src/pages/ontologyTables.tsx:492 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (15 lines × 3 locations) · ×1
  • Duplicated block (15 lines × 3 locations) web/src/pages/Library.tsx:1718 — web/src/pages/Library.tsx:1718 · web/src/pages/Library.tsx:1748 · web/src/pages/Library.tsx:1783 — 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 (13 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (13 matched lines × 2 locations) web/src/pages/KbMenuList.tsx:190 — web/src/pages/KbMenuList.tsx:190 · web/src/pages/KbMenuList.tsx:247 — the two spans are one implementation copied and then locally edited — 72 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 (12 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (12 matched lines × 2 locations) web/src/pages/Docs.tsx:58 — web/src/pages/Docs.tsx:58 · web/src/ui/citation.tsx:87 — the two spans are one implementation copied and then locally edited — 59 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 Ontology (cyclomatic 59, cognitive 49) · ×1
  • Complex function Ontology (cyclomatic 59, cognitive 49) web/src/pages/Ontology.tsx:135 — Ontology has cyclomatic complexity 59 and cognitive complexity 49; 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 Settings (cyclomatic 53, cognitive 51) · ×1
  • Complex function Settings (cyclomatic 53, cognitive 51) web/src/pages/Settings.tsx:900 — Settings has cyclomatic complexity 53 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 edgeReducer (cyclomatic 51, cognitive 69) · ×1
  • Complex function edgeReducer (cyclomatic 51, cognitive 69) web/src/pages/Graph.tsx:1065 — edgeReducer has cyclomatic complexity 51 and cognitive complexity 69; 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 Library (cyclomatic 48, cognitive 41) · ×1
  • Complex function Library (cyclomatic 48, cognitive 41) web/src/pages/Library.tsx:298 — Library has cyclomatic complexity 48 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 readExpression (cyclomatic 46, cognitive 49) · ×1
  • Complex function readExpression (cyclomatic 46, cognitive 49) web/src/pages/ruleExpressions.ts:17 — readExpression has cyclomatic complexity 46 and cognitive complexity 49; 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 Graph (cyclomatic 44, cognitive 39) · ×1
  • Complex function Graph (cyclomatic 44, cognitive 39) web/src/pages/Graph.tsx:268 — Graph has cyclomatic complexity 44 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 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 SourceModal (cyclomatic 41, cognitive 29) · ×1
  • Complex function SourceModal (cyclomatic 41, cognitive 29) web/src/pages/Library.tsx:1325 — SourceModal has cyclomatic complexity 41 and cognitive complexity 29; 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 draw (cyclomatic 38, cognitive 73) · ×1
  • Complex function draw (cyclomatic 38, cognitive 73) web/src/pages/LoginScene.tsx:196 — draw has cyclomatic complexity 38 and cognitive complexity 73; 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 SourceEditModal (cyclomatic 38, cognitive 37) · ×1
  • Complex function SourceEditModal (cyclomatic 38, cognitive 37) web/src/pages/Library.tsx:1872 — SourceEditModal has cyclomatic complexity 38 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 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 Chat (cyclomatic 37, cognitive 32) · ×1
  • Complex function Chat (cyclomatic 37, cognitive 32) web/src/pages/Chat.tsx:112 — Chat has cyclomatic complexity 37 and cognitive complexity 32; 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 SourceBar (cyclomatic 37, cognitive 31) · ×1
  • Complex function SourceBar (cyclomatic 37, cognitive 31) web/src/pages/Library.tsx:905 — SourceBar 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 KbSettings (cyclomatic 37, cognitive 28) · ×1
  • Complex function KbSettings (cyclomatic 37, cognitive 28) web/src/pages/KbSettings.tsx:86 — KbSettings has cyclomatic complexity 37 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 PropertyDialog (cyclomatic 36, cognitive 33) · ×1
  • Complex function PropertyDialog (cyclomatic 36, cognitive 33) web/src/pages/ontologyDialogs.tsx:290 — PropertyDialog 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 buildSchemaGraph (cyclomatic 35, cognitive 59) · ×1
  • Complex function buildSchemaGraph (cyclomatic 35, cognitive 59) web/src/pages/OntologySchemaGraph.tsx:272 — buildSchemaGraph has cyclomatic complexity 35 and cognitive complexity 59; 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 mutationFn (cyclomatic 35, cognitive 34) · ×1
  • Complex function mutationFn (cyclomatic 35, cognitive 34) web/src/pages/Library.tsx:1384 — mutationFn has cyclomatic complexity 35 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 stepDetail (cyclomatic 30, cognitive 29) · ×1
  • Complex function stepDetail (cyclomatic 30, cognitive 29) web/src/steps.ts:40 — stepDetail has cyclomatic complexity 30 and cognitive complexity 29; 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 nodeReducer (cyclomatic 28, cognitive 34) · ×1
  • Complex function nodeReducer (cyclomatic 28, cognitive 34) web/src/pages/Graph.tsx:981 — nodeReducer has cyclomatic complexity 28 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 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 edgeReducer (cyclomatic 26, cognitive 23) · ×1
  • Complex function edgeReducer (cyclomatic 26, cognitive 23) web/src/pages/OntologySchemaGraph.tsx:848 — edgeReducer has cyclomatic complexity 26 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 AgentRow (cyclomatic 24, cognitive 20) · ×1
  • Complex function AgentRow (cyclomatic 24, cognitive 20) web/src/pages/Review.tsx:532 — AgentRow has cyclomatic complexity 24 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 CaseRow (cyclomatic 21, cognitive 19) · ×1
  • Complex function CaseRow (cyclomatic 21, cognitive 19) web/src/pages/OntologyRegressionsPanel.tsx:79 — CaseRow has cyclomatic complexity 21 and cognitive complexity 19; 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.
R3 · Large Files · web/src/pages/Graph.tsx · ×1
  • web/src/pages/Graph.tsx: 3540 lines of code web/src/pages/Graph.tsx:1 — web/src/pages/Graph.tsx has 3540 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 · web/src/api.ts · ×1
  • web/src/api.ts: 2865 lines of code web/src/api.ts:1 — web/src/api.ts has 2865 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 · web/src/pages/Ontology.tsx · ×1
  • web/src/pages/Ontology.tsx: 2772 lines of code web/src/pages/Ontology.tsx:1 — web/src/pages/Ontology.tsx has 2772 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 · web/src/i18n/en.ts · ×1
  • web/src/i18n/en.ts: 2523 lines of code web/src/i18n/en.ts:1 — web/src/i18n/en.ts has 2523 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 · web/src/pages/Library.tsx · ×1
  • web/src/pages/Library.tsx: 2280 lines of code web/src/pages/Library.tsx:1 — web/src/pages/Library.tsx has 2280 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 · web/src/pages/Review.tsx · ×1
  • web/src/pages/Review.tsx: 2236 lines of code web/src/pages/Review.tsx:1 — web/src/pages/Review.tsx has 2236 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 · web/src/i18n/zh.ts · ×1
  • web/src/i18n/zh.ts: 2208 lines of code web/src/i18n/zh.ts:1 — web/src/i18n/zh.ts has 2208 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 · web/src/ui/index.tsx · ×1
  • web/src/ui/index.tsx: 1841 lines of code web/src/ui/index.tsx:1 — web/src/ui/index.tsx has 1841 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 · web/src/pages/Settings.tsx · ×1
  • web/src/pages/Settings.tsx: 1469 lines of code web/src/pages/Settings.tsx:1 — web/src/pages/Settings.tsx has 1469 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 · web/src/pages/OntologySchemaGraph.tsx · ×1
  • web/src/pages/OntologySchemaGraph.tsx: 1105 lines of code web/src/pages/OntologySchemaGraph.tsx:1 — web/src/pages/OntologySchemaGraph.tsx has 1105 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 · web/src/pages/Chat.tsx · ×1
  • web/src/pages/Chat.tsx: 1098 lines of code web/src/pages/Chat.tsx:1 — web/src/pages/Chat.tsx has 1098 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 · web/src/pages/RulesPanel.tsx · ×1
  • web/src/pages/RulesPanel.tsx: 1028 lines of code web/src/pages/RulesPanel.tsx:1 — web/src/pages/RulesPanel.tsx has 1028 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 · web/src/pages/ontologyDialogs.tsx · ×1
  • web/src/pages/ontologyDialogs.tsx: 848 lines of code web/src/pages/ontologyDialogs.tsx:1 — web/src/pages/ontologyDialogs.tsx has 848 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 · web/src/pages/KbSettings.tsx · ×1
  • web/src/pages/KbSettings.tsx: 788 lines of code web/src/pages/KbSettings.tsx:1 — web/src/pages/KbSettings.tsx has 788 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 · web/src/pages/Mappings.tsx · ×1
  • web/src/pages/Mappings.tsx: 735 lines of code web/src/pages/Mappings.tsx:1 — web/src/pages/Mappings.tsx has 735 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 · web/src/pages/ontologyTables.tsx · ×1
  • web/src/pages/ontologyTables.tsx: 632 lines of code web/src/pages/ontologyTables.tsx:1 — web/src/pages/ontologyTables.tsx has 632 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 · web/src/pages/Members.tsx · ×1
  • web/src/pages/Members.tsx: 543 lines of code web/src/pages/Members.tsx:1 — web/src/pages/Members.tsx has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · No test rig can mount a component in this workspace · ×1
  • No test rig can mount a component in this workspace web/vite.config.ts:1 — web/vite.config.ts declares environment "node", and no package here declares a DOM implementation (jsdom / happy-dom), a component testing library or a browser runner — so none of the 34 unreached component module(s) can be tested as written, however the suite is authored: web/src/pages/Review.tsx, web/src/pages/Chat.tsx, web/src/pages/KbSettings.tsx, web/src/router.tsx, web/src/pages/AlertBell.tsx, web/src/pages/Docs.tsx and 28 more. Add a DOM environment and a component testing library (for example jsdom + @testing-library, or the runner's browser mode), then test the components. Reported once because these files share one cause, not one omission each.
R7 · Dead Code · Dead file (~115 LoC) · ×1
  • Dead file (~115 LoC) web/src/components/ui/table.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~102 LoC) · ×1
  • Dead file (~102 LoC) web/src/components/ui/card.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~87 LoC) · ×1
  • Dead file (~87 LoC) web/src/components/ui/tabs.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~54 LoC) · ×1
  • Dead file (~54 LoC) web/src/components/ui/tooltip.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~30 LoC) · ×1
  • Dead file (~30 LoC) web/src/components/ui/switch.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~27 LoC) · ×1
  • Dead file (~27 LoC) web/src/components/ui/separator.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~21 LoC) · ×1
  • Dead file (~21 LoC) web/src/components/ui/label.tsx — no import path from any entry point (13 application, 4 tooling, 48 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) web/src/components/ui/skeleton.tsx — no import path from any entry point (13 application, 4 tooling, 48 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 (~1 LoC) · ×1
  • Dead file (~1 LoC) web/src/lib/utils.ts — no import path from any entry point (13 application, 4 tooling, 48 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 '@sigma/node-square' · ×1
  • Unused dependency '@sigma/node-square' — Declared in web/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.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm crates/utopia-server/src/github_repo.rs:84 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`sha2::Sha256::digest(…)`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: stargazerDates scripts/star-history.mjs:31 — `stargazerDates` 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 })`.
Minor — 153 finding(s)
D7 · Architectural Integrity · Classify ADR enforcement · ×64
  • Classify ADR enforcement: 0001 · Ontology import and governance docs/decisions/0001-ontology-import-and-governance.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0002 · Reasoning engine docs/decisions/0002-reasoning-engine.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0003 · The ontology grows out of the corpus docs/decisions/0003-ontology-growth-loop.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0004 · Language follows the reader of each text docs/decisions/0004-language-and-localization.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0005 · The alert center docs/decisions/0005-alert-center.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0006 · Ontology scale and the extraction prompt docs/decisions/0006-ontology-scale-and-the-prompt.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0007 · Counting decides what becomes a relation docs/decisions/0007-who-decides-what-becomes-a-relation.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0008 · Ontology packs as the cold start docs/decisions/0008-ontology-packs-as-cold-start.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0009 · An undecided type stays empty docs/decisions/0009-no-type-is-a-type.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0010 · An unnamed relation stays empty docs/decisions/0010-no-relation-is-no-relation.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0011 · A mapping is configuration docs/decisions/0011-a-mapping-is-not-a-fact.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0012 · The ontology is a contract docs/decisions/0012-the-ontology-is-a-contract-not-a-suggestion.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0013 · A source hands over its history docs/decisions/0013-a-source-should-hand-over-its-history.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0014 · Identity from the person, scope from the token docs/decisions/0014-identity-from-the-person-scope-from-the-token.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0015 · A recorded sentence waits for a nod docs/decisions/0015-recording-a-sentence-is-not-asserting-a-fact.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0016 · Close the open seams before cutting new ones docs/decisions/0016-close-the-open-seams-before-cutting-new-ones.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0017 · A contradiction points at an error upstream docs/decisions/0017-a-contradiction-points-upstream.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0018 · The lakehouse is one protocol away docs/decisions/0018-the-lakehouse-is-one-protocol-away.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0019 · The second clock can be rewound docs/decisions/0019-the-second-clock-can-be-rewound.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0020 · An auditor reads it without us docs/decisions/0020-an-auditor-reads-it-without-us.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0021 · A rule reads attributes and concludes a type docs/decisions/0021-a-rule-reads-attributes-and-concludes-a-type.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0022 · An unknown date is not an open one docs/decisions/0022-an-unknown-date-is-not-an-open-one.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0023 · RSS observations are not documents docs/decisions/0023-rss-observations-are-not-documents.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0024 · The world axis reaches the second docs/decisions/0024-the-world-axis-reaches-the-second.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • Classify ADR enforcement: 0025 · Governance reads the ledger before it decides docs/decisions/0025-governance-reads-the-ledger-before-it-decides.md — This record carries no `enforcement:` field, so nothing says whether the decision is checked by anything or is upheld by convention alone — and an unclassified record is counted as UNENFORCED in this dimension's score, which is the same bucket as a rule known to have no check behind it. If this is a mechanizable rule, add an analyzer/test (or `enforcement: analyzer|test`); if it's a design decision, mark `enforcement: not-applicable` so it isn't counted as unenforced.
  • + 39 more in this group — see findings.md.
D20 · ADR Quality · ADR has no Context and Consequences section · ×37
  • ADR has no Context and Consequences section docs/decisions/0001-ontology-import-and-governance.md:1 — docs/decisions/0001-ontology-import-and-governance.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0002-reasoning-engine.md:1 — docs/decisions/0002-reasoning-engine.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0003-ontology-growth-loop.md:1 — docs/decisions/0003-ontology-growth-loop.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0004-language-and-localization.md:1 — docs/decisions/0004-language-and-localization.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0005-alert-center.md:1 — docs/decisions/0005-alert-center.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0006-ontology-scale-and-the-prompt.md:1 — docs/decisions/0006-ontology-scale-and-the-prompt.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0007-who-decides-what-becomes-a-relation.md:1 — docs/decisions/0007-who-decides-what-becomes-a-relation.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0008-ontology-packs-as-cold-start.md:1 — docs/decisions/0008-ontology-packs-as-cold-start.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0009-no-type-is-a-type.md:1 — docs/decisions/0009-no-type-is-a-type.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0010-no-relation-is-no-relation.md:1 — docs/decisions/0010-no-relation-is-no-relation.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0011-a-mapping-is-not-a-fact.md:1 — docs/decisions/0011-a-mapping-is-not-a-fact.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0012-the-ontology-is-a-contract-not-a-suggestion.md:1 — docs/decisions/0012-the-ontology-is-a-contract-not-a-suggestion.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0013-a-source-should-hand-over-its-history.md:1 — docs/decisions/0013-a-source-should-hand-over-its-history.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0014-identity-from-the-person-scope-from-the-token.md:1 — docs/decisions/0014-identity-from-the-person-scope-from-the-token.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0015-recording-a-sentence-is-not-asserting-a-fact.md:1 — docs/decisions/0015-recording-a-sentence-is-not-asserting-a-fact.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0017-a-contradiction-points-upstream.md:1 — docs/decisions/0017-a-contradiction-points-upstream.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0021-a-rule-reads-attributes-and-concludes-a-type.md:1 — docs/decisions/0021-a-rule-reads-attributes-and-concludes-a-type.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0022-an-unknown-date-is-not-an-open-one.md:1 — docs/decisions/0022-an-unknown-date-is-not-an-open-one.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0024-the-world-axis-reaches-the-second.md:1 — docs/decisions/0024-the-world-axis-reaches-the-second.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0025-governance-reads-the-ledger-before-it-decides.md:1 — docs/decisions/0025-governance-reads-the-ledger-before-it-decides.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0026-a-decision-records-why.md:1 — docs/decisions/0026-a-decision-records-why.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0027-an-automatic-merge-is-gated-by-what-it-can-undo.md:1 — docs/decisions/0027-an-automatic-merge-is-gated-by-what-it-can-undo.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0028-the-adjudicator-looks-before-it-asks.md:1 — docs/decisions/0028-the-adjudicator-looks-before-it-asks.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0031-an-event-holds-at-the-moment-it-names.md:1 — docs/decisions/0031-an-event-holds-at-the-moment-it-names.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Consequences section docs/decisions/0035-a-vector-index-is-built-by-a-job.md:1 — docs/decisions/0035-a-vector-index-is-built-by-a-job.md has no Context and Consequences section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • + 12 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×10
  • Duplicated predicate web/src/pages/ExpressionDraftLab.tsx:32 — `c.operand && typeof c.operand === "object" && !Array.isArray(c.operand)` appears character-identically in 2 files — web/src/pages/ExpressionDraftLab.tsx, web/src/pages/ruleDependencies.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 web/src/pages/ruleDependencies.ts:20 — `depth > 4 || !raw || typeof raw !== "object" || Array.isArray(raw)` appears character-identically in 2 files — web/src/pages/ruleDependencies.ts, web/src/pages/ruleExpressions.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 web/src/pages/AccountShell.tsx:42 — `me.error instanceof ApiError && me.error.status === 401` appears character-identically in 2 files — web/src/pages/AccountShell.tsx, web/src/pages/Shell.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:579 — `!note.is_primary_key && note.references_table.is_none()` appears character-identically in 2 files — REDACTED, crates/utopia-server/src/query_engine/postgres.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/utopia-server/src/api/admin_routes.rs:121 — `!req.email.contains('@') || req.email.len() > 254` appears character-identically in 2 files — crates/utopia-server/src/api/admin_routes.rs, crates/utopia-server/src/api/auth_routes.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 REDACTED:575 — `id.is_primary_key && id.references_table.is_none()` appears character-identically in 2 files — REDACTED, crates/utopia-server/src/query_engine/postgres.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/utopia-server/src/api/auth_routes.rs:213 — `name.is_empty() || name.chars().count() > 64` appears character-identically in 4 files — crates/utopia-server/src/api/auth_routes.rs, crates/utopia-server/src/api/kbs.rs, crates/utopia-server/src/api/workspaces.rs, crates/utopia-store/src/tokens.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 REDACTED:628 — `p2_id.is_primary_key && p2_id.references_table.is_none()` appears character-identically in 2 files — REDACTED, crates/utopia-server/src/query_engine/postgres.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/utopia-server/src/api/admin_routes.rs:131 — `req.display_name.trim().is_empty() || req.display_name.chars().count() > 64` appears character-identically in 2 files — crates/utopia-server/src/api/admin_routes.rs, crates/utopia-server/src/api/auth_routes.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/utopia-server/src/main.rs:482 — `typed.added > 0 || typed.merged > 0 || typed.retired > 0` appears character-identically in 2 files — crates/utopia-server/src/main.rs, crates/utopia-server/src/phrase_alignment.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.
X4 · Structured logging · Interpolated log message defeats structured logging · ×6
  • Interpolated log message defeats structured logging crates/utopia-server/src/main.rs:145 — `info!` at line 145 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/utopia-server/src/main.rs:300 — `info!` at line 300 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/utopia-server/src/main.rs:308 — `info!` at line 308 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/utopia-server/src/main.rs:673 — `info!` at line 673 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/utopia-server/src/phrase_alignment.rs:691 — `info!` at line 691 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging crates/utopia-server/src/api/mod.rs:96 — `info!` at line 96 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
D25 · ADR Conformance · ADR not followed · ×4
  • ADR not followed: 0003 · The ontology grows out of the corpus docs/decisions/0003-ontology-growth-loop.md:43 — docs/decisions/0003-ontology-growth-loop.md:43 rules out `functional`, but production code uses it: web/src/api.ts:1276, web/src/api.ts:1416, web/src/api.ts:1464, web/src/pages/Ontology.tsx:1119, web/src/pages/Ontology.tsx:1275 (+20 more). Remove the use, or supersede the record if the decision changed.
  • ADR not followed: 0015 · A recorded sentence waits for a nod docs/decisions/0015-recording-a-sentence-is-not-asserting-a-fact.md:48 — docs/decisions/0015-recording-a-sentence-is-not-asserting-a-fact.md:48 rules out `object_value` in facts, but production code uses it: web/src/pages/PendingFacts.tsx:25. Remove the use, or supersede the record if the decision changed.
  • ADR not followed: 0065 · The OCR reader chooses its provider docs/decisions/0065-readers-choose-their-provider.md:17 — docs/decisions/0065-readers-choose-their-provider.md:17 rules out `ocr` in Pages, but production code uses it: web/src/pages/Settings.tsx:985, web/src/pages/Settings.tsx:1023, web/src/pages/Settings.tsx:1085, web/src/pages/Settings.tsx:1087, web/src/pages/Settings.tsx:1088 (+5 more). Remove the use, or supersede the record if the decision changed.
  • ADR not followed: 0069 · The identity provider vouches for listed domains docs/decisions/0069-the-identity-provider-vouches-for-listed-domains.md:15 — docs/decisions/0069-the-identity-provider-vouches-for-listed-domains.md:15 rules out `email` in login, but production code uses it: web/src/pages/Login.tsx:36, web/src/pages/Login.tsx:48, web/src/pages/Login.tsx:49, web/src/pages/Login.tsx:131, web/src/pages/Login.tsx:132. Remove the use, or supersede the record if the decision changed.
D10 · Test Quality · Mock-dominated test · ×3
  • Mock-dominated test: preserves the HTTP status and code for an already-running conversation web/src/chatStream.test.ts:57 — This test sets up 7 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: reads the generation identity and stopped outcome on reattach=%s web/src/chatStream.test.ts:123 — This test sets up 8 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: hands the stored id of the question to the page with the conversation web/src/chatStream.test.ts:182 — This test sets up 7 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
D20 · ADR Quality · ADR has no Consequences section · ×3
  • ADR has no Consequences section docs/decisions/0044-the-ontology-is-a-view-over-what-documents-say.md:1 — docs/decisions/0044-the-ontology-is-a-view-over-what-documents-say.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Consequences section docs/decisions/0053-a-phrase-decision-records-the-inputs-it-considered.md:1 — docs/decisions/0053-a-phrase-decision-records-the-inputs-it-considered.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Consequences section docs/decisions/0062-the-export-says-what-is-contested.md:1 — docs/decisions/0062-the-export-says-what-is-contested.md has no Consequences section (a heading such as `## Consequences`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch web/src/unread.ts:22 — `load` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch web/src/kb.tsx:70 — `queryFn` (in `useKb`) swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch web/src/theme.ts:20 — `stored` swallows every exception into `return "dark"` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
D20 · ADR Quality · ADR has no Context and Decision section · ×2
  • ADR has no Context and Decision section docs/decisions/0029-a-rule-may-say-or-once.md:1 — docs/decisions/0029-a-rule-may-say-or-once.md has no Context and Decision section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
  • ADR has no Context and Decision section docs/decisions/0032-a-rule-computes-what-it-concludes.md:1 — docs/decisions/0032-a-rule-computes-what-it-concludes.md has no Context and Decision section (a heading such as `## Context`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
C4 · Data Retention · Partial data-retention evidence · ×1
  • Partial data-retention evidence — A retention mechanism is present, but the data-lifecycle is not yet complete — missing: an expiry limit — a declared maximum age / TTL after which the data is no longer kept, a documented retention period / data-expiry.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 54 significant file(s) lose their only recent owner: web/src/ui/index.tsx, crates/utopia-reason/src/lib.rs, web/src/pages/OntologySchemaGraph.tsx, crates/utopia-server/src/governance.rs, crates/utopia-server/src/type_resolution.rs, web/src/pages/KbSettings.tsx, crates/utopia-server/src/extraction.rs, web/src/pages/ontologyDialogs.tsx (+46 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 2 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (59 single-owned of 244 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 244 of the 295 production source files in this repository met that bar). They are anonymized user #2 (4 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/utopia-server/src/webdav.rs, crates/utopia-server/src/api/chat_finalization.rs, crates/utopia-server/src/api/chat_context.rs, web/src/pages/ExpressionDraftEditor.tsx, crates/utopia-server/src/docs_corpus.rs.
D20 · ADR Quality · ADR has no Decision and Consequences section · ×1
  • ADR has no Decision and Consequences section docs/decisions/0051-a-human-phrase-decision-carries-its-materialization-work.md:1 — docs/decisions/0051-a-human-phrase-decision-carries-its-materialization-work.md has no Decision and Consequences section (a heading such as `## Decision`, or the MADR equivalent). A decision record states the context that forced it, the decision and its consequences, so a reader can tell later whether it still holds.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 11 project(s) overshoot their size bounds, lowering Project Cohesion to 4.5/10. The most over is `crates/utopia-server` (48135 LoC, 253 module-visible types across 4 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D31 · IaC & Container Security · Low IaC · ×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
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 311/368 types (85%) declared in the published library are public. For a library, every public type is a stability contract — keep implementation types off the surface and expose only the intended API.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'Origin' · ×1
  • Unused export 'Origin' web/src/origin.ts:6 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CANVAS_TITLE_SIZE' · ×1
  • Unused export 'CANVAS_TITLE_SIZE' REDACTED:61 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'CANVAS_META_SIZE' · ×1
  • Unused export 'CANVAS_META_SIZE' REDACTED:62 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'hexToRgb' · ×1
  • Unused export 'hexToRgb' REDACTED:71 — Nothing imports this binding — it is safe to review for removal.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected — None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, …) is set on a response this repository's Rust server sends — defense in depth, even when a proxy could set them. (−2.0 on this card.) The server: `axum::serve(` (crates/utopia-server/src/main.rs:312).
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 1/2 async functions that make a cancellable request (fetch, axios, ky, ofetch) 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.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~2.7 `!` null assertions per 1k TypeScript source lines — 111 assertion(s) across the 40733 source line(s) of the 109 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: web/src/pages/Review.tsx (20), web/src/pages/Library.tsx (15), web/src/pages/Graph.tsx (8). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
X7 · Silent fallback defaults · Silent fallback default on Err · ×1
  • Silent fallback default on Err crates/utopia-server/src/query_engine/postgres.rs:106 — `execute` turns every `Err` into `"{}".into()` — 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.
Minor — 16 finding(s)
D12 · Dependency Hygiene · Outdated · ×16
  • Outdated: encoding_rs — `encoding_rs` is locked at 0.8.35 but 0.8.42 is the current stable release on crates.io, and it already satisfies the `"0.8"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p encoding_rs` and commit the updated REDACTED.
  • Outdated: htmd — `htmd` is locked at 0.5.5 but 0.5.6 is the current stable release on crates.io, and it already satisfies the `"0.5"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p htmd` and commit the updated REDACTED.
  • Outdated: object_store — `object_store` is locked at 0.14.1 but 0.14.2 is the current stable release on crates.io, and it already satisfies the `"0.14.1"` requirement declared in crates/utopia-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p object_store` and commit the updated REDACTED.
  • Outdated: oxrdf — `oxrdf` is locked at 0.3.3 but 0.3.5 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p oxrdf` and commit the updated REDACTED.
  • Outdated: oxrdfio — `oxrdfio` is locked at 0.2.5 but 0.2.7 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/utopia-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p oxrdfio` and commit the updated REDACTED.
  • Outdated: oxrdfxml — `oxrdfxml` is locked at 0.2.3 but 0.2.5 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p oxrdfxml` and commit the updated REDACTED.
  • Outdated: oxttl — `oxttl` is locked at 0.2.3 but 0.2.5 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p oxttl` and commit the updated REDACTED.
  • Outdated: pdf-extract — `pdf-extract` is locked at 0.12.0 but 0.12.1 is the current stable release on crates.io, and it already satisfies the `"0.12"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pdf-extract` and commit the updated REDACTED.
  • Outdated: pulldown-cmark — `pulldown-cmark` is locked at 0.13.4 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p pulldown-cmark` and commit the updated REDACTED.
  • Outdated: reqwest — `reqwest` is locked at 0.13.1 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13"` requirement declared in crates/utopia-llm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p reqwest` 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 crates/utopia-cli/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: sha2 — `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in crates/utopia-cli/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
  • Outdated: thiserror — `thiserror` is locked at 2.0.20 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/utopia-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
  • Outdated: tiktoken-rs — `tiktoken-rs` is locked at 0.12.0 but 0.12.1 is the current stable release on crates.io, and it already satisfies the `"0.12"` requirement declared in crates/utopia-ingest/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tiktoken-rs` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/utopia-server/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.26.0 but 1.29.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/utopia-core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-1e5a75eead314f0c832ffeb1c18cd69c/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-1e5a75eead314f0c832ffeb1c18cd69c/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --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 .66artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update36artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .5artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17e35-17b7-7c00-b0fb-8bb82227e9de · 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