Public report of songquanpeng/one-api, published 24 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 reportMeasured 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, 24 October 2026, 14:36 UTC · Survey ID cd_60320948a8524ad2bb2368bb19564613
songquanpeng/one-api
Measured 24 October 2026, 14:27 UTC, at code version 8df4a26
Regression: 2 dimensions fell since the last survey
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.
CAI scoreAt riskDown 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 50,916 lines of product code in 4 projects, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Production Readiness, 25
Findings by how serious they are
45 critical596 serious297 minor
13 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 14:27 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.
A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.
The score is deterministic, which means the same code always gets the same score. 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 ▸
84of 87 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
894of 938 findings point to an exact file and line, so you can open each one in the code. The other 44 concern the repository as a whole, such as missing documentation.
87dimensions across 8 lenses, read from 50,916 lines of product code in 4 projects.
songquanpeng/one-api scores 39 out of 100, but it is rated At risk while a critical security finding is open; the score itself is unchanged. The project hasn't declared a stable release yet, so its lenses are rated against a lower bar than a released product's, while the score itself is worked out as for any repository.
The weakest lens counts most in the score, and here that is Production Readiness, which scores 25 and is rated Weak. Its Test Coverage dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 1 Leaked secret finding(s) in Secret Scanning and to add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing, and if Production Readiness rose to 70, the score would rise from 39 to about 52.
45 findings are critical: 33 in Static Analysis (SAST), six in Dependency Vulnerabilities, two in Circular Imports, one in Change Coupling, one in Dependency Hygiene, one in IaC & Container Security and one in Secret Scanning.
Watchdog couldn't measure 12 dimensions in this code, among them Code Coverage, Internal API Consistency and Navigability, so they are left out of the score. The product code is 50,916 lines, which would take an estimated 0.3 person-years, around €50,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 forThe 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.
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Schema migrations · Schema created by GORM AutoMigrate (no migration path) model/main.go
Visual & motion safety · Animation without a prefers-reduced-motion guard web/default/src/pages/Dashboard/Dashboard.css
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: 189 findings
These 189 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.
€17,000 to €84,000, for 279 to 885 hours of work, about 0.3 person-years for one engineer
Difficulty of the problem
Standard, 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 39. 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.
Size
Medium: 50,916 lines of product code
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 11 points · Low effort · Secret Scanning
2
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add tests that import the unreached modules (directly or through their public entry).
Raises the score by about 4 points · Medium effort · Test Coverage
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 €50,000 to build again, about 0.3 person-years of work. Its weakest lens is Production Readiness, at 25 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
One cause behind 11 Domain Modelling findings · Common cause
11 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Other code can change an object's data directly, so it can put an order into a state the rules forbid. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Encapsulated state (6 findings) · Rich vs anemic model (5 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Resolve the 1 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 11 points for low effort, because it clears the 1 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 5.3 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 14,589 lines over the last 90 days, which is about 59,166 lines a year. At that pace, the extra work comes to an estimated 9.8 to 58.8 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
137 modules, with 126 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 97 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.
com/songquanpeng/one-api/middleware uses com/songquanpeng/one-api/common, so a change to com/songquanpeng/one-api/common can break com/songquanpeng/one-api/middleware, while a change to com/songquanpeng/one-api/middleware can't break com/songquanpeng/one-api/common.
Position
Below the diagonal: com/songquanpeng/one-api/middleware uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/middleware uses com/songquanpeng/one-api/model, so a change to com/songquanpeng/one-api/model can break com/songquanpeng/one-api/middleware, while a change to com/songquanpeng/one-api/middleware can't break com/songquanpeng/one-api/model.
Position
Below the diagonal: com/songquanpeng/one-api/middleware uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/monitor uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/monitor, while a change to com/songquanpeng/one-api/monitor can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/monitor uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/meta uses com/songquanpeng/one-api/model, so a change to com/songquanpeng/one-api/model can break com/songquanpeng/one-api/relay/meta, while a change to com/songquanpeng/one-api/relay/meta can't break com/songquanpeng/one-api/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/meta uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor, while a change to com/songquanpeng/one-api/relay/adaptor can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor, while a change to com/songquanpeng/one-api/relay/adaptor can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/alibailian uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/alibailian, while a change to com/songquanpeng/one-api/relay/adaptor/alibailian can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/alibailian uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/utils uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/aws/utils, while a change to com/songquanpeng/one-api/relay/adaptor/aws/utils can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/utils uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/utils uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/aws/utils, while a change to com/songquanpeng/one-api/relay/adaptor/aws/utils can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/utils uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baiduv2 uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/baiduv2, while a change to com/songquanpeng/one-api/relay/adaptor/baiduv2 can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baiduv2 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/doubao uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/doubao, while a change to com/songquanpeng/one-api/relay/adaptor/doubao can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/doubao uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/geminiv2 uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/geminiv2, while a change to com/songquanpeng/one-api/relay/adaptor/geminiv2 can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/geminiv2 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/minimax uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/minimax, while a change to com/songquanpeng/one-api/relay/adaptor/minimax can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/minimax uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/novita uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/novita, while a change to com/songquanpeng/one-api/relay/adaptor/novita can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/novita uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay, while a change to com/songquanpeng/one-api/relay can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/vertexai, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/vertexai, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/vertexai, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/controller uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/controller, while a change to com/songquanpeng/one-api/relay/controller can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/controller uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/controller, while a change to com/songquanpeng/one-api/relay/controller can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/controller uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/controller, while a change to com/songquanpeng/one-api/relay/controller can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/aws, while a change to com/songquanpeng/one-api/relay/adaptor/aws can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/aws, while a change to com/songquanpeng/one-api/relay/adaptor/aws can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/aws, while a change to com/songquanpeng/one-api/relay/adaptor/aws can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws uses com/songquanpeng/one-api/relay/adaptor/aws/utils, so a change to com/songquanpeng/one-api/relay/adaptor/aws/utils can break com/songquanpeng/one-api/relay/adaptor/aws, while a change to com/songquanpeng/one-api/relay/adaptor/aws can't break com/songquanpeng/one-api/relay/adaptor/aws/utils.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/aws, while a change to com/songquanpeng/one-api/relay/adaptor/aws can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cloudflare uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/cloudflare, while a change to com/songquanpeng/one-api/relay/adaptor/cloudflare can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cloudflare uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cloudflare uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/cloudflare, while a change to com/songquanpeng/one-api/relay/adaptor/cloudflare can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cloudflare uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cloudflare uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/cloudflare, while a change to com/songquanpeng/one-api/relay/adaptor/cloudflare can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cloudflare uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cloudflare uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/cloudflare, while a change to com/songquanpeng/one-api/relay/adaptor/cloudflare can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cloudflare uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/openai uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/openai, while a change to com/songquanpeng/one-api/relay/adaptor/openai can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/openai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/openai uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/openai, while a change to com/songquanpeng/one-api/relay/adaptor/openai can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/openai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/openai uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/openai, while a change to com/songquanpeng/one-api/relay/adaptor/openai can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/openai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/openai uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/openai, while a change to com/songquanpeng/one-api/relay/adaptor/openai can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/openai uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/proxy uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/proxy, while a change to com/songquanpeng/one-api/relay/adaptor/proxy can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/proxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/proxy uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/proxy, while a change to com/songquanpeng/one-api/relay/adaptor/proxy can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/proxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/proxy uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/proxy, while a change to com/songquanpeng/one-api/relay/adaptor/proxy can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/proxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/proxy uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/proxy, while a change to com/songquanpeng/one-api/relay/adaptor/proxy can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/proxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/replicate uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/replicate, while a change to com/songquanpeng/one-api/relay/adaptor/replicate can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/replicate uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/replicate uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/replicate, while a change to com/songquanpeng/one-api/relay/adaptor/replicate can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/replicate uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/replicate uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/replicate, while a change to com/songquanpeng/one-api/relay/adaptor/replicate can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/replicate uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/replicate uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/replicate, while a change to com/songquanpeng/one-api/relay/adaptor/replicate can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/replicate uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/vertexai/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/gemini can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/vertexai/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/gemini can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses a type in com/songquanpeng/one-api/relay/adaptor/vertexai.
com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/vertexai/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/gemini can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/controller uses com/songquanpeng/one-api/model, so a change to com/songquanpeng/one-api/model can break com/songquanpeng/one-api/controller, while a change to com/songquanpeng/one-api/controller can't break com/songquanpeng/one-api/model.
Position
Below the diagonal: com/songquanpeng/one-api/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/controller uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/controller, while a change to com/songquanpeng/one-api/controller can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/controller uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/controller, while a change to com/songquanpeng/one-api/controller can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/controller uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aiproxy uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/aiproxy, while a change to com/songquanpeng/one-api/relay/adaptor/aiproxy can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aiproxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aiproxy uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/aiproxy, while a change to com/songquanpeng/one-api/relay/adaptor/aiproxy can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aiproxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aiproxy uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/aiproxy, while a change to com/songquanpeng/one-api/relay/adaptor/aiproxy can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aiproxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aiproxy uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/aiproxy, while a change to com/songquanpeng/one-api/relay/adaptor/aiproxy can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aiproxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aiproxy uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/aiproxy, while a change to com/songquanpeng/one-api/relay/adaptor/aiproxy can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aiproxy uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ali uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/ali, while a change to com/songquanpeng/one-api/relay/adaptor/ali can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ali uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ali uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/ali, while a change to com/songquanpeng/one-api/relay/adaptor/ali can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ali uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ali uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/ali, while a change to com/songquanpeng/one-api/relay/adaptor/ali can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ali uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ali uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/ali, while a change to com/songquanpeng/one-api/relay/adaptor/ali can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ali uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ali uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/ali, while a change to com/songquanpeng/one-api/relay/adaptor/ali can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ali uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/anthropic uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/anthropic, while a change to com/songquanpeng/one-api/relay/adaptor/anthropic can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/anthropic uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/anthropic uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/anthropic, while a change to com/songquanpeng/one-api/relay/adaptor/anthropic can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/anthropic uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/anthropic uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/anthropic, while a change to com/songquanpeng/one-api/relay/adaptor/anthropic can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/anthropic uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/anthropic uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/anthropic, while a change to com/songquanpeng/one-api/relay/adaptor/anthropic can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/anthropic uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/anthropic uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/anthropic, while a change to com/songquanpeng/one-api/relay/adaptor/anthropic can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/anthropic uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/aws/llama3, while a change to com/songquanpeng/one-api/relay/adaptor/aws/llama3 can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/aws/llama3, while a change to com/songquanpeng/one-api/relay/adaptor/aws/llama3 can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses com/songquanpeng/one-api/relay/adaptor/aws/utils, so a change to com/songquanpeng/one-api/relay/adaptor/aws/utils can break com/songquanpeng/one-api/relay/adaptor/aws/llama3, while a change to com/songquanpeng/one-api/relay/adaptor/aws/llama3 can't break com/songquanpeng/one-api/relay/adaptor/aws/utils.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/aws/llama3, while a change to com/songquanpeng/one-api/relay/adaptor/aws/llama3 can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/llama3 uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baidu uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/baidu, while a change to com/songquanpeng/one-api/relay/adaptor/baidu can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baidu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baidu uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/baidu, while a change to com/songquanpeng/one-api/relay/adaptor/baidu can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baidu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baidu uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/baidu, while a change to com/songquanpeng/one-api/relay/adaptor/baidu can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baidu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baidu uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/baidu, while a change to com/songquanpeng/one-api/relay/adaptor/baidu can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baidu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/baidu uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/baidu, while a change to com/songquanpeng/one-api/relay/adaptor/baidu can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/baidu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cohere uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/cohere, while a change to com/songquanpeng/one-api/relay/adaptor/cohere can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cohere uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cohere uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/cohere, while a change to com/songquanpeng/one-api/relay/adaptor/cohere can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cohere uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cohere uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/cohere, while a change to com/songquanpeng/one-api/relay/adaptor/cohere can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cohere uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cohere uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/cohere, while a change to com/songquanpeng/one-api/relay/adaptor/cohere can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cohere uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/cohere uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/cohere, while a change to com/songquanpeng/one-api/relay/adaptor/cohere can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/cohere uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/coze uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/coze, while a change to com/songquanpeng/one-api/relay/adaptor/coze can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/coze uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/coze uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/coze, while a change to com/songquanpeng/one-api/relay/adaptor/coze can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/coze uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/coze uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/coze, while a change to com/songquanpeng/one-api/relay/adaptor/coze can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/coze uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/coze uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/coze, while a change to com/songquanpeng/one-api/relay/adaptor/coze can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/coze uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/coze uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/coze, while a change to com/songquanpeng/one-api/relay/adaptor/coze can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/coze uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/deepl uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/deepl, while a change to com/songquanpeng/one-api/relay/adaptor/deepl can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/deepl uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/deepl uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/deepl, while a change to com/songquanpeng/one-api/relay/adaptor/deepl can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/deepl uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/deepl uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/deepl, while a change to com/songquanpeng/one-api/relay/adaptor/deepl can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/deepl uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/deepl uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/deepl, while a change to com/songquanpeng/one-api/relay/adaptor/deepl can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/deepl uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/deepl uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/deepl, while a change to com/songquanpeng/one-api/relay/adaptor/deepl can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/deepl uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/gemini uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/gemini can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/gemini uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/gemini can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/gemini uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/gemini can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/gemini uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/gemini can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/gemini uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/gemini, while a change to com/songquanpeng/one-api/relay/adaptor/gemini can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/gemini uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ollama uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/ollama, while a change to com/songquanpeng/one-api/relay/adaptor/ollama can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ollama uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ollama uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/ollama, while a change to com/songquanpeng/one-api/relay/adaptor/ollama can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ollama uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ollama uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/ollama, while a change to com/songquanpeng/one-api/relay/adaptor/ollama can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ollama uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ollama uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/ollama, while a change to com/songquanpeng/one-api/relay/adaptor/ollama can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ollama uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/ollama uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/ollama, while a change to com/songquanpeng/one-api/relay/adaptor/ollama can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/ollama uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/palm uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/palm, while a change to com/songquanpeng/one-api/relay/adaptor/palm can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/palm uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/palm uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/palm, while a change to com/songquanpeng/one-api/relay/adaptor/palm can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/palm uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/palm uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/palm, while a change to com/songquanpeng/one-api/relay/adaptor/palm can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/palm uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/palm uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/palm, while a change to com/songquanpeng/one-api/relay/adaptor/palm can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/palm uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/palm uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/palm, while a change to com/songquanpeng/one-api/relay/adaptor/palm can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/palm uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/tencent uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/tencent, while a change to com/songquanpeng/one-api/relay/adaptor/tencent can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/tencent uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/tencent uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/tencent, while a change to com/songquanpeng/one-api/relay/adaptor/tencent can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/tencent uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/tencent uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/tencent, while a change to com/songquanpeng/one-api/relay/adaptor/tencent can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/tencent uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/tencent uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/tencent, while a change to com/songquanpeng/one-api/relay/adaptor/tencent can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/tencent uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/tencent uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/tencent, while a change to com/songquanpeng/one-api/relay/adaptor/tencent can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/tencent uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/xunfei uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/xunfei, while a change to com/songquanpeng/one-api/relay/adaptor/xunfei can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/xunfei uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/xunfei uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/xunfei, while a change to com/songquanpeng/one-api/relay/adaptor/xunfei can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/xunfei uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/xunfei uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/xunfei, while a change to com/songquanpeng/one-api/relay/adaptor/xunfei can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/xunfei uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/xunfei uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/xunfei, while a change to com/songquanpeng/one-api/relay/adaptor/xunfei can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/xunfei uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/xunfei uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/xunfei, while a change to com/songquanpeng/one-api/relay/adaptor/xunfei can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/xunfei uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/zhipu uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/zhipu, while a change to com/songquanpeng/one-api/relay/adaptor/zhipu can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/zhipu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/zhipu uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/zhipu, while a change to com/songquanpeng/one-api/relay/adaptor/zhipu can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/zhipu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/zhipu uses com/songquanpeng/one-api/relay/adaptor, so a change to com/songquanpeng/one-api/relay/adaptor can break com/songquanpeng/one-api/relay/adaptor/zhipu, while a change to com/songquanpeng/one-api/relay/adaptor/zhipu can't break com/songquanpeng/one-api/relay/adaptor.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/zhipu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/zhipu uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/zhipu, while a change to com/songquanpeng/one-api/relay/adaptor/zhipu can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/zhipu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/zhipu uses com/songquanpeng/one-api/relay/adaptor/openai, so a change to com/songquanpeng/one-api/relay/adaptor/openai can break com/songquanpeng/one-api/relay/adaptor/zhipu, while a change to com/songquanpeng/one-api/relay/adaptor/zhipu can't break com/songquanpeng/one-api/relay/adaptor/openai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/zhipu uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/claude uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/aws/claude, while a change to com/songquanpeng/one-api/relay/adaptor/aws/claude can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/claude uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/claude uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/aws/claude, while a change to com/songquanpeng/one-api/relay/adaptor/aws/claude can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/claude uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/claude uses com/songquanpeng/one-api/relay/adaptor/aws/utils, so a change to com/songquanpeng/one-api/relay/adaptor/aws/utils can break com/songquanpeng/one-api/relay/adaptor/aws/claude, while a change to com/songquanpeng/one-api/relay/adaptor/aws/claude can't break com/songquanpeng/one-api/relay/adaptor/aws/utils.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/claude uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/aws/claude uses com/songquanpeng/one-api/relay/adaptor/anthropic, so a change to com/songquanpeng/one-api/relay/adaptor/anthropic can break com/songquanpeng/one-api/relay/adaptor/aws/claude, while a change to com/songquanpeng/one-api/relay/adaptor/aws/claude can't break com/songquanpeng/one-api/relay/adaptor/anthropic.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/aws/claude uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses com/songquanpeng/one-api/relay/model, so a change to com/songquanpeng/one-api/relay/model can break com/songquanpeng/one-api/relay/adaptor/vertexai/claude, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/claude can't break com/songquanpeng/one-api/relay/model.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a module listed above it, which is the healthy direction.
com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses com/songquanpeng/one-api/relay/meta, so a change to com/songquanpeng/one-api/relay/meta can break com/songquanpeng/one-api/relay/adaptor/vertexai/claude, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/claude can't break com/songquanpeng/one-api/relay/meta.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a type in com/songquanpeng/one-api/relay/adaptor/vertexai.
com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses com/songquanpeng/one-api/relay/adaptor/vertexai, so a change to com/songquanpeng/one-api/relay/adaptor/vertexai can break com/songquanpeng/one-api/relay/adaptor/vertexai/claude, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/claude can't break com/songquanpeng/one-api/relay/adaptor/vertexai.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a module listed above it, which is the healthy direction.
2 pairs of types, where a type in com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a type in com/songquanpeng/one-api/relay/adaptor/anthropic.
com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses com/songquanpeng/one-api/relay/adaptor/anthropic, so a change to com/songquanpeng/one-api/relay/adaptor/anthropic can break com/songquanpeng/one-api/relay/adaptor/vertexai/claude, while a change to com/songquanpeng/one-api/relay/adaptor/vertexai/claude can't break com/songquanpeng/one-api/relay/adaptor/anthropic.
Position
Below the diagonal: com/songquanpeng/one-api/relay/adaptor/vertexai/claude uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 47% · Adequate · gated by D2, D3, R1 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
57
High / Critical
A03:2025 — Software Supply Chain Failures
21
High / Critical
A01:2025 — Broken Access Control
12
Medium
A02:2025 — Security Misconfiguration
6
High / Critical
A07:2025 — Authentication Failures
1
High / Critical
Roadmap
Immediately resolve the leaked secret in REDACTED and integrate automated security scanning into the CI pipeline to prevent regressions. Strengthen code quality by adding tests for unreached modules and cleaning up unused or misclassified dependencies. Finally, ensure outbound HTTP calls are resilient by enforcing explicit timeouts, retries, and circuit breakers on all client requests.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Replace GORM AutoMigrate with a versioned migration tool such as golang-migrate, goose or Atlas so the production schema can evolve safely and reproducibly.
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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 — 45
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 — 596
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 — 297
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 84 of 87 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 87 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 894 of 938 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`go test -cover -coverprofile`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.go), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
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 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 18 — an image could not be pulled) — redis Pulling db Pulling one-api Pulling redis Error Get "https://registry-1.docker.io/v2/": Forbidden db Error Get "https://registry-1.docker.io/v2/": Forbidden one-api Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: redis Pulling db Pulling one-api Pulling one-api Error Get "https://registry-1.docker.io/v2/": Forbidden db Error Get "https://registry-1.docker.io/v2/": Forbidden redis Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped.
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
DM9 Scattered domain decisions — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
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. 187 further occurrence(s) are not listed individually; the score already reflects all 227.
X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's Go 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.
X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
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.
D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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.
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.
DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
95 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SystemSetting.SystemSetting at 52. A further 14 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 model.updateOptionMap at 58 — they are counted neither in the figure above nor in this dimension's score. 8 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: model/option.go (model.updateOptionMap at 58), relay/adaptor/baidu/adaptor.go (Adaptor.GetRequestURL at 26), relay/adaptor/openai/compatible.go (openai.GetCompatibleChannelMeta at 21), relay/adaptor.go (relay.GetAdaptor at 20), relay/channeltype/helper.go (channeltype.ToAPIType at 19), and 3 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 56 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 21 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with SystemSetting.SystemSetting (cyclomatic 52), SystemSetting (cyclomatic 52), ChannelsTable (cyclomatic 50). — 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 21 together lifts Cyclomatic Complexity from 5.2 to about 6.4/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 60 down to 60 or less in Cognitive Complexity — start with SystemSetting (cognitive 75), SystemSetting.SystemSetting (cognitive 73), ChannelsTable (cognitive 63). — 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 5 together lifts Cognitive Complexity from 3.3 to about 4.0/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes3.2 / 10Weak✓ 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.
Resolve the 67 FunctionTooLong finding(s) in God Classes — start with index.js (13), EditModal.js (4), SystemSetting.js (3). — One of this dimension's main actionable groups (67 warning-level).
Resolve the 12 ClassTooLong finding(s) in God Classes — start with SystemSetting.js (3), EditChannel.js (2), ChannelsTable.js (2). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 11 FileTooLong finding(s) in God Classes — start with SystemSetting.js (3), ChannelsTable.js (2), EditChannel.js (2). — One of this dimension's main actionable groups (11 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
80 duplicated block group(s) detected. A further 8 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: .js (61% 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.
+ 41 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with REDACTED (5), user.go, REDACTED. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 6 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with github.go, lark.go, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 5 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), user.go, adaptor.go. — One of this dimension's main actionable groups (5 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
4 production modules (npm+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 1 of the 4 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
✓ On the Gold path — maintain.
Detailed fixes: d5_recommendation.md.
Do you agree with this assessment?
D6 · Cohesion (LCOM4)3.7 / 10Weak✓ 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.
Low cohesion: User (LCOM4 6) · ×10model/user.go:34
What to do
Resolve the 10 Low cohesion finding(s) in Cohesion (LCOM4) — start with adaptor.go (7), user.go, channel.go. — One of this dimension's main actionable groups (10 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
8 test methods: 8 unit, 0 integration, 0 BDD, 0 e2e. The Go suite contributes 8 test case(s) across 5 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 2 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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.
21 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Outdated: cloud.google.com/go/iam · ×21
What to do
Enforce Dependency Hygiene in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: 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.
0 of 101 required Go module(s) use a banned license. Licences were read per module version from the licence files pkg.go.dev detects (via api.deps.dev), over every module this repository's REDACTED requires, direct and indirect, at the version the build uses. Go records no test-only scope at module level, so modules only this repository's own tests import are included.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 21 Hotspot finding(s) in Churn × Complexity Hotspots — start with ChannelsTable.js, model.go, EditChannel.js. — One of this dimension's main actionable groups (21 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.8 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is web/default/src/pages/Dashboard/index.js. Counted over 189 of the 467 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
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
5 deducted task-comment markers across 19591 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.
TodoComment · ×5controller/channel-billing.go:418
What to do
Resolve the 5 TodoComment finding(s) in Explicit Debt — start with channel-billing.go, utils.go, REDACTED. — One of this dimension's main actionable groups (5 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
One API 的文档质量很高:根 README 概述项目并展示部署、使用和反馈入口;web/README.md 和 web/berry/README.md 分别描述前端界面的提交主题流程、React模板用法及渠道配置,以及一个 Berry Free React Admin Template 的开发说明;docs/API.md 详细讲解了鉴权、请求格式、API列表和充值链接参数解析。文档结构清晰,涵盖项目概述、部署、使用、贡献、许可等常见内容,并且每个文档都明确标注其覆盖范围(如 web/README.md 只描述前端界面)。
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
4 of 4 build units (Go, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
57 finding(s): 0 critical, 33 high, 23 medium, 1 low. 24 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED, REDACTED. — One of this dimension's main actionable groups (7 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 24 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 (24 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (7). — One of this dimension's main actionable groups (7 warning-level).
Resolve the 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
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).
Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D32 · Data Compliance (PII/GDPR)2.9 / 10Weak✓ Tool-verified
What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.
Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using Watchdog's own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.
Resolve the 12 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (12 warning-level).
Detailed fixes: d32_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
189 of 189 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is relay/billing/ratio/model.go. Counted over 189 of the 467 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3relay/billing/ratio/model.go:1
Dormant codebase
What to do
Resolve the 186 Orphaned file finding(s) in Knowledge Freshness — start with index.js (22), REDACTED (18), adaptor.go (9). — One of this dimension's main actionable groups (186 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with model.go, SystemSetting.js, EditChannel.js. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with constants.go. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Change coupling finding(s) in Change Coupling — start with constants.go, compatible.go, Config.js. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with channel.constants.js, model.go, ChannelConstants.js. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
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).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
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.
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.
`.stat-card` moves (`transition: transform 0.2s 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/default/src/pages/Dashboard/Dashboard.css:14
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.
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.
An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 3 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
Accessibility linting is already configured — assert with your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) in tests, then gate axe/pa11y/Lighthouse in CI.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
Package `config` is written on every request (`notifyRootUser` is reached per request from the Gin handler `controller.TestChannels`, and every request's goroutine sees the same package variables) but writes that state outside any lock (RootUserEmail, SMTPFrom; e.g. `RootUserEmail` in `notifyRootUser` at line 22). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — monitor/channel.go:22
Package `openai` is written on every request (`getTokenEncoder` is reached per request from the Gin handler `controller.RelayTextHelper`, and every request's goroutine sees the same package variables) but writes that state outside any lock (tokenEncoderMap; e.g. `tokenEncoderMap` in `getTokenEncoder` at line 63). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process. — REDACTED:63
What to do
Go: guard the state handlers share with a sync.Mutex held for the whole update (`mu.Lock(); defer mu.Unlock()`), make counters sync/atomic types (atomic.Int64) and caches a sync.Map, or keep per-request data in locals and the request context. `go test -race` over a handler test confirms the race and then its fix.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.
Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule), on a type that also offers no static Create/Of/From/New factory. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.
Do you agree with this assessment?
DM4 · Rich vs anemic model4.2 / 10Weak✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
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.
`Ability` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — model/ability.go:14
`Channel` is an aggregate/entity with 20 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — model/channel.go:20
`LogStatistic` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — model/log.go:216
`Redemption` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — model/redemption.go:20
`Token` is an aggregate/entity with 13 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — model/token.go:23
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
`Redemption` exposes publicly writable state (Id, UserId, Key, Status, Name, Quota, and 3 more). — model/redemption.go:20
`Token` exposes publicly writable state (Id, UserId, Key, Status, Name, CreatedTime, and 7 more). — model/token.go:23
`User` exposes publicly writable state (Id, Username, Password, DisplayName, Role, Status, and 13 more). — model/user.go:34
What to do
Make entity setters private/init-only and hand collections out as IReadOnlyList/IReadOnlyCollection over a private backing field; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.
Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
`onSelect` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — web/air/src/components/HeaderBar.js:109
`onCopy` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — web/air/src/components/TokensTable.js:316
`onOpenLink` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — web/air/src/components/TokensTable.js:368, web/default/src/components/TokensTable.js:171
`handleKeywordChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×4) — web/air/src/components/TokensTable.js:487, web/air/src/components/UsersTable.js:259, web/default/src/components/TokensTable.js:275, …
`handleSearchTokenChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — web/air/src/components/TokensTable.js:491
`onSelect` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — web/air/src/components/TokensTable.js:520
`onSelectAll` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — web/air/src/components/TokensTable.js:522
`handleLogout` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — web/berry/src/layout/MainLayout/Header/ProfileSection/index.js:42
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
README.en.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.en.md:253
README.en.md documents the environment variable `GLOBAL_WEL_RATE_LIMIT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.en.md:266
README.en.md documents the environment variable `DATA_GYM_CACHE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.en.md:269
README.ja.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.ja.md:252
README.md documents the environment variable `OPENAI_API_BASE_URL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:259
README.md documents the environment variable `OPENAI_API_KEY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:259
README.md documents the environment variable `SQL_CONN_MAX_LIFETIME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:376
README.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:386
README.md documents the environment variable `DATA_GYM_CACHE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — README.md:402
web/berry/README.md links to `minimal-ui-kit`, but `web/berry/minimal-ui-kit` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — web/berry/README.md:10
What to do
Reconcile the README with reality: README.en.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it; README.en.md documents the environment variable `GLOBAL_WEL_RATE_LIMIT`, but no code, script or configuration file names it; README.en.md documents the environment variable `DATA_GYM_CACHE_DIR`, but no code, script or configuration file names it; README.ja.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it; README.md documents the environment variable `OPENAI_API_BASE_URL`, but no code, script or configuration file names it.
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.
No static application security testing detected. For this repository's stack, add gosec / govulncheck (or golangci-lint) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8359 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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.
`http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×2) — REDACTED:64, REDACTED:175
`http.Post(` 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. — common/message/message-pusher.go:39
`http.PostForm(` 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. — middleware/turnstile-check.go:35
`http.Client{` 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. — REDACTED:83
What to do
Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
Do you agree with this assessment?
P8 · Schema migrations3.0 / 10Weak✓ Tool-verified
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.
GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment. (×9) — model/main.go:139, model/main.go:142, model/main.go:145, …
What to do
Replace GORM AutoMigrate with a versioned migration tool such as golang-migrate, goose or Atlas so the production schema can evolve safely and reproducibly.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 24 use(s) across 21,605 production line(s) (~1.1/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Go: on hot paths, reuse buffers and objects through sync.Pool, preallocate slices and maps with make([]T, 0, n) / make(map[K]V, n), size builders with Grow, append with strconv.Append*, and reslice with buf[:0] instead of allocating anew.
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.
Do you agree with this assessment?
R1 · Type Safety0.0 / 10Critical✓ 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.
0 typed · 242 plain JS — the untyped files are web/air/src/App.js, web/air/src/components/ChannelsTable.js, web/air/src/components/Footer.js, web/air/src/components/GitHubOAuth.js, web/air/src/components/HeaderBar.js, web/air/src/components/Loading.js (+236 more).
What to do
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
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.
81 duplicated blocks under web/ have copies in at least two of the sibling directories air, berry, default — 69 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 81 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 81 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 81 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — web/air/src/components/OtherSetting.js:22
38 duplicated blocks under web/berry/src/views/ have copies in at least two of the sibling directories About, Authentication, Channel, Dashboard, Home, Log (+5 more sibling(s) not listed) — 30 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — web/berry/src/views/Redemption/index.js:23
11 duplicated blocks under web/default/src/pages/ have copies in at least two of the sibling directories About, Channel, Home, Log, Redemption, Token (+1 more sibling(s) not listed) — 8 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 11 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — web/default/src/pages/Channel/EditChannel.js:210
web/air/src/components/RedemptionsTable.js:47 · web/air/src/components/TokensTable.js:96 — the two spans are one implementation copied and then locally edited — 1377 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/air/src/components/RedemptionsTable.js:47
web/air/src/components/OtherSetting.js:22 · web/default/src/components/OtherSetting.js:32 — the two spans are one implementation copied and then locally edited — 936 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/air/src/components/OtherSetting.js:22
web/air/src/App.js:27 · web/default/src/App.js:30 — the two spans are one implementation copied and then locally edited — 582 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/air/src/App.js:27
web/air/src/components/TokensTable.js:198 · web/air/src/components/UsersTable.js:113 — the two spans are one implementation copied and then locally edited — 981 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/air/src/components/TokensTable.js:198
web/berry/src/views/Redemption/index.js:23 · web/berry/src/views/User/index.js:23 — the two spans are one implementation copied and then locally edited — 929 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/berry/src/views/Redemption/index.js:23
REDACTED:6 · REDACTED:6 — the two spans are one implementation copied and then locally edited — 860 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. — REDACTED:6
web/berry/src/views/Token/component/EditModal.js:55 · web/berry/src/views/User/component/EditModal.js:57 — the two spans are one implementation copied and then locally edited — 813 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/berry/src/views/Token/component/EditModal.js:55
web/berry/src/views/Redemption/component/EditModal.js:37 · web/berry/src/views/User/component/EditModal.js:55 — the two spans are one implementation copied and then locally edited — 792 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/berry/src/views/Redemption/component/EditModal.js:37
web/air/src/components/RedemptionsTable.js:125 · web/air/src/components/UsersTable.js:105 — the two spans are one implementation copied and then locally edited — 866 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/air/src/components/RedemptionsTable.js:125
REDACTED:51 · REDACTED:46 — the two spans are one implementation copied and then locally edited — 673 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. — REDACTED:51
web/air/src/components/SystemSetting.js:101 · web/default/src/components/SystemSetting.js:117 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/air/src/components/SystemSetting.js:101
web/default/src/components/LoginForm.js:21 · REDACTED:17 — the two spans are one implementation copied and then locally edited — 490 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/default/src/components/LoginForm.js:21
web/air/src/components/ChannelsTable.js:185 · web/air/src/components/TokensTable.js:199 — the two spans are one implementation copied and then locally edited — 548 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/air/src/components/ChannelsTable.js:185
web/air/src/components/TokensTable.js:286 · web/default/src/components/TokensTable.js:92 — the two spans are one implementation copied and then locally edited — 500 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/air/src/components/TokensTable.js:286
web/air/src/components/OperationSetting.js:28 · web/default/src/components/OperationSetting.js:36 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/air/src/components/OperationSetting.js:28
web/berry/src/views/Authentication/AuthForms/AuthLogin.js:226 · web/berry/src/views/Authentication/AuthForms/AuthRegister.js:133 — the two spans are one implementation copied and then locally edited — 416 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/berry/src/views/Authentication/AuthForms/AuthLogin.js:226
web/default/src/components/OtherSetting.js:16 · web/default/src/components/SystemSetting.js:14 — the two spans are one implementation copied and then locally edited — 482 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/default/src/components/OtherSetting.js:16
web/default/src/components/RedemptionsTable.js:99 · web/default/src/components/TokensTable.js:220 — 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/default/src/components/RedemptionsTable.js:99
web/default/src/components/TokensTable.js:251 · web/default/src/components/UsersTable.js:122 — 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/default/src/components/TokensTable.js:251
web/berry/src/views/Topup/component/TopupCard.js:12 · web/default/src/pages/TopUp/index.js:16 — the two spans are one implementation copied and then locally edited — 311 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/berry/src/views/Topup/component/TopupCard.js:12
web/berry/src/views/Channel/index.js:26 · web/berry/src/views/Redemption/index.js:23 · web/berry/src/views/User/index.js:23 — 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/berry/src/views/Channel/index.js:26
REDACTED:15 · REDACTED:26 — the two spans are one implementation copied and then locally edited — 351 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. — REDACTED:15
web/berry/src/views/Channel/component/TableRow.js:192 · web/berry/src/views/User/component/TableRow.js:125 — the two spans are one implementation copied and then locally edited — 280 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/berry/src/views/Channel/component/TableRow.js:192
web/berry/src/views/Setting/component/SystemSetting.js:133 · web/default/src/components/SystemSetting.js:117 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/berry/src/views/Setting/component/SystemSetting.js:133
web/default/src/components/ChannelsTable.js:616 · web/default/src/components/TokensTable.js:447 — 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/default/src/components/ChannelsTable.js:616
web/air/src/components/GitHubOAuth.js:7 · web/default/src/components/GitHubOAuth.js:7 · web/default/src/components/LarkOAuth.js:7 — the 3 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — web/air/src/components/GitHubOAuth.js:7
web/berry/src/views/Authentication/Auth/ForgetPassword.js:17 · web/berry/src/views/Authentication/Auth/Login.js:15 · web/berry/src/views/Authentication/Auth/ResetPassword.js:15 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — web/berry/src/views/Authentication/Auth/ForgetPassword.js:17
web/berry/src/views/Authentication/Auth/ForgetPassword.js:5 · web/berry/src/views/Authentication/Auth/Register.js:5 · web/berry/src/views/Authentication/Auth/ResetPassword.js:5 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — web/berry/src/views/Authentication/Auth/ForgetPassword.js:5
web/berry/src/views/Authentication/Auth/GitHubOAuth.js:1 · web/berry/src/views/Authentication/Auth/LarkOAuth.js:1 · web/berry/src/views/Authentication/Auth/OidcOAuth.js:1 — these 3 files are line-for-line copies of one another — 50 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — web/berry/src/views/Authentication/Auth/GitHubOAuth.js:1
web/default/src/pages/Dashboard/index.js:244 · web/default/src/pages/Dashboard/index.js:298 · web/default/src/pages/Dashboard/index.js:354 — 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/default/src/pages/Dashboard/index.js:244
web/default/src/pages/Channel/EditChannel.js:210 · web/default/src/pages/Token/EditToken.js:133 — the two spans are one implementation copied and then locally edited — 240 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/default/src/pages/Channel/EditChannel.js:210
web/air/src/components/ChannelsTable.js:523 · web/air/src/components/LogsTable.js:266 — the two spans are one implementation copied and then locally edited — 326 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/air/src/components/ChannelsTable.js:523
web/air/src/pages/Redemption/EditRedemption.js:103 · web/air/src/pages/Token/EditToken.js:199 — the two spans are one implementation copied and then locally edited — 298 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/air/src/pages/Redemption/EditRedemption.js:103
web/default/src/components/LoginForm.js:67 · REDACTED:51 — the two spans are one implementation copied and then locally edited — 253 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/default/src/components/LoginForm.js:67
web/berry/src/views/Channel/index.js:165 · web/berry/src/views/Redemption/index.js:114 · web/berry/src/views/User/index.js:112 — 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/berry/src/views/Channel/index.js:165
web/berry/src/views/Redemption/component/EditModal.js:23 · web/berry/src/views/Token/component/EditModal.js:39 — the two spans are one implementation copied and then locally edited — 309 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/berry/src/views/Redemption/component/EditModal.js:23
web/air/src/components/ChannelsTable.js:317 · web/default/src/components/ChannelsTable.js:155 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — web/air/src/components/ChannelsTable.js:317
What to do
Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).
Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.
web/air/src/components/LoginForm.js:8 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/components/LoginForm.js:8
web/air/src/components/LoginForm.js:9 imports @douyinfe/semi-ui/lib/es/typography/text, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/components/LoginForm.js:9
web/air/src/components/LogsTable.js:7 imports @douyinfe/semi-ui/lib/es/typography/paragraph, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/components/LogsTable.js:7
web/air/src/pages/Channel/EditChannel.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/Channel/EditChannel.js:5
web/air/src/pages/Redemption/EditRedemption.js:6 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/Redemption/EditRedemption.js:6
web/air/src/pages/Token/EditToken.js:18 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/Token/EditToken.js:18
web/air/src/pages/TopUp/index.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/TopUp/index.js:5
web/air/src/pages/TopUp/index.js:6 imports @douyinfe/semi-ui/lib/es/typography/text, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/TopUp/index.js:6
web/air/src/pages/User/AddUser.js:3 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/User/AddUser.js:3
web/air/src/pages/User/EditUser.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — web/air/src/pages/User/EditUser.js:5
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
(anonymous) has cyclomatic complexity 29 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/berry/src/views/Channel/component/EditModal.js:285
EditChannel has cyclomatic complexity 29 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/default/src/pages/Channel/EditChannel.js:30
Breadcrumbs has cyclomatic complexity 28 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/berry/src/ui-component/extended/Breadcrumbs.js:30
Profile has cyclomatic complexity 26 and cognitive complexity 21; 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/berry/src/views/Profile/index.js:41
SystemSetting has cyclomatic complexity 24 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/berry/src/views/Setting/component/SystemSetting.js:26
submit has cyclomatic complexity 23 and cognitive complexity 25; 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/default/src/pages/Channel/EditChannel.js:170
(anonymous) has cyclomatic complexity 23 and cognitive complexity 17; 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/berry/src/views/Authentication/AuthForms/AuthRegister.js:135
submitConfig has cyclomatic complexity 21 and cognitive complexity 36; 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. (×3) — web/air/src/components/OperationSetting.js:83, web/berry/src/views/Setting/component/OperationSetting.js:104, web/default/src/components/OperationSetting.js:97
(anonymous) has cyclomatic complexity 19 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/berry/src/views/User/component/EditModal.js:135
submit has cyclomatic complexity 18 and cognitive complexity 21; 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/air/src/pages/Channel/EditChannel.js:216
submit has cyclomatic complexity 17 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 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/berry/src/views/Channel/component/EditModal.js:154
LoginForm has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/berry/src/views/Authentication/AuthForms/AuthLogin.js:44
(anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — web/berry/src/views/Token/component/EditModal.js:140
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files7.2 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
web/berry/src/views/Setting/component/SystemSetting.js has 889 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/berry/src/views/Setting/component/SystemSetting.js:1
web/default/src/components/ChannelsTable.js has 705 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/default/src/components/ChannelsTable.js:1
web/air/src/components/ChannelsTable.js has 703 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/air/src/components/ChannelsTable.js:1
web/default/src/pages/Channel/EditChannel.js has 681 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/default/src/pages/Channel/EditChannel.js:1
web/default/src/components/SystemSetting.js has 641 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/default/src/components/SystemSetting.js:1
web/air/src/pages/Channel/EditChannel.js has 625 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/air/src/pages/Channel/EditChannel.js:1
REDACTED has 624 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
web/berry/src/views/Channel/component/EditModal.js has 611 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/berry/src/views/Channel/component/EditModal.js:1
web/air/src/components/TokensTable.js has 596 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/air/src/components/TokensTable.js:1
web/default/src/components/LogsTable.js has 586 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/default/src/components/LogsTable.js:1
web/air/src/components/SystemSetting.js has 573 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/air/src/components/SystemSetting.js:1
web/berry/src/views/Setting/component/OperationSetting.js has 542 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/berry/src/views/Setting/component/OperationSetting.js:1
web/default/src/components/TokensTable.js has 511 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/default/src/components/TokensTable.js:1
web/default/src/components/OperationSetting.js has 435 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/default/src/components/OperationSetting.js:1
web/default/src/pages/Dashboard/index.js has 429 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/default/src/pages/Dashboard/index.js:1
web/air/src/components/MjLogsTable.js has 416 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/air/src/components/MjLogsTable.js:1
REDACTED has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.0 / 10Critical✓ 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.
0% of 231 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling6.7 / 10Strong✓ 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.
test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add eslint as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code7.8 / 10Strong✓ 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 3 application, 0 tooling and 0 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 (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/constants/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it (×3) — web/berry/src/constants/ChannelConstants.js, web/berry/src/constants/SnackbarConstants.js, web/berry/src/constants/CommonConstants.js
no import path from any entry point (3 application, 0 tooling, 0 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/berry/src/ui-component/cards/Skeleton/PopularCard.js, web/berry/src/views/Dashboard/component/StatisticalCard.js, web/berry/src/ui-component/cards/CardSecondaryAction.js, …
no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/ui-component/cards/CardSecondaryAction.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — web/berry/src/ui-component/extended/Avatar.js
no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/views/Dashboard/component/StatisticalCard.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — web/berry/src/ui-component/cards/Skeleton/TotalIncomeCard.js
Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/constants/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/constants/index.js in the same commit, or the barrel will import a name that no longer exists. — web/air/src/constants/user.constants.js:1
Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists. (×5) — web/air/src/helpers/auth-header.js:1, REDACTED:9, REDACTED:104, …
Nothing imports this binding — it is safe to review for removal. (×11) — web/air/src/helpers/render.js:4, web/berry/src/serviceWorker.js:118, web/berry/src/store/accountReducer.js:3, …
Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/constants/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/constants/index.js in the same commit, or the barrel will import a name that no longer exists. — web/default/src/constants/user.constants.js:1
Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists. (×3) — web/default/src/helpers/auth-header.js:1, REDACTED:9, REDACTED:126
This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it. (×3) — web/air/src/components/ChannelsTable.js:23, REDACTED:56, web/default/src/components/LogsTable.js:45
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. — web/berry/src/index.js:13
Declared in web/air/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. (×3)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
Other · Security — Only what this repository's own non-C# files could be read for was assessed — and because this repository commits the configuration that serves its own HTTP surface, that configuration could be read in full for the security response headers it sets. Nothing else in this dimension was assessed: the transport, cookie, input-validation and crypto controls are read from a source model that was not loaded for this repository’s language, so their absence here is not a finding about this repository.
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.
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 configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — web/air/vercel.json:1
What to do
Set security response headers on the surface this repository serves: an `add_header` directive per header in the nginx/Caddy/Apache config, a `_headers` / `vercel.json` / `netlify.toml` entry for a static host, or `helmet()` in the HTTP server. `Content-Security-Policy` is the one that pays for itself first — it is what contains an injected script once one reaches the page — followed by `X-Content-Type-Options: nosniff` and a frame policy (`X-Frame-Options: DENY`, or CSP `frame-ancestors`). Where the app is served from a build container, the header configuration belongs in the image beside the built assets, so it ships with them rather than depending on where it lands.
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
Do you agree with this assessment?
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.
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.
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.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or 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 5/17 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) 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.
`GetImageFromUrl` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:50
`SendMessage` calls `http.Post(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — common/message/message-pusher.go:25
`SendEmail` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:21
`GetResponseBody` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — controller/channel-billing.go:129
`getWeChatIdByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — controller/auth/wechat.go:25
`getOidcUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — controller/auth/oidc.go:38
`getLarkUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — controller/auth/lark.go:30
`getGitHubUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — controller/auth/github.go:34
`asyncTask` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:71
`getImageData` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — REDACTED:174
`getBaiduAccessTokenHelper` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`. — relay/adaptor/baidu/main.go:280
`fetchDashboardData` awaits `axios.get(…)` 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: `axios.get(url, { signal })`. — web/default/src/pages/Dashboard/index.js:69
What to do
Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
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.
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.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped1.6 / 10Critical✓ Tool-verified
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.
`footer` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — web/air/src/components/Footer.js:36, web/default/src/components/Footer.js:37
`updateData.content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — web/air/src/components/OtherSetting.js:207, web/berry/src/views/Setting/component/OtherSetting.js:292, web/default/src/components/OtherSetting.js:235
`htmlContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — REDACTED:7, REDACTED:17, REDACTED:7
`about` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — web/air/src/pages/About/index.js:49, web/berry/src/views/About/index.js:58, web/default/src/pages/About/index.js:62
`homePageContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×3) — web/air/src/pages/Home/index.js:121, web/berry/src/views/Home/index.js:61, web/default/src/pages/Home/index.js:290
`siteInfo.footer_html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — web/berry/src/ui-component/Footer.js:15
`channel.tip` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:118
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
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.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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.
`if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×7) — common/env/helper.go:20, common/env/helper.go:31, common/helper/helper.go:150, …
`if openAIErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — monitor/manage.go:53
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
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.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 8 of 55 WCAG 2.2 Level A/AA success criteria (15%; ≈16% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 47 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 5 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.
P12 CI test-gate honesty — 2 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X10 Duplicated predicate — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 46 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC2 Forms & labels — No form control/button found in the parsed markup — AC2 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
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 18 — an image could not be pulled) — redis Pulling db Pulling one-api Pulling redis Error Get "https://registry-1.docker.io/v2/": Forbidden db Error Get "https://registry-1.docker.io/v2/": Forbidden one-api Error context canceled Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the earlier `compose pull` step reported: redis Pulling db Pulling one-api Pulling one-api Error Get "https://registry-1.docker.io/v2/": Forbidden db Error Get "https://registry-1.docker.io/v2/": Forbidden redis Error Get "https://registry-1.docker.io/v2/": Forbidden Error response from daemon: Get "https://registry-1.docker.io/v2/": Forbidden; the runtime sandbox reaches registries only through the in-fence pull-through mirror, so an image the mirror does not carry cannot be fetched — this is a limit of our sandbox, not of your stack; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~539 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
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.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Aggregate roots were found in only one source directory (model), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.go), 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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM10 One transaction, one aggregate — no repository writes detected — no operation to judge against the one-aggregate rule
DM12 Ambient inputs in the domain — no domain-layer types detected — ambient-input check not applicable
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM6 Domain ↔ infrastructure boundary — no domain-layer types detected — domain↔infrastructure boundary check not applicable
DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
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
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) 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 tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, 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.
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
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.
X27 Collection changed while being enumerated — 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — Not applicable: this check asks whether the null-typed discipline a language offers is switched on, and how much of that the assertion operator takes back, and in this repository's languages there is no such switch and no such operator. Go's type system has no nullable and non-nullable types — every pointer, map, slice and interface is nil-able at every position, there is no switch that turns null checking on, and the compiler produces no nullability warning for an operator to silence. Plain JavaScript carries no type annotations and commits no tsconfig, so it states no null-typed discipline for this check to grade: there is nothing here that switches null checking on or off, and TypeScript (or `// @ts-check`) is how a repository acquires one — advice, not a defect this card measures. 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.
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.
Boundary-crossing change coupling: constants.go ↔ option.go common/constants.go:1— `common/constants.go` (context common) and `model/option.go` (context model) sit in DIFFERENT parts of the tree yet change together 63% of the time (19 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `a3f80a33` feat: enable channel when test succeed (#771); `3fca6ff5` feat: support email domain whitelist (#337); `35cfebee` feat: retry on failed (close #112) — run `git show` on any of them.
FunctionTooLong: SystemSetting.SystemSetting web/berry/src/views/Setting/component/SystemSetting.js:26— FunctionTooLong — SystemSetting runs 793 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 693 over it, 7.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: SystemSetting.SystemSetting web/default/src/components/SystemSetting.js:14— FunctionTooLong — SystemSetting runs 542 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 442 over it, 5.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ChannelsTable.ChannelsTable web/default/src/components/ChannelsTable.js:80— FunctionTooLong — ChannelsTable runs 537 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 437 over it, 5.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: PersonalSetting.PersonalSetting REDACTED:25— FunctionTooLong — PersonalSetting runs 516 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 416 over it, 5.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: EditChannel.EditChannel web/air/src/pages/Channel/EditChannel.js:30— FunctionTooLong — EditChannel runs 510 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 410 over it, 5.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: SystemSetting.SystemSetting web/air/src/components/SystemSetting.js:5— FunctionTooLong — SystemSetting runs 505 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 405 over it, 5.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: ChannelsTable.ChannelsTable web/air/src/components/ChannelsTable.js:44— FunctionTooLong — ChannelsTable runs 503 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 403 over it, 5.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: OperationSetting.OperationSetting web/berry/src/views/Setting/component/OperationSetting.js:21— FunctionTooLong — OperationSetting runs 466 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 366 over it, 4.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: EditModal.EditModal web/berry/src/views/Channel/component/EditModal.js:71— FunctionTooLong — EditModal runs 449 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 349 over it, 4.49× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: TokensTable.TokensTable web/air/src/components/TokensTable.js:51— FunctionTooLong — TokensTable runs 410 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 310 over it, 4.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: LogsTable.LogsTable web/default/src/components/LogsTable.js:132— FunctionTooLong — LogsTable runs 402 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 302 over it, 4.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: TokensTable.TokensTable web/default/src/components/TokensTable.js:64— FunctionTooLong — TokensTable runs 387 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 287 over it, 3.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: OperationSetting.OperationSetting web/default/src/components/OperationSetting.js:12— FunctionTooLong — OperationSetting runs 370 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 270 over it, 3.70× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: OperationSetting.OperationSetting web/air/src/components/OperationSetting.js:5— FunctionTooLong — OperationSetting runs 341 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 241 over it, 3.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: PersonalSetting.PersonalSetting REDACTED:25— FunctionTooLong — PersonalSetting runs 331 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 231 over it, 3.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: UsersTable.UsersTable web/default/src/components/UsersTable.js:38— FunctionTooLong — UsersTable runs 307 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 207 over it, 3.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: RedemptionsTable.RedemptionsTable web/default/src/components/RedemptionsTable.js:58— FunctionTooLong — RedemptionsTable runs 260 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 160 over it, 2.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: index.Home web/default/src/pages/Home/index.js:10— FunctionTooLong — Home runs 258 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 158 over it, 2.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: LogsTable.LogsTable web/air/src/components/LogsTable.js:57— FunctionTooLong — LogsTable runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: UsersTable.UsersTable web/air/src/components/UsersTable.js:22— FunctionTooLong — UsersTable runs 251 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 151 over it, 2.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: OtherSetting.OtherSetting web/berry/src/views/Setting/component/OtherSetting.js:22— FunctionTooLong — OtherSetting runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: EditToken.EditToken web/air/src/pages/Token/EditToken.js:21— FunctionTooLong — EditToken runs 247 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 147 over it, 2.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: MjLogsTable.LogsTable web/air/src/components/MjLogsTable.js:101— FunctionTooLong — LogsTable runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: RedemptionsTable.RedemptionsTable web/air/src/components/RedemptionsTable.js:30— FunctionTooLong — RedemptionsTable runs 242 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 142 over it, 2.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: index.Detail web/air/src/pages/Detail/index.js:13— FunctionTooLong — Detail runs 241 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 141 over it, 2.41× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Hotspot: web/default/src/components/ChannelsTable.js web/default/src/components/ChannelsTable.js:80— web/default/src/components/ChannelsTable.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in ChannelsTable.ChannelsTable at line 80. 1 of those changes was a fix/bug commit, and the other 12 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/ChannelsTable.js`: 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: relay/billing/ratio/model.go relay/billing/ratio/model.go:725— relay/billing/ratio/model.go changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in ratio.GetCompletionRatio at line 725. 2 of those changes were fix/bug commits, and the other 12 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- relay/billing/ratio/model.go`: 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/default/src/pages/Channel/EditChannel.js web/default/src/pages/Channel/EditChannel.js:30— web/default/src/pages/Channel/EditChannel.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in EditChannel.EditChannel at line 30. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/pages/Channel/EditChannel.js`: 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/default/src/components/LogsTable.js web/default/src/components/LogsTable.js:132— web/default/src/components/LogsTable.js changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in LogsTable.LogsTable at line 132. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/LogsTable.js`: 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/default/src/components/TokensTable.js web/default/src/components/TokensTable.js:64— web/default/src/components/TokensTable.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in TokensTable.TokensTable at line 64. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/TokensTable.js`: 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/default/src/components/RedemptionsTable.js web/default/src/components/RedemptionsTable.js:58— web/default/src/components/RedemptionsTable.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in RedemptionsTable.RedemptionsTable at line 58. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/RedemptionsTable.js`: 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/default/src/pages/Home/index.js web/default/src/pages/Home/index.js:10— web/default/src/pages/Home/index.js changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in index.Home at line 10. 1 of those changes was a fix/bug commit, and the other 6 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/pages/Home/index.js`: 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/default/src/pages/Token/EditToken.js web/default/src/pages/Token/EditToken.js:21— web/default/src/pages/Token/EditToken.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in EditToken.EditToken at line 21. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/pages/Token/EditToken.js`: 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/default/src/components/UsersTable.js web/default/src/components/UsersTable.js:38— web/default/src/components/UsersTable.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in UsersTable.UsersTable at line 38. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/UsersTable.js`: 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/default/src/components/SystemSetting.js web/default/src/components/SystemSetting.js:14— web/default/src/components/SystemSetting.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in SystemSetting.SystemSetting at line 14. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/SystemSetting.js`: 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:17— REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in RegisterForm.RegisterForm at line 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +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: relay/adaptor/openai/compatible.go relay/adaptor/openai/compatible.go:46— relay/adaptor/openai/compatible.go changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in openai.GetCompatibleChannelMeta at line 46. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- relay/adaptor/openai/compatible.go`: 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/default/src/components/LoginForm.js web/default/src/components/LoginForm.js:21— web/default/src/components/LoginForm.js changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in LoginForm.LoginForm at line 21. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/LoginForm.js`: 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:106— REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in controller.RelayImageHelper at line 106. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +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/default/src/components/OperationSetting.js web/default/src/components/OperationSetting.js:12— web/default/src/components/OperationSetting.js changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in OperationSetting.OperationSetting at line 12. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/components/OperationSetting.js`: 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: controller/channel-billing.go controller/channel-billing.go:311— controller/channel-billing.go changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in controller.updateChannelBalance at line 311. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- controller/channel-billing.go`: 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:25— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in PersonalSetting.PersonalSetting at line 25. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +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/default/src/App.js web/default/src/App.js:33— web/default/src/App.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in App.App at line 33. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- web/default/src/App.js`: 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:21— REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in message.SendEmail at line 21. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +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: monitor/manage.go monitor/manage.go:11— monitor/manage.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in monitor.ShouldDisableChannel at line 11. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- monitor/manage.go`: 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: relay/adaptor/gemini/main.go relay/adaptor/gemini/main.go:38— relay/adaptor/gemini/main.go changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in gemini.ConvertRequest at line 38. 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 2024-11-23..2025-02-21, the 90 days ending at the analysed commit. Reproduce with `git log --since='2024-11-23 19:30:16 +08:00' --until='2025-02-21 19:30:16 +08:00' --full-history --no-merges -- relay/adaptor/gemini/main.go`: 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.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×16
Untrusted text written into markup unescaped web/air/src/components/Footer.js:36— `footer` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/air/src/components/OtherSetting.js:207— `updateData.content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:7— `htmlContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/air/src/pages/About/index.js:49— `about` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/air/src/pages/Home/index.js:121— `homePageContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/berry/src/ui-component/Footer.js:15— `siteInfo.footer_html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:17— `htmlContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/berry/src/views/About/index.js:58— `about` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/berry/src/views/Home/index.js:61— `homePageContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/berry/src/views/Setting/component/OtherSetting.js:292— `updateData.content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/default/src/components/Footer.js:37— `footer` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/default/src/components/OtherSetting.js:235— `updateData.content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:118— `channel.tip` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:7— `htmlContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/default/src/pages/About/index.js:62— `about` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped web/default/src/pages/Home/index.js:290— `homePageContent` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
ClassTooLong: SystemSetting web/berry/src/views/Setting/component/SystemSetting.js:1— ClassTooLong — 793 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 393 over it, 1.98× 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: EditChannel web/default/src/pages/Channel/EditChannel.js:1— ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 174 over it, 1.44× 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: SystemSetting web/default/src/components/SystemSetting.js:1— ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 142 over it, 1.36× 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: ChannelsTable web/default/src/components/ChannelsTable.js:1— ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 137 over it, 1.34× 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: PersonalSetting REDACTED:1— ClassTooLong — 516 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 116 over it, 1.29× 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: EditChannel web/air/src/pages/Channel/EditChannel.js:1— ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 110 over it, 1.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SystemSetting web/air/src/components/SystemSetting.js:1— ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 105 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChannelsTable web/air/src/components/ChannelsTable.js:1— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: OperationSetting web/berry/src/views/Setting/component/OperationSetting.js:1— ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EditModal web/berry/src/views/Channel/component/EditModal.js:1— ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 49 over it, 1.12× 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: TokensTable web/air/src/components/TokensTable.js:1— ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 10 over it, 1.03× 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: LogsTable web/default/src/components/LogsTable.js:1— ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 2 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: component/SystemSetting.js web/berry/src/views/Setting/component/SystemSetting.js— FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: SystemSetting (26-908). The bar is 500 significant lines; this is 318 over it, 1.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/ChannelsTable.js web/default/src/components/ChannelsTable.js— FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 90% of them inside a single declaration: ChannelsTable (80-733). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Channel/EditChannel.js web/default/src/pages/Channel/EditChannel.js— FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: EditChannel (30-696). The bar is 500 significant lines; this is 98 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: controller/user.go controller/user.go— FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 81 over it, 1.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: components/SystemSetting.js web/default/src/components/SystemSetting.js— FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: SystemSetting (14-661). The bar is 500 significant lines; this is 55 over it, 1.11× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: REDACTED REDACTED— FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PersonalSetting (25-651). The bar is 500 significant lines; this is 40 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/ChannelsTable.js web/air/src/components/ChannelsTable.js— FileTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ChannelsTable (44-736). The bar is 500 significant lines; this is 37 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: Channel/EditChannel.js web/air/src/pages/Channel/EditChannel.js— FileTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: EditChannel (30-640). The bar is 500 significant lines; this is 33 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: component/EditModal.js web/berry/src/views/Channel/component/EditModal.js— FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: EditModal (71-632). The bar is 500 significant lines; this is 14 over it, 1.03× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/SystemSetting.js web/air/src/components/SystemSetting.js— FileTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SystemSetting (5-588). The bar is 500 significant lines; this is 9 over it, 1.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: components/LogsTable.js web/default/src/components/LogsTable.js— FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 79% of them inside a single declaration: LogsTable (132-611). The bar is 500 significant lines; this is 8 over it, 1.02× 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.
X2 · Cancellation propagation· Function without context.Context · ×11
Function without context.Context: GetImageFromUrl REDACTED:50— `GetImageFromUrl` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: SendMessage common/message/message-pusher.go:25— `SendMessage` calls `http.Post(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: SendEmail REDACTED:21— `SendEmail` calls `net.Dial(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: GetResponseBody controller/channel-billing.go:129— `GetResponseBody` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getWeChatIdByCode controller/auth/wechat.go:25— `getWeChatIdByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getOidcUserInfoByCode controller/auth/oidc.go:38— `getOidcUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getLarkUserInfoByCode controller/auth/lark.go:30— `getLarkUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getGitHubUserInfoByCode controller/auth/github.go:34— `getGitHubUserInfoByCode` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: asyncTask REDACTED:71— `asyncTask` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getImageData REDACTED:174— `getImageData` calls `http.Get(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Function without context.Context: getBaiduAccessTokenHelper relay/adaptor/baidu/main.go:280— `getBaiduAccessTokenHelper` calls `http.NewRequest(…)` but takes no context.Context and reaches none its caller controls, so its caller cannot cancel the request once it has started. Take `ctx context.Context` as the first parameter and build the request with it: `http.NewRequestWithContext(ctx, …)`, `(&net.Dialer{}).DialContext(ctx, …)`.
Low cohesion: User (LCOM4 6) model/user.go:34— User's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 6) relay/adaptor/openai/adaptor.go:25— Adaptor's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Channel (LCOM4 5) model/channel.go:20— Channel's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 5) relay/adaptor/ali/adaptor.go:17— Adaptor's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 5) relay/adaptor/replicate/adaptor.go:21— Adaptor's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Token (LCOM4 4) model/token.go:23— Token's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 4) relay/adaptor/aiproxy/adaptor.go:14— Adaptor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 4) relay/adaptor/cloudflare/adaptor.go:17— Adaptor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 4) relay/adaptor/coze/adaptor.go:15— Adaptor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Adaptor (LCOM4 4) relay/adaptor/xunfei/adaptor.go:15— Adaptor's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Boundary violation [package:third-party-deep-import] web/air/src/components/LoginForm.js:8— web/air/src/components/LoginForm.js:8 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/components/LoginForm.js:9— web/air/src/components/LoginForm.js:9 imports @douyinfe/semi-ui/lib/es/typography/text, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/components/LogsTable.js:7— web/air/src/components/LogsTable.js:7 imports @douyinfe/semi-ui/lib/es/typography/paragraph, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/Channel/EditChannel.js:5— web/air/src/pages/Channel/EditChannel.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/Redemption/EditRedemption.js:6— web/air/src/pages/Redemption/EditRedemption.js:6 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/Token/EditToken.js:18— web/air/src/pages/Token/EditToken.js:18 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/TopUp/index.js:5— web/air/src/pages/TopUp/index.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/TopUp/index.js:6— web/air/src/pages/TopUp/index.js:6 imports @douyinfe/semi-ui/lib/es/typography/text, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/User/AddUser.js:3— web/air/src/pages/User/AddUser.js:3 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Boundary violation [package:third-party-deep-import] web/air/src/pages/User/EditUser.js:5— web/air/src/pages/User/EditUser.js:5 imports @douyinfe/semi-ui/lib/es/typography/title, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
Fake-async — async method never awaits web/air/src/components/TokensTable.js:316— `onCopy` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/air/src/components/TokensTable.js:368— `onOpenLink` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/air/src/components/TokensTable.js:487— `handleKeywordChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/air/src/components/TokensTable.js:491— `handleSearchTokenChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/air/src/components/UsersTable.js:259— `handleKeywordChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/berry/src/layout/MainLayout/Header/ProfileSection/index.js:42— `handleLogout` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/default/src/components/TokensTable.js:171— `onOpenLink` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/default/src/components/TokensTable.js:275— `handleKeywordChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
Fake-async — async method never awaits web/default/src/components/UsersTable.js:146— `handleKeywordChange` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
P8 · Schema migrations· Schema created by GORM AutoMigrate (no migration path) · ×9
Schema created by GORM AutoMigrate (no migration path) model/main.go:139— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:142— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:145— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:148— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:151— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:154— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:157— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:160— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Schema created by GORM AutoMigrate (no migration path) model/main.go:197— GORM AutoMigrate builds the schema from the model at startup and keeps no migration history, so there is no reviewed, repeatable upgrade path for an existing production database — a renamed column is dropped and re-added rather than migrated. Adopt a versioned migration tool such as golang-migrate, goose or Atlas, so every schema change is a versioned file applied the same way in every environment.
Duplicated block (11 lines × 2) controller/user.go:239— controller/user.go:239-249 | controller/user.go:389-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/user.go:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) relay/adaptor/aiproxy/main.go:179— relay/adaptor/aiproxy/main.go:179-189 | relay/adaptor/tencent/main.go:225-235 — `relay/adaptor/aiproxy/main.go` and `relay/adaptor/tencent/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 43 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aiproxy/main.go:179` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) relay/adaptor/ali/main.go:93— relay/adaptor/ali/main.go:93-103 | relay/adaptor/ali/main.go:246-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) relay/adaptor/anthropic/main.go:295— relay/adaptor/anthropic/main.go:295-305 | relay/adaptor/aws/claude/main.go:167-177 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/anthropic/main.go:295` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) relay/adaptor/gemini/main.go:387— relay/adaptor/gemini/main.go:387-397 | relay/adaptor/palm/palm.go:158-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) relay/adaptor/replicate/image.go:197— relay/adaptor/replicate/image.go:197-207 | relay/adaptor/replicate/image.go:211-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/replicate/image.go:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) relay/adaptor/ollama/main.go:188— relay/adaptor/ollama/main.go:188-198 | relay/adaptor/ollama/main.go:245-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) controller/auth/github.go:125— controller/auth/github.go:125-135 | controller/auth/lark.go:115-125 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Swallowed exception (caught, then discarded) common/env/helper.go:20— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) common/env/helper.go:31— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) common/helper/helper.go:150— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) controller/channel-billing.go:423— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:97— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) monitor/manage.go:50— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) monitor/manage.go:53— `if openAIErr != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) REDACTED:66— `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Duplicated block (13 lines × 2) controller/auth/github.go:228— controller/auth/github.go:228-240 | controller/user.go:196-209 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:228` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) controller/auth/lark.go:99— controller/auth/lark.go:99-111 | controller/auth/lark.go:158-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/lark.go:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) REDACTED:131— REDACTED:131-143 | controller/token.go:174-186 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:131` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) controller/user.go:132— controller/user.go:132-144 | controller/user.go:546-558 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/user.go:132` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) relay/adaptor/aws/llama3/main.go:80— relay/adaptor/aws/llama3/main.go:80-92 | relay/adaptor/aws/llama3/main.go:150-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/llama3/main.go:80` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) relay/adaptor/baidu/adaptor.go:123— relay/adaptor/baidu/adaptor.go:123-135 | relay/adaptor/ollama/adaptor.go:62-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
TodoComment controller/channel-billing.go:418— // TODO: support Azure — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment model/utils.go:55— // TODO: maybe we can combine updates with same key? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment model/main.go:126— // TODO: delete this line when most users have upgraded — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment relay/adaptor/replicate/constant.go:57— // "minimax/video-01", // TODO: implement the adaptor — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment relay/adaptor/replicate/adaptor.go:44— // TODO: support non-stream mode — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Change coupling: constants.go ↔ SystemSetting.js common/constants.go:1— `common/constants.go` and `web/default/src/components/SystemSetting.js` change together 70% of the time (14 of the 20 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 14 shared commits counted here, the most recent 3 are `3fca6ff5` feat: support email domain whitelist (#337) (at that commit the file was still `web/src/components/SystemSetting.js`); `d9764037` feat: able to add chat page link now (close #70) (at that commit the file was still `web/src/components/SystemSetting.js`); `c5837c3b` feat: support aff now (close #75) (at that commit the file was still `web/src/components/SystemSetting.js`) — run `git show` on any of them.
Change coupling: compatible.go ↔ url.go relay/adaptor/openai/compatible.go:1— `relay/adaptor/openai/compatible.go` and `relay/channeltype/url.go` change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `3f421c4f` feat: support Gemini openai compatible api; `53da2091` feat: add AliBailian adaptor and update channel options; `57c1367e` feat: add Xunfei V2 channel support and update related configurations — run `git show` on any of them.
Change coupling: Config.js ↔ EditChannel.js web/berry/src/views/Channel/type/Config.js:1— `web/berry/src/views/Channel/type/Config.js` and `web/default/src/pages/Channel/EditChannel.js` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `cf9b5f0b` feat: support claude and gemini in vertex ai (#1621); `ade19ba4` feat: update default API version for Azure OpenAI (#994); `b33616df` feat: support groq now (close #1087) — run `git show` on any of them.
Change coupling: option.go ↔ OperationSetting.js model/option.go:1— `model/option.go` and `web/default/src/components/OperationSetting.js` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `ea407f00` feat: able to set completion ration now (close #968); `a3f80a33` feat: enable channel when test succeed (#771) (at that commit the file was still `web/src/components/OperationSetting.js`); `35cfebee` feat: retry on failed (close #112) (at that commit the file was still `web/src/components/OperationSetting.js`) — run `git show` on any of them.
Change coupling: EditRedemption.js ↔ EditToken.js web/default/src/pages/Redemption/EditRedemption.js:1— `web/default/src/pages/Redemption/EditRedemption.js` and `web/default/src/pages/Token/EditToken.js` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `ae20aea5` feat: i18n support; `3d297132` chore: update default theme style; `6536a7be` fix: do not show dollar balance if not enabled (at that commit the files were still `web/src/pages/Redemption/EditRedemption.js` and `web/src/pages/Token/EditToken.js`) — run `git show` on any of them.
Duplicated block (9 lines × 2) controller/user.go:129— controller/user.go:129-137 | controller/user.go:433-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) relay/adaptor/aws/claude/main.go:73— relay/adaptor/aws/claude/main.go:73-81 | relay/adaptor/aws/llama3/main.go:89-97 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) relay/adaptor/aws/claude/main.go:144— relay/adaptor/aws/claude/main.go:144-152 | relay/adaptor/aws/llama3/main.go:173-181 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:144` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) relay/adaptor/gemini/adaptor.go:81— relay/adaptor/gemini/adaptor.go:81-89 | relay/adaptor/tencent/adaptor.go:84-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/gemini/adaptor.go:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) model/redemption.go:44— model/redemption.go:44-52 | model/token.go:116-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Outbound HTTP without resilience REDACTED:64— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience common/message/message-pusher.go:39— `http.Post(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience middleware/turnstile-check.go:35— `http.PostForm(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:83— `http.Client{` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Outbound HTTP without resilience REDACTED:175— `http.Get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Change-coupling hub: channel.constants.js → adaptor.go, compatible.go, define.go, url.go web/default/src/constants/channel.constants.js— `web/default/src/constants/channel.constants.js` changes together with 4 other files — `relay/adaptor/openai/adaptor.go`, `relay/adaptor/openai/compatible.go`, `relay/channeltype/define.go`, `relay/channeltype/url.go` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: model.go → adaptor.go, constants.go, adaptor.go, Config.js relay/billing/ratio/model.go— `relay/billing/ratio/model.go` changes together with 4 other files — `relay/adaptor/gemini/adaptor.go`, `relay/adaptor/gemini/constants.go`, `relay/adaptor/zhipu/adaptor.go`, `web/berry/src/views/Channel/type/Config.js` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change-coupling hub: ChannelConstants.js → compatible.go, define.go, Config.js web/berry/src/constants/ChannelConstants.js— `web/berry/src/constants/ChannelConstants.js` changes together with 3 other files — `relay/adaptor/openai/compatible.go`, `relay/channeltype/define.go`, `web/berry/src/views/Channel/type/Config.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: RedemptionsTable.js → TokensTable.js, UsersTable.js, EditRedemption.js web/default/src/components/RedemptionsTable.js— `web/default/src/components/RedemptionsTable.js` changes together with 3 other files — `web/default/src/components/TokensTable.js`, `web/default/src/components/UsersTable.js`, `web/default/src/pages/Redemption/EditRedemption.js` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Duplicated block (12 lines × 2) controller/user.go:372— controller/user.go:372-383 | controller/user.go:436-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/user.go:372` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) relay/adaptor/deepl/main.go:70— relay/adaptor/deepl/main.go:70-81 | relay/adaptor/deepl/main.go:105-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) relay/adaptor/gemini/main.go:361— relay/adaptor/gemini/main.go:361-372 | relay/adaptor/palm/palm.go:132-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) relay/adaptor/replicate/chat.go:22— relay/adaptor/replicate/chat.go:22-33 | relay/adaptor/replicate/image.go:45-56 — before extracting anything, compare `relay/adaptor/replicate/chat.go` and `relay/adaptor/replicate/image.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) controller/auth/github.go:64— controller/auth/github.go:64-70 | controller/auth/lark.go:66-72 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `controller/auth/github.go:73` calls `Close` and `controller/auth/lark.go:75` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) relay/adaptor/aws/adaptor.go:27— relay/adaptor/aws/adaptor.go:27-33 | relay/adaptor/aws/utils/adaptor.go:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) relay/adaptor/aws/claude/main.go:41— relay/adaptor/aws/claude/main.go:41-47 | relay/adaptor/aws/llama3/main.go:35-41 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
Duplicated block (7 lines × 2) relay/billing/ratio/group.go:16— relay/billing/ratio/group.go:16-22 | relay/billing/ratio/model.go:671-677 — 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 (50 lines × 3 locations) web/air/src/components/GitHubOAuth.js:7— web/air/src/components/GitHubOAuth.js:7 · web/default/src/components/GitHubOAuth.js:7 · web/default/src/components/LarkOAuth.js:7 — the 3 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (50 lines × 3 locations) web/berry/src/views/Authentication/Auth/ForgetPassword.js:17— web/berry/src/views/Authentication/Auth/ForgetPassword.js:17 · web/berry/src/views/Authentication/Auth/Login.js:15 · web/berry/src/views/Authentication/Auth/ResetPassword.js:15 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (50 lines × 3 locations) web/berry/src/views/Authentication/Auth/ForgetPassword.js:5— web/berry/src/views/Authentication/Auth/ForgetPassword.js:5 · web/berry/src/views/Authentication/Auth/Register.js:5 · web/berry/src/views/Authentication/Auth/ResetPassword.js:5 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
Duplicated block (50 lines × 3 locations) web/default/src/pages/Dashboard/index.js:244— web/default/src/pages/Dashboard/index.js:244 · web/default/src/pages/Dashboard/index.js:298 · web/default/src/pages/Dashboard/index.js:354 — 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.
OperationSetting.OperationSetting::submitConfig (cyclomatic 21) web/air/src/components/OperationSetting.js:83— OperationSetting.OperationSetting::submitConfig 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.
OperationSetting.OperationSetting::submitConfig (cyclomatic 21) web/berry/src/views/Setting/component/OperationSetting.js:104— OperationSetting.OperationSetting::submitConfig 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.
OperationSetting.OperationSetting::submitConfig (cyclomatic 21) web/default/src/components/OperationSetting.js:97— OperationSetting.OperationSetting::submitConfig 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.
OperationSetting.OperationSetting::submitConfig (cognitive 36) web/air/src/components/OperationSetting.js:83— OperationSetting.OperationSetting::submitConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (35 pts), match/switch 1 (nesting depth added 19). 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.
OperationSetting.OperationSetting::submitConfig (cognitive 36) web/berry/src/views/Setting/component/OperationSetting.js:104— OperationSetting.OperationSetting::submitConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (35 pts), match/switch 1 (nesting depth added 19). 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.
OperationSetting.OperationSetting::submitConfig (cognitive 36) web/default/src/components/OperationSetting.js:97— OperationSetting.OperationSetting::submitConfig has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (35 pts), match/switch 1 (nesting depth added 19). 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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) controller/auth/github.go:85— controller/auth/github.go:85-166 | controller/auth/lark.go:83-155 | controller/auth/oidc.go:91-173 | controller/auth/wechat.go:56-117 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) controller/auth/github.go:168— controller/auth/github.go:168-221 | controller/auth/lark.go:157-203 | controller/auth/oidc.go:175-228 | controller/auth/wechat.go:119-169 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) relay/adaptor/aws/claude/main.go:49— relay/adaptor/aws/claude/main.go:49-100 | relay/adaptor/aws/claude/main.go:102-207 | relay/adaptor/aws/llama3/main.go:72-116 | relay/adaptor/aws/llama3/main.go:141-217 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (20 lines × 2) controller/auth/github.go:102— controller/auth/github.go:102-121 | controller/auth/github.go:169-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) controller/auth/oidc.go:107— controller/auth/oidc.go:107-126 | controller/auth/oidc.go:176-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/oidc.go:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 2) relay/adaptor/aws/claude/main.go:57— relay/adaptor/aws/claude/main.go:57-76 | relay/adaptor/aws/claude/main.go:111-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:57` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) controller/auth/wechat.go:58— controller/auth/wechat.go:58-73 | controller/auth/wechat.go:120-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) controller/user.go:230— controller/user.go:230-245 | controller/user.go:480-495 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (16 lines × 2) relay/adaptor/aiproxy/main.go:101— relay/adaptor/aiproxy/main.go:101-116 | relay/adaptor/ali/main.go:179-194 — `relay/adaptor/aiproxy/main.go` and `relay/adaptor/ali/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 49 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aiproxy/main.go:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) controller/log.go:110— controller/log.go:110-123 | controller/log.go:131-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `controller/log.go:110` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `controller/log.go:108` calls `Query` and `controller/log.go:129` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 2) relay/adaptor/aws/claude/main.go:50— relay/adaptor/aws/claude/main.go:50-63 | relay/adaptor/aws/llama3/main.go:73-86 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) relay/adaptor/aws/claude/main.go:127— relay/adaptor/aws/claude/main.go:127-140 | relay/adaptor/aws/llama3/main.go:159-172 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 3) controller/channel.go:99— controller/channel.go:99-111 | controller/redemption.go:141-153 | controller/user.go:527-539 — before extracting anything, compare `controller/channel.go` and `controller/redemption.go` 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. Read the line range as the matched WINDOW rather than a finished unit: at `controller/channel.go:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) relay/adaptor/aiproxy/main.go:97— relay/adaptor/aiproxy/main.go:97-109 | relay/adaptor/ali/main.go:175-187 | relay/adaptor/anthropic/main.go:253-265 — `relay/adaptor/aiproxy/main.go` and `relay/adaptor/ali/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 49 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aiproxy/main.go:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 3) relay/adaptor/ali/adaptor.go:56— relay/adaptor/ali/adaptor.go:56-68 | relay/adaptor/baidu/adaptor.go:98-110 | relay/adaptor/gemini/adaptor.go:55-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (10 lines × 2) relay/adaptor/ali/main.go:82— relay/adaptor/ali/main.go:82-91 | relay/adaptor/ollama/main.go:177-186 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) model/token.go:173— model/token.go:173-182 | model/user.go:374-383 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) model/token.go:195— model/token.go:195-204 | model/user.go:390-399 — 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.
Complex function submitConfig (cyclomatic 21, cognitive 36) web/air/src/components/OperationSetting.js:83— submitConfig has cyclomatic complexity 21 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function submitConfig (cyclomatic 21, cognitive 36) web/berry/src/views/Setting/component/OperationSetting.js:104— submitConfig has cyclomatic complexity 21 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function submitConfig (cyclomatic 21, cognitive 36) web/default/src/components/OperationSetting.js:97— submitConfig has cyclomatic complexity 21 and cognitive complexity 36; 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.
Stateful package: config monitor/channel.go:22— Package `config` is written on every request (`notifyRootUser` is reached per request from the Gin handler `controller.TestChannels`, and every request's goroutine sees the same package variables) but writes that state outside any lock (RootUserEmail, SMTPFrom; e.g. `RootUserEmail` in `notifyRootUser` at line 22). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
Stateful package: openai REDACTED:63— Package `openai` is written on every request (`getTokenEncoder` is reached per request from the Gin handler `controller.RelayTextHelper`, and every request's goroutine sees the same package variables) but writes that state outside any lock (tokenEncoderMap; e.g. `tokenEncoderMap` in `getTokenEncoder` at line 63). Unsynchronised concurrent writes are a data race in Go: an update is lost or a value tears, and a concurrent map write aborts the process.
LogsTable.LogsTable (cyclomatic 35) web/air/src/components/LogsTable.js:57— LogsTable.LogsTable has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 17 function items inside it that branch (a function literal at line 64, a function literal at line 122, loadLogs, …). 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.
LogsTable.LogsTable (cyclomatic 35) web/default/src/components/LogsTable.js:132— LogsTable.LogsTable has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 8 of the 35 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 513, loadLogs, sortLog, …). 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.
EditModal.EditModal (cyclomatic 26) web/berry/src/views/Token/component/EditModal.js:57— EditModal.EditModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 140, submit, loadToken, …). 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.
EditModal.EditModal (cyclomatic 26) web/berry/src/views/User/component/EditModal.js:59— EditModal.EditModal has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 135, submit, loadUser, …). 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.
EditChannel.EditChannel::submit (cyclomatic 23) web/default/src/pages/Channel/EditChannel.js:170— EditChannel.EditChannel::submit has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (EditChannel.EditChannel) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
EditChannel.EditChannel::submit (cyclomatic 18) web/air/src/pages/Channel/EditChannel.js:216— EditChannel.EditChannel::submit 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.
EditModal.EditModal (cognitive 26) web/berry/src/views/Redemption/component/EditModal.js:41— EditModal.EditModal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, loops 1 (4 pts), ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 4 function items inside it that branch (submit, a function literal at line 104, loadRedemptiond, …). 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.
EditModal.EditModal (cognitive 26) web/berry/src/views/User/component/EditModal.js:59— EditModal.EditModal has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 11, if/else 10 (11 pts), ternaries 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 135, submit, loadUser, …). 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.
EditChannel.EditChannel::submit (cognitive 25) web/default/src/pages/Channel/EditChannel.js:170— EditChannel.EditChannel::submit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
EditChannel.EditChannel::submit (cognitive 20) web/air/src/pages/Channel/EditChannel.js:216— EditChannel.EditChannel::submit 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.
Duplicated block (18 lines × 2) relay/adaptor/aws/claude/main.go:190— relay/adaptor/aws/claude/main.go:190-207 | relay/adaptor/aws/llama3/main.go:200-217 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:190` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) relay/adaptor/baidu/main.go:191— relay/adaptor/baidu/main.go:191-208 | relay/adaptor/baidu/main.go:228-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) model/log.go:164— model/log.go:164-178 | model/log.go:192-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `model/log.go:180` calls `Where` and `model/log.go:207` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) relay/adaptor/aws/claude/main.go:103— relay/adaptor/aws/claude/main.go:103-117 | relay/adaptor/aws/llama3/main.go:142-156 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) model/log.go:106— model/log.go:106-117 | model/log.go:164-175 | model/log.go:192-203 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `model/log.go:177` calls `Where` and `model/log.go:118` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 3) relay/adaptor/anthropic/main.go:340— relay/adaptor/anthropic/main.go:340-351 | relay/adaptor/cohere/main.go:189-200 | relay/adaptor/coze/main.go:167-178 — `relay/adaptor/anthropic/main.go` and `relay/adaptor/cohere/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 68 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 3) controller/auth/github.go:44— controller/auth/github.go:44-54 | controller/auth/lark.go:46-56 | controller/auth/oidc.go:54-64 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) controller/auth/github.go:87— controller/auth/github.go:87-97 | controller/auth/lark.go:85-95 | controller/auth/oidc.go:93-103 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 3) relay/adaptor/replicate/chat.go:54— relay/adaptor/replicate/chat.go:54-63 | relay/adaptor/replicate/image.go:77-86 | relay/adaptor/replicate/image.go:133-142 — before extracting anything, compare `relay/adaptor/replicate/chat.go` and `relay/adaptor/replicate/image.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/replicate/chat.go:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (10 lines × 3) controller/auth/github.go:123— controller/auth/github.go:123-132 | controller/auth/lark.go:113-122 | controller/auth/wechat.go:79-88 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 8) relay/adaptor/aiproxy/main.go:156— relay/adaptor/aiproxy/main.go:156-164 | REDACTED:26-34 | relay/adaptor/baidu/main.go:187-195 | relay/adaptor/baidu/main.go:224-232 | relay/adaptor/gemini/main.go:406-414 | relay/adaptor/tencent/main.go:201-209 | REDACTED:215-223 | REDACTED:252-260 — there are 8 copies across 6 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aiproxy/main.go:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 8) relay/adaptor/ali/main.go:218— relay/adaptor/ali/main.go:218-226 | relay/adaptor/anthropic/main.go:326-334 | relay/adaptor/baidu/main.go:172-180 | relay/adaptor/cloudflare/main.go:71-79 | relay/adaptor/cohere/main.go:174-182 | relay/adaptor/coze/main.go:152-160 | relay/adaptor/ollama/main.go:149-157 | REDACTED:199-207 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 8 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 8 times. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/ali/main.go:218` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `relay/adaptor/cloudflare/main.go:81` calls `ResponseText2Usage` and `REDACTED:209` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) relay/adaptor/ali/main.go:172— relay/adaptor/ali/main.go:172-177 | relay/adaptor/ollama/main.go:105-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/ali/main.go:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) relay/billing/ratio/group.go:24— relay/billing/ratio/group.go:24-29 | relay/billing/ratio/model.go:679-684 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) relay/adaptor/anthropic/adaptor.go:64— relay/adaptor/anthropic/adaptor.go:64-71 | relay/adaptor/cohere/adaptor.go:49-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) relay/adaptor/aws/claude/adapter.go:30— relay/adaptor/aws/claude/adapter.go:30-37 | relay/adaptor/aws/llama3/adapter.go:30-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
IC1 · Incompleteness & stubs· Empty method body · ×2
Empty method body — does nothing with its inputs web/air/src/components/TokensTable.js:520— `onSelect` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
Empty method body — does nothing with its inputs web/air/src/components/TokensTable.js:522— `onSelectAll` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
R10 · Code Duplication· Duplicated block with local edits (46 matched lines × 2 locations) · ×2
Duplicated block with local edits (46 matched lines × 2 locations) web/air/src/pages/Redemption/EditRedemption.js:103— web/air/src/pages/Redemption/EditRedemption.js:103 · web/air/src/pages/Token/EditToken.js:199 — the two spans are one implementation copied and then locally edited — 298 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block with local edits (46 matched lines × 2 locations) web/default/src/components/LoginForm.js:67— web/default/src/components/LoginForm.js:67 · REDACTED:51 — the two spans are one implementation copied and then locally edited — 253 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.
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×1
Animation without a prefers-reduced-motion guard web/default/src/pages/Dashboard/Dashboard.css:14— `.stat-card` moves (`transition: transform 0.2s 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.
SystemSetting.SystemSetting (cyclomatic 52) web/air/src/components/SystemSetting.js:5— SystemSetting.SystemSetting has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 2 of the 52 points are its own statements and the rest belongs to 11 function items inside it that branch (handleInputChange, updateOption, submitSMTP, …). 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.
ChannelsTable (cyclomatic 50) web/air/src/components/ChannelsTable.js:44— ChannelsTable has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 8 of the 50 points are its own statements and the rest belongs to 51 function items inside it that branch (manageChannel, renderResponseTime, searchChannels, …). 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.
PersonalSetting.PersonalSetting (cyclomatic 49) REDACTED:25— PersonalSetting.PersonalSetting has cyclomatic complexity 49 (threshold 15). Of this number, 24 points are the body's own statements and 25 belong to 14 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.
controller.RelayAudioHelper (cyclomatic 43) relay/controller/audio.go:30— controller.RelayAudioHelper has cyclomatic complexity 43 (threshold 15). Of this number, 40 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.
ChannelsTable (cyclomatic 43) web/default/src/components/ChannelsTable.js:80— ChannelsTable has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 5 of the 43 points are its own statements and the rest belongs to 40 function items inside it that branch (manageChannel, renderResponseTime, a function literal at line 521, …). 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.
TokensTable.TokensTable (cyclomatic 41) web/air/src/components/TokensTable.js:51— TokensTable.TokensTable has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 1 of the 41 points is its own statement and the rest belongs to 17 function items inside it that branch (onOpenLink, onCopy, manageToken, …). 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.
ratio.GetCompletionRatio (cyclomatic 38) relay/billing/ratio/model.go:725— ratio.GetCompletionRatio has cyclomatic complexity 38 (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.
AuthRegister.RegisterForm (cyclomatic 37) web/berry/src/views/Authentication/AuthForms/AuthRegister.js:38— AuthRegister.RegisterForm has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 5 of the 37 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 135, handleSendCode, a function literal at line 117, …). 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.
index.Profile (cyclomatic 37) web/berry/src/views/Profile/index.js:41— index.Profile has cyclomatic complexity 37 (threshold 15). Of this number, 26 points are the body's own statements and 11 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Breadcrumbs.Breadcrumbs (cyclomatic 36) web/berry/src/ui-component/extended/Breadcrumbs.js:30— Breadcrumbs.Breadcrumbs has cyclomatic complexity 36 (threshold 15). Of this number, 28 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TokensTable.TokensTable (cyclomatic 35) web/default/src/components/TokensTable.js:64— TokensTable.TokensTable has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 2 of the 35 points are its own statements and the rest belongs to 10 function items inside it that branch (onCopy, onOpenLink, manageToken, …). 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.
EditToken (cyclomatic 31) web/default/src/pages/Token/EditToken.js:21— EditToken has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 4 of the 31 points are its own statements and the rest belongs to 19 function items inside it that branch (loadToken, submit, loadAvailableModels, …). 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.
EditChannel.EditChannel (cyclomatic 29) web/default/src/pages/Channel/EditChannel.js:30— EditChannel.EditChannel has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (EditChannel.EditChannel::submit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
index.TopUp (cyclomatic 27) web/air/src/pages/TopUp/index.js:9— index.TopUp has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 7 function items inside it that branch (onlineTopUp, a function literal at line 139, getAmount, …). 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.
PersonalSetting.PersonalSetting (cyclomatic 27) REDACTED:25— PersonalSetting.PersonalSetting has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (sendVerificationCode, a function literal at line 61, a function literal at line 49, …). 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.
LoginForm (cyclomatic 26) web/berry/src/views/Authentication/AuthForms/AuthLogin.js:44— LoginForm has cyclomatic complexity 26 (threshold 15). Of this number, 14 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.
replicate.ImageHandler (cyclomatic 24) relay/adaptor/replicate/image.go:44— replicate.ImageHandler has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
EditToken.EditToken (cyclomatic 24) web/air/src/pages/Token/EditToken.js:21— EditToken.EditToken has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (submit, loadToken, handleTokenCountChange, …). 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.
SystemSetting.SystemSetting (cyclomatic 24) web/berry/src/views/Setting/component/SystemSetting.js:26— SystemSetting.SystemSetting has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
LoginForm.LoginForm (cyclomatic 23) web/air/src/components/LoginForm.js:15— LoginForm.LoginForm has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSubmit, a function literal at line 32, onSubmitWeChatVerificationCode, …). 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.
RedemptionsTable (cyclomatic 23) web/air/src/components/RedemptionsTable.js:30— RedemptionsTable has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 35 function items inside it that branch (manageRedemption, loadRedemptions, removeRecord, …). 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.
RegisterForm.RegisterForm (cyclomatic 22) REDACTED:17— RegisterForm.RegisterForm has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (handleSubmit, sendVerificationCode, a function literal at line 52, …). 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.
RedemptionsTable (cyclomatic 22) web/default/src/components/RedemptionsTable.js:58— RedemptionsTable has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 21 function items inside it that branch (manageRedemption, a function literal at line 260, loadRedemptions, …). 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.
controller.RelayImageHelper (cyclomatic 21) REDACTED:106— controller.RelayImageHelper has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
UsersTable.UsersTable (cyclomatic 21) web/air/src/components/UsersTable.js:22— UsersTable.UsersTable has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 12 function items inside it that branch (renderSelectedOption, removeRecord, loadUsers, …). 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.
ChannelPage (cyclomatic 21) web/berry/src/views/Channel/index.js:26— ChannelPage has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 18 function items inside it that branch (manageChannel, loadChannels, searchChannels, …). 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.
message.SendEmail (cyclomatic 20) REDACTED:21— message.SendEmail 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.
anthropic.ConvertRequest (cyclomatic 20) relay/adaptor/anthropic/main.go:39— anthropic.ConvertRequest 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.
index.Detail (cyclomatic 20) web/air/src/pages/Detail/index.js:13— index.Detail has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (loadQuotaData, updateChart, initChart, …). 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.
index.Home (cyclomatic 20) web/default/src/pages/Home/index.js:10— index.Home has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
controller.updateChannelBalance (cyclomatic 19) controller/channel-billing.go:311— controller.updateChannelBalance 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.
anthropic.StreamHandler (cyclomatic 19) relay/adaptor/anthropic/main.go:249— anthropic.StreamHandler has cyclomatic complexity 19 (threshold 15). Of this number, 15 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.
MjLogsTable.LogsTable (cyclomatic 19) web/air/src/components/MjLogsTable.js:101— MjLogsTable.LogsTable has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 10 function items inside it that branch (loadLogs, a function literal at line 181, a function literal at line 197, …). 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.
index.NavCollapse (cyclomatic 19) web/berry/src/layout/MainLayout/Sidebar/MenuList/NavCollapse/index.js:19— index.NavCollapse has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EditModal.EditModal (cyclomatic 19) web/berry/src/views/Redemption/component/EditModal.js:41— EditModal.EditModal has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 104, submit, loadRedemptiond, …). 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.
UsersTable.UsersTable (cyclomatic 19) web/default/src/components/UsersTable.js:38— UsersTable.UsersTable has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 250, loadUsers, a function literal at line 83, …). 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.
(anonymous) (cyclomatic 19) web/berry/src/views/User/component/EditModal.js:135— (anonymous) 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.
controller.ManageUser (cyclomatic 18) controller/user.go:597— controller.ManageUser 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.
aws.StreamHandler (cyclomatic 18) relay/adaptor/aws/claude/main.go:102— aws.StreamHandler has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 144). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
openai.StreamHandler (cyclomatic 18) relay/adaptor/openai/main.go:27— openai.StreamHandler 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.
RegisterForm.RegisterForm (cyclomatic 18) REDACTED:7— RegisterForm.RegisterForm has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (handleSubmit, sendVerificationCode, a function literal at line 27). 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.
submit (cyclomatic 18) web/air/src/pages/Channel/EditChannel.js:216— submit 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.
(anonymous) (cyclomatic 18) web/berry/src/views/Token/component/EditModal.js:140— (anonymous) has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 9 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.
controller.UpdateOption (cyclomatic 17) controller/option.go:37— controller.UpdateOption 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.
middleware.TokenAuth (cyclomatic 17) middleware/auth.go:91— middleware.TokenAuth has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 92). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
zhipu.StreamHandler (cyclomatic 17) REDACTED:145— zhipu.StreamHandler has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 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.
EditModal.EditModal::submit (cyclomatic 17) web/berry/src/views/Channel/component/EditModal.js:154— EditModal.EditModal::submit has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
main.main (cyclomatic 16) REDACTED:29— main.main has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
model.PreConsumeTokenQuota (cyclomatic 16) model/token.go:217— model.PreConsumeTokenQuota has cyclomatic complexity 16 (threshold 15). Of this number, 12 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.
gemini.ConvertRequest (cyclomatic 16) relay/adaptor/gemini/main.go:38— gemini.ConvertRequest 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.
replicate.ChatHandler (cyclomatic 16) relay/adaptor/replicate/chat.go:20— replicate.ChatHandler has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
replicate.chatStreamHandler (cyclomatic 16) relay/adaptor/replicate/chat.go:116— replicate.chatStreamHandler 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.
index.Home (cyclomatic 16) web/air/src/pages/Home/index.js:7— index.Home has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
index.NavItem (cyclomatic 16) web/berry/src/layout/MainLayout/Sidebar/MenuList/NavItem/index.js:18— index.NavItem has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EmailModal.EmailModal (cyclomatic 16) REDACTED:29— EmailModal.EmailModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 104, a function literal at line 55, handleSendCode, …). 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.
TableRow.TokensTableRow (cyclomatic 16) web/berry/src/views/Token/component/TableRow.js:56— TableRow.TokensTableRow has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (handleCopy, a function literal at line 175, handleOpenMenu, …). 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.
Users (cyclomatic 16) web/berry/src/views/User/index.js:23— Users has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 15 function items inside it that branch (manageUser, loadUsers, searchUsers, …). 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.
SystemSetting (cognitive 75) web/berry/src/views/Setting/component/SystemSetting.js:26— SystemSetting has cognitive complexity 75 (threshold 15). Drivers by points: boolean chains 35, if/else 33 (35 pts), error handling 1 (2 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). Of this number, 23 points are the body's own statements and 52 belong to 23 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChannelsTable (cognitive 63) web/air/src/components/ChannelsTable.js:44— ChannelsTable has cognitive complexity 63 (threshold 15). Drivers by points: if/else 41 (47 pts), ternaries 8, error handling 3, boolean chains 2, match/switch 2, loops 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 63 points are its own statements and the rest belongs to 51 function items inside it that branch (manageChannel, loadChannels, renderResponseTime, …). 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.
PersonalSetting.PersonalSetting (cognitive 61) REDACTED:25— PersonalSetting.PersonalSetting has cognitive complexity 61 (threshold 15). Drivers by points: if/else 35 (36 pts), boolean chains 14, ternaries 11 (nesting depth added 1). Of this number, 23 points are the body's own statements and 38 belong to 14 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChannelsTable (cognitive 55) web/default/src/components/ChannelsTable.js:80— ChannelsTable has cognitive complexity 55 (threshold 15). Drivers by points: if/else 38 (44 pts), ternaries 7, match/switch 2, boolean chains 1, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 4 of the 55 points are its own statements and the rest belongs to 40 function items inside it that branch (manageChannel, loadChannels, renderResponseTime, …). 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.
Breadcrumbs (cognitive 53) web/berry/src/ui-component/extended/Breadcrumbs.js:30— Breadcrumbs has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 10 (26 pts), boolean chains 15, if/else 8 (12 pts) (nesting depth added 20). Of this number, 42 points are the body's own statements and 11 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.
controller.RelayAudioHelper (cognitive 51) relay/controller/audio.go:30— controller.RelayAudioHelper has cognitive complexity 51 (threshold 15). Drivers by points: if/else 33 (44 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 12). Of this number, 47 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.
replicate.ImageHandler (cognitive 47) relay/adaptor/replicate/image.go:44— replicate.ImageHandler has cognitive complexity 47 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 25). Most of this is not in the body itself: 9 of the 47 points are its own statements and the rest belongs to one function literal inside it that branches (line 64). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
LogsTable (cognitive 47) web/default/src/components/LogsTable.js:132— LogsTable has cognitive complexity 47 (threshold 15). Drivers by points: if/else 25 (30 pts), boolean chains 9, ternaries 8 (nesting depth added 5). Most of this is not in the body itself: 7 of the 47 points are its own statements and the rest belongs to 28 function items inside it that branch (a function literal at line 513, loadLogs, handleEyeClick, …). 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.
TokensTable.TokensTable (cognitive 45) web/air/src/components/TokensTable.js:51— TokensTable.TokensTable has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32 (36 pts), match/switch 4, ternaries 3, boolean chains 1, loops 1 (nesting depth added 4). None of this is in the body itself: all 45 points belong to 17 function items inside it that branch (onOpenLink, manageToken, loadTokens, …). 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.
LogsTable.LogsTable (cognitive 45) web/air/src/components/LogsTable.js:57— LogsTable.LogsTable has cognitive complexity 45 (threshold 15). Drivers by points: if/else 21 (22 pts), ternaries 11 (12 pts), boolean chains 10, loops 1 (nesting depth added 2). Most of this is not in the body itself: 4 of the 45 points are its own statements and the rest belongs to 17 function items inside it that branch (loadLogs, a function literal at line 64, a function literal at line 122, …). 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.
openai.CountTokenMessages (cognitive 43) REDACTED:76— openai.CountTokenMessages has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (33 pts), match/switch 2 (6 pts), loops 2 (4 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.
SystemSetting (cognitive 43) web/default/src/components/SystemSetting.js:14— SystemSetting has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27 (28 pts), boolean chains 12, ternaries 1 (2 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 43 points is its own statement and the rest belongs to 26 function items inside it that branch (updateOption, submitSMTP, handleInputChange, …). 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.
EditToken (cognitive 42) web/default/src/pages/Token/EditToken.js:21— EditToken has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 11, error handling 4 (5 pts), ternaries 3 (nesting depth added 5). Most of this is not in the body itself: 3 of the 42 points are its own statements and the rest belongs to 19 function items inside it that branch (loadToken, submit, loadAvailableModels, …). 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.
index.TopUp (cognitive 41) web/air/src/pages/TopUp/index.js:9— index.TopUp has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25 (32 pts), error handling 3, loops 1 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 7 function items inside it that branch (onlineTopUp, a function literal at line 139, getAmount, …). 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.
SystemSetting (cognitive 40) web/air/src/components/SystemSetting.js:5— SystemSetting has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25 (26 pts), boolean chains 11, ternaries 1 (2 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 22 function items inside it that branch (updateOption, submitSMTP, handleInputChange, …). 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.
TokensTable.TokensTable (cognitive 37) web/default/src/components/TokensTable.js:64— TokensTable.TokensTable has cognitive complexity 37 (threshold 15). Drivers by points: if/else 27 (29 pts), ternaries 5, match/switch 3 (nesting depth added 2). None of this is in the body itself: all 37 points belong to 10 function items inside it that branch (onCopy, manageToken, loadTokens, …). 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.
anthropic.StreamHandler (cognitive 36) relay/adaptor/anthropic/main.go:249— anthropic.StreamHandler has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). Of this number, 32 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
index.Profile (cognitive 36) web/berry/src/views/Profile/index.js:41— index.Profile has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 13, if/else 12 (13 pts), ternaries 8, error handling 2 (nesting depth added 1). Of this number, 21 points are the body's own statements and 15 belong to 6 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
anthropic.ConvertRequest (cognitive 34) relay/adaptor/anthropic/main.go:39— anthropic.ConvertRequest has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 4 (7 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.
message.SendEmail (cognitive 33) REDACTED:21— message.SendEmail has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aws.StreamHandler (cognitive 33) relay/adaptor/aws/claude/main.go:102— aws.StreamHandler has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (30 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 16). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 144). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
zhipu.StreamHandler (cognitive 33) REDACTED:145— zhipu.StreamHandler has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). Of this number, 28 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AuthRegister.RegisterForm (cognitive 33) web/berry/src/views/Authentication/AuthForms/AuthRegister.js:38— AuthRegister.RegisterForm has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, if/else 9 (10 pts), ternaries 8 (nesting depth added 1). Most of this is not in the body itself: 4 of the 33 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 135, a function literal at line 117, handleSendCode, …). 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.
PersonalSetting.PersonalSetting (cognitive 33) REDACTED:25— PersonalSetting.PersonalSetting has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (22 pts), boolean chains 10, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 9 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (sendVerificationCode, a function literal at line 49, a function literal at line 61, …). 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.
openai.StreamHandler (cognitive 32) relay/adaptor/openai/main.go:27— openai.StreamHandler has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (7 pts), boolean chains 2, 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.
LoginForm.LoginForm (cognitive 32) web/air/src/components/LoginForm.js:15— LoginForm.LoginForm has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (19 pts), ternaries 5 (8 pts), boolean chains 5 (nesting depth added 7). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSubmit, a function literal at line 32, onSubmitWeChatVerificationCode, …). 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.
EditModal.EditModal (cognitive 32) web/berry/src/views/Token/component/EditModal.js:57— EditModal.EditModal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 10, ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 140, submit, loadToken, …). 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.
index.Home (cognitive 32) web/default/src/pages/Home/index.js:10— index.Home has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 10 (19 pts), if/else 6 (8 pts), boolean chains 5 (nesting depth added 11). Of this number, 22 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RedemptionsTable (cognitive 31) web/air/src/components/RedemptionsTable.js:30— RedemptionsTable has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24 (27 pts), error handling 1, loops 1, match/switch 1, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 31 points belong to 35 function items inside it that branch (manageRedemption, loadRedemptions, removeRecord, …). 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.
gemini.ConvertRequest (cognitive 30) relay/adaptor/gemini/main.go:38— gemini.ConvertRequest has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 3 (5 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.
ratio.GetCompletionRatio (cognitive 29) relay/billing/ratio/model.go:725— ratio.GetCompletionRatio has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 3, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
replicate.chatStreamHandler (cognitive 28) relay/adaptor/replicate/chat.go:116— replicate.chatStreamHandler has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EditToken.EditToken::submit (cognitive 28) web/air/src/pages/Token/EditToken.js:134— EditToken.EditToken::submit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.Detail (cognitive 28) web/air/src/pages/Detail/index.js:13— index.Detail has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3, ternaries 2 (3 pts), loops 2 (nesting depth added 5). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (loadQuotaData, updateChart, initChart, …). 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.
RedemptionsTable (cognitive 28) web/default/src/components/RedemptionsTable.js:58— RedemptionsTable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (21 pts), ternaries 5, error handling 1, match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 21 function items inside it that branch (manageRedemption, loadRedemptions, a function literal at line 260, …). 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.
submit (cognitive 28) web/air/src/pages/Token/EditToken.js:134— submit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UsersTable.UsersTable (cognitive 27) web/air/src/components/UsersTable.js:22— UsersTable.UsersTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (24 pts), match/switch 2, ternaries 1 (nesting depth added 3). None of this is in the body itself: all 27 points belong to 12 function items inside it that branch (loadUsers, manageUser, removeRecord, …). 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.
RegisterForm (cognitive 27) REDACTED:17— RegisterForm has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 6, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 9 function items inside it that branch (handleSubmit, sendVerificationCode, a function literal at line 40, …). 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.
ChannelPage (cognitive 27) web/berry/src/views/Channel/index.js:26— ChannelPage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (22 pts), ternaries 2, boolean chains 1, error handling 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 27 points are its own statements and the rest belongs to 18 function items inside it that branch (manageChannel, loadChannels, searchChannels, …). 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.
replicate.ChatHandler (cognitive 25) relay/adaptor/replicate/chat.go:20— replicate.ChatHandler has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 41). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
index.Home (cognitive 25) web/air/src/pages/Home/index.js:7— index.Home has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (14 pts), if/else 6 (8 pts), boolean chains 3 (nesting depth added 8). Of this number, 14 points are the body's own statements and 11 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
auth.OidcAuth (cognitive 24) controller/auth/oidc.go:91— auth.OidcAuth has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UsersTable.UsersTable (cognitive 24) web/default/src/components/UsersTable.js:38— UsersTable.UsersTable has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (19 pts), ternaries 4, match/switch 1 (nesting depth added 2). None of this is in the body itself: all 24 points belong to 9 function items inside it that branch (loadUsers, a function literal at line 83, a function literal at line 250, …). 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.
controller.RelayImageHelper (cognitive 23) REDACTED:106— controller.RelayImageHelper has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 2, match/switch 2 (nesting depth added 3). Of this number, 18 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
RegisterForm.RegisterForm (cognitive 23) REDACTED:7— RegisterForm.RegisterForm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function items inside it that branch (handleSubmit, sendVerificationCode, a function literal at line 27). 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.
MjLogsTable.LogsTable (cognitive 23) web/air/src/components/MjLogsTable.js:101— MjLogsTable.LogsTable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (15 pts), ternaries 6, boolean chains 1, loops 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to 10 function items inside it that branch (loadLogs, a function literal at line 181, copyText, …). 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.
LoginForm (cognitive 23) web/berry/src/views/Authentication/AuthForms/AuthLogin.js:44— LoginForm has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, ternaries 7, if/else 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 228, a function literal at line 215, a function literal at line 49, …). 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.
model.PreConsumeTokenQuota (cognitive 22) model/token.go:217— model.PreConsumeTokenQuota has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (nesting depth added 6). Of this number, 12 points are the body's own statements and 10 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.
index.NavCollapse (cognitive 22) web/berry/src/layout/MainLayout/Sidebar/MenuList/NavCollapse/index.js:19— index.NavCollapse has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (13 pts), if/else 5 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 5). Of this number, 13 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EditChannel (cognitive 22) web/default/src/pages/Channel/EditChannel.js:30— EditChannel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 31 (38 pts), boolean chains 27, ternaries 3, error handling 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
model.ValidateUserToken (cognitive 21) model/token.go:62— model.ValidateUserToken has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EditRedemption.EditRedemption (cognitive 21) web/air/src/pages/Redemption/EditRedemption.js:9— EditRedemption.EditRedemption has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3, ternaries 3, loops 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (submit, loadRedemption, a function literal at line 43). 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.
submit (cognitive 21) web/air/src/pages/Channel/EditChannel.js:216— submit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 6, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
helper.GetIp (cognitive 20) common/helper/helper.go:35— helper.GetIp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (18 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.
auth.GitHubOAuth (cognitive 20) controller/auth/github.go:85— auth.GitHubOAuth has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 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.
controller.ManageUser (cognitive 20) controller/user.go:597— controller.ManageUser has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, match/switch 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.
middleware.TokenAuth (cognitive 20) middleware/auth.go:91— middleware.TokenAuth has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5 (nesting depth added 3). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 92). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
middleware.SetupContextForSelectedChannel (cognitive 20) middleware/distributor.go:64— middleware.SetupContextForSelectedChannel has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Header.Header (cognitive 20) web/default/src/components/Header.js:84— Header.Header has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9 (16 pts), if/else 3, boolean chains 1 (nesting depth added 7). 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, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Users (cognitive 20) web/berry/src/views/User/index.js:23— Users has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), ternaries 3 (5 pts), boolean chains 1, error handling 1, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 15 function items inside it that branch (manageUser, loadUsers, searchUsers, …). 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.
auth.LarkOAuth (cognitive 19) controller/auth/lark.go:83— auth.LarkOAuth has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 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.
EditModal.EditModal::submit (cognitive 19) web/berry/src/views/Channel/component/EditModal.js:154— EditModal.EditModal::submit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
LoginForm.LoginForm (cognitive 19) web/default/src/components/LoginForm.js:21— LoginForm.LoginForm has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7 (nesting depth added 3). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (handleSubmit, a function literal at line 36, onSubmitWeChatVerificationCode). 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.
ali.StreamHandler (cognitive 18) relay/adaptor/ali/main.go:171— ali.StreamHandler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 1 (nesting depth added 5). Of this number, 14 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.
anthropic.StreamResponseClaude2OpenAI (cognitive 18) relay/adaptor/anthropic/main.go:149— anthropic.StreamResponseClaude2OpenAI has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, match/switch 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.
openai.countImageTokens (cognitive 18) REDACTED:148— openai.countImageTokens has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, match/switch 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.
Message.ParseContent (cognitive 18) relay/model/message.go:41— Message.ParseContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
index.NavItem (cognitive 18) web/berry/src/layout/MainLayout/Sidebar/MenuList/NavItem/index.js:18— index.NavItem has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 4, boolean chains 3 (nesting depth added 3). Of this number, 16 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
EditRedemption.EditRedemption (cognitive 18) web/default/src/pages/Redemption/EditRedemption.js:8— EditRedemption.EditRedemption has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 3, loops 1 (2 pts), ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (submit, loadRedemption, a function literal at line 41). 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.
App.App (cognitive 18) web/default/src/App.js:33— App.App has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, error handling 1 (nesting depth added 3). None of this is in the body itself: all 18 points belong to 3 function items inside it that branch (loadStatus, a function literal at line 79, loadUser). 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.
Token (cognitive 18) web/berry/src/views/Token/index.js:24— Token has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, error handling 1, match/switch 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 16 function items inside it that branch (loadTokens, manageToken, searchTokens, …). 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.
Redemption (cognitive 18) web/berry/src/views/Redemption/index.js:23— Redemption has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, error handling 1, match/switch 1, ternaries 1 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 15 function items inside it that branch (loadRedemptions, manageRedemptions, searchRedemptions, …). 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.
controller.UpdateOption (cognitive 17) controller/option.go:37— controller.UpdateOption has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
aiproxy.StreamHandler (cognitive 17) relay/adaptor/aiproxy/main.go:92— aiproxy.StreamHandler has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). Of this number, 13 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.
gemini.responseGeminiChat2OpenAI (cognitive 17) relay/adaptor/gemini/main.go:242— gemini.responseGeminiChat2OpenAI has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
xunfei.xunfeiMakeRequest (cognitive 17) relay/adaptor/xunfei/main.go:224— xunfei.xunfeiMakeRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, loops 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 244). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
SiderBar.SiderBar (cognitive 17) web/air/src/components/SiderBar.js:26— SiderBar.SiderBar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6, boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (loadStatus, a function literal at line 37, a function literal at line 150). 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.
(anonymous) (cognitive 17) web/berry/src/views/Token/component/EditModal.js:140— (anonymous) has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 5, ternaries 2. Of this number, 11 points are the body's own statements and 6 belong to 9 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.
main.main (cognitive 16) REDACTED:29— main.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: 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.
model.InitChannelCache (cognitive 16) REDACTED:173— model.InitChannelCache has cognitive complexity 16 (threshold 15). Drivers by points: loops 8 (12 pts), if/else 1 (4 pts) (nesting depth added 7). 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.
ForgetPasswordForm.ForgetPasswordForm (cognitive 16) REDACTED:30— ForgetPasswordForm.ForgetPasswordForm has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 103, submit, a function literal at line 64, …). 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.
TooManyFields: GeneralOpenAIRequest REDACTED:24— TooManyFields — 40 stored fields beside 1 method. The bar is 30 stored fields; this is 10 over it, 1.33× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
D4 · Code Duplication· Members sharing a duplicated core (26 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (26 members, 50+ identical tokens) controller/auth/github.go:223— controller/auth/github.go:223-240 | controller/channel-billing.go:376-407 | controller/channel.go:13-32 | controller/channel.go:34-50 | controller/channel.go:52-75 | controller/channel.go:131-146 | controller/channel.go:148-172 | controller/log.go:12-38 | controller/log.go:40-65 | controller/log.go:67-83 | controller/log.go:85-102 | controller/log.go:146-169 | controller/model.go:188-213 | controller/redemption.go:14-33 | controller/redemption.go:35-51 | controller/redemption.go:53-76 | controller/redemption.go:155-195 | controller/token.go:16-39 | controller/token.go:41-58 | controller/token.go:60-84 | controller/token.go:123-168 | controller/token.go:188-257 | controller/user.go:187-209 | controller/user.go:211-227 | controller/user.go:349-365 | controller/user.go:754-780 — These 26 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 26 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 26 times.
D4 · Code Duplication· Members sharing a duplicated core (18 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (18 members, 50+ identical tokens) relay/adaptor/aiproxy/main.go:153— relay/adaptor/aiproxy/main.go:153-189 | REDACTED:19-69 | relay/adaptor/ali/main.go:81-115 | relay/adaptor/ali/main.go:230-267 | relay/adaptor/anthropic/main.go:338-379 | relay/adaptor/baidu/main.go:184-219 | relay/adaptor/baidu/main.go:221-255 | relay/adaptor/cohere/main.go:187-228 | relay/adaptor/coze/main.go:165-202 | relay/adaptor/gemini/main.go:359-401 | relay/adaptor/gemini/main.go:403-437 | relay/adaptor/ollama/main.go:176-209 | relay/adaptor/ollama/main.go:229-265 | relay/adaptor/palm/palm.go:130-172 | relay/adaptor/tencent/main.go:55-88 | relay/adaptor/tencent/main.go:197-235 | REDACTED:212-247 | REDACTED:249-272 — These 18 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 18 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 18 times.
D4 · Code Duplication· Members sharing a duplicated core (16 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (16 members, 50+ identical tokens) relay/adaptor/aiproxy/main.go:153— relay/adaptor/aiproxy/main.go:153-189 | REDACTED:19-69 | relay/adaptor/ali/main.go:230-267 | relay/adaptor/anthropic/main.go:338-379 | relay/adaptor/baidu/main.go:184-219 | relay/adaptor/baidu/main.go:221-255 | relay/adaptor/cloudflare/main.go:85-115 | relay/adaptor/cohere/main.go:187-228 | relay/adaptor/coze/main.go:165-202 | relay/adaptor/gemini/main.go:359-401 | relay/adaptor/gemini/main.go:403-437 | relay/adaptor/ollama/main.go:229-265 | relay/adaptor/palm/palm.go:130-172 | relay/adaptor/tencent/main.go:197-235 | REDACTED:212-247 | REDACTED:249-272 — These 16 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 16 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 16 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) relay/adaptor/ali/main.go:171— relay/adaptor/ali/main.go:171-228 | relay/adaptor/anthropic/main.go:249-336 | relay/adaptor/baidu/main.go:139-182 | relay/adaptor/cloudflare/main.go:31-83 | relay/adaptor/cohere/main.go:134-185 | relay/adaptor/coze/main.go:110-163 | relay/adaptor/gemini/main.go:309-357 | relay/adaptor/ollama/main.go:104-160 | relay/adaptor/tencent/main.go:151-195 | REDACTED:145-210 — These 10 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) relay/adaptor/aiproxy/main.go:92— relay/adaptor/aiproxy/main.go:92-151 | relay/adaptor/ali/main.go:171-228 | relay/adaptor/anthropic/main.go:249-336 | relay/adaptor/ollama/main.go:104-160 | REDACTED:145-210 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (30 lines × 2) relay/adaptor/replicate/chat.go:36— relay/adaptor/replicate/chat.go:36-65 | relay/adaptor/replicate/image.go:59-88 — before extracting anything, compare `relay/adaptor/replicate/chat.go` and `relay/adaptor/replicate/image.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/replicate/chat.go:36` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (24 lines × 4) controller/auth/github.go:143— controller/auth/github.go:143-166 | controller/auth/lark.go:132-155 | controller/auth/oidc.go:150-173 | controller/auth/wechat.go:94-117 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–18 lines × 2) relay/adaptor/openai/image.go:28— relay/adaptor/openai/image.go:28-42 | relay/adaptor/openai/main.go:120-137 — before extracting anything, compare `relay/adaptor/openai/image.go` and `relay/adaptor/openai/main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) controller/token.go:124— controller/token.go:124-140 | controller/token.go:191-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 3) controller/auth/github.go:192— controller/auth/github.go:192-206 | controller/auth/lark.go:174-188 | controller/auth/oidc.go:199-213 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 23) controller/channel.go:19— controller/channel.go:19-32 | controller/channel.go:37-50 | controller/channel.go:62-75 | controller/channel.go:133-146 | controller/channel.go:159-172 | controller/log.go:25-38 | controller/log.go:52-65 | controller/log.go:70-83 | controller/log.go:89-102 | controller/log.go:156-169 | controller/model.go:200-213 | controller/redemption.go:20-33 | controller/redemption.go:38-51 | controller/redemption.go:63-76 | controller/redemption.go:182-195 | controller/token.go:26-39 | controller/token.go:45-58 | controller/token.go:71-84 | controller/token.go:155-168 | controller/token.go:244-257 | controller/user.go:214-227 | controller/user.go:352-365 | controller/user.go:767-780 — before extracting anything, compare `controller/channel.go` and `controller/log.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/channel.go:19` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 9) relay/adaptor/ali/main.go:211— relay/adaptor/ali/main.go:211-224 | relay/adaptor/anthropic/main.go:319-332 | relay/adaptor/baidu/main.go:165-178 | relay/adaptor/cloudflare/main.go:64-77 | relay/adaptor/cohere/main.go:167-180 | relay/adaptor/coze/main.go:145-158 | relay/adaptor/gemini/main.go:339-352 | relay/adaptor/ollama/main.go:142-155 | relay/adaptor/tencent/main.go:177-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 9 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 9 times. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/ali/main.go:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `relay/adaptor/cohere/main.go:163` calls `Sprintf`, `GetString` and `relay/adaptor/ali/main.go:210` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) controller/auth/github.go:208— controller/auth/github.go:208-221 | controller/auth/lark.go:190-203 | controller/auth/oidc.go:215-228 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:208` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 2) relay/adaptor/openai/image.go:14— relay/adaptor/openai/image.go:14-26 | relay/adaptor/openai/main.go:101-112 — before extracting anything, compare `relay/adaptor/openai/image.go` and `relay/adaptor/openai/main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 25) controller/auth/github.go:228— controller/auth/github.go:228-239 | controller/channel.go:19-30 | controller/channel.go:37-48 | controller/channel.go:62-73 | controller/channel.go:133-144 | controller/channel.go:159-170 | controller/log.go:25-36 | controller/log.go:52-63 | controller/log.go:70-81 | controller/log.go:89-100 | controller/log.go:156-167 | controller/model.go:200-211 | controller/redemption.go:20-31 | controller/redemption.go:38-49 | controller/redemption.go:63-74 | controller/redemption.go:182-193 | controller/token.go:26-37 | controller/token.go:45-56 | controller/token.go:71-82 | controller/token.go:155-166 | controller/token.go:244-255 | controller/user.go:196-208 | controller/user.go:214-225 | controller/user.go:352-363 | controller/user.go:767-778 — before extracting anything, compare `controller/channel.go` and `controller/log.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 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 (10 lines × 4) relay/adaptor/anthropic/main.go:370— relay/adaptor/anthropic/main.go:370-379 | relay/adaptor/cohere/main.go:219-228 | relay/adaptor/gemini/main.go:392-401 | relay/adaptor/palm/palm.go:163-172 — `relay/adaptor/anthropic/main.go` and `relay/adaptor/cohere/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 7 separate duplicated blocks between them, totalling at least 68 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/anthropic/main.go:370` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 4) relay/adaptor/aws/claude/main.go:56— relay/adaptor/aws/claude/main.go:56-64 | relay/adaptor/aws/claude/main.go:110-118 | relay/adaptor/aws/llama3/main.go:79-87 | relay/adaptor/aws/llama3/main.go:149-157 — `relay/adaptor/aws/claude/main.go` and `relay/adaptor/aws/llama3/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 8 separate duplicated blocks between them, totalling at least 95 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aws/claude/main.go:56` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (9 lines × 3) relay/adaptor/ali/main.go:83— relay/adaptor/ali/main.go:83-91 | relay/adaptor/ollama/main.go:178-186 | relay/adaptor/tencent/main.go:57-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 15) relay/adaptor/aiproxy/main.go:155— relay/adaptor/aiproxy/main.go:155-162 | REDACTED:25-32 | relay/adaptor/ali/main.go:233-240 | relay/adaptor/anthropic/main.go:339-346 | relay/adaptor/baidu/main.go:186-193 | relay/adaptor/baidu/main.go:223-230 | relay/adaptor/cloudflare/main.go:86-93 | relay/adaptor/cohere/main.go:188-195 | relay/adaptor/coze/main.go:166-173 | relay/adaptor/gemini/main.go:360-367 | relay/adaptor/gemini/main.go:405-412 | relay/adaptor/palm/palm.go:131-138 | relay/adaptor/tencent/main.go:200-207 | REDACTED:214-221 | REDACTED:251-258 — there are 15 copies across 12 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 15 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `relay/adaptor/ali/main.go:241` calls `Debugf` and `REDACTED:33` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 10) relay/adaptor/ali/main.go:217— relay/adaptor/ali/main.go:217-224 | relay/adaptor/anthropic/main.go:325-332 | relay/adaptor/baidu/main.go:171-178 | relay/adaptor/cloudflare/main.go:70-77 | relay/adaptor/cohere/main.go:173-180 | relay/adaptor/coze/main.go:151-158 | relay/adaptor/gemini/main.go:345-352 | relay/adaptor/ollama/main.go:148-155 | relay/adaptor/tencent/main.go:183-190 | REDACTED:198-205 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 times. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/ali/main.go:217` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `relay/adaptor/cloudflare/main.go:81` calls `ResponseText2Usage` and `REDACTED:209` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 9) relay/adaptor/aiproxy/main.go:159— relay/adaptor/aiproxy/main.go:159-166 | REDACTED:29-36 | relay/adaptor/baidu/main.go:190-197 | relay/adaptor/baidu/main.go:227-234 | relay/adaptor/gemini/main.go:409-416 | relay/adaptor/ollama/main.go:237-244 | relay/adaptor/tencent/main.go:204-211 | REDACTED:218-225 | REDACTED:255-262 — there are 9 copies across 7 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 9 sites; resolving a subset leaves the remainder to drift apart. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `relay/adaptor/ollama/main.go:236` calls `Debugf` and `relay/adaptor/aiproxy/main.go:158` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 3) relay/adaptor/deepl/main.go:69— relay/adaptor/deepl/main.go:69-76 | relay/adaptor/deepl/main.go:104-111 | relay/controller/audio.go:176-183 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 18) relay/adaptor/aiproxy/main.go:178— relay/adaptor/aiproxy/main.go:178-184 | REDACTED:61-67 | relay/adaptor/ali/main.go:107-113 | relay/adaptor/ali/main.go:259-265 | relay/adaptor/anthropic/main.go:371-377 | relay/adaptor/baidu/main.go:211-217 | relay/adaptor/baidu/main.go:247-253 | relay/adaptor/cohere/main.go:220-226 | relay/adaptor/coze/main.go:190-196 | relay/adaptor/gemini/main.go:393-399 | relay/adaptor/gemini/main.go:429-435 | relay/adaptor/ollama/main.go:201-207 | relay/adaptor/ollama/main.go:257-263 | relay/adaptor/palm/palm.go:164-170 | relay/adaptor/tencent/main.go:80-86 | relay/adaptor/tencent/main.go:224-230 | REDACTED:239-245 | REDACTED:264-270 — there are 18 copies across 12 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 18 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `relay/adaptor/aiproxy/main.go:186` calls `ErrorWrapper` and `relay/adaptor/ali/main.go:114` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) relay/adaptor/openai/image.go:30— relay/adaptor/openai/image.go:30-36 | relay/adaptor/openai/main.go:126-131 | relay/controller/audio.go:222-228 — before extracting anything, compare `relay/adaptor/openai/image.go` and `relay/adaptor/openai/main.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/openai/image.go:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 5) relay/adaptor/aiproxy/main.go:95— relay/adaptor/aiproxy/main.go:95-99 | relay/adaptor/ali/main.go:173-177 | relay/adaptor/anthropic/main.go:251-255 | relay/adaptor/ollama/main.go:106-110 | REDACTED:147-151 — `relay/adaptor/aiproxy/main.go` and `relay/adaptor/ali/main.go` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 49 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `relay/adaptor/aiproxy/main.go:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 24) controller/channel-billing.go:395— controller/channel-billing.go:395-407 | controller/channel.go:20-32 | controller/channel.go:38-50 | controller/channel.go:63-75 | controller/channel.go:134-146 | controller/channel.go:160-172 | controller/log.go:26-38 | controller/log.go:53-65 | controller/log.go:71-83 | controller/log.go:90-102 | controller/log.go:157-169 | controller/model.go:201-213 | controller/redemption.go:21-33 | controller/redemption.go:39-51 | controller/redemption.go:64-76 | controller/redemption.go:183-195 | controller/token.go:27-39 | controller/token.go:46-58 | controller/token.go:72-84 | controller/token.go:156-168 | controller/token.go:245-257 | controller/user.go:215-227 | controller/user.go:353-365 | controller/user.go:768-780 — before extracting anything, compare `controller/channel.go` and `controller/log.go` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/channel-billing.go:395` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 4) controller/auth/github.go:209— controller/auth/github.go:209-221 | controller/auth/lark.go:191-203 | controller/auth/oidc.go:216-228 | controller/auth/wechat.go:157-169 — before extracting anything, compare `controller/auth/github.go` and `controller/auth/lark.go` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `controller/auth/github.go:209` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
IC1 · Incompleteness & stubs· Markup wires an event to an empty handler · ×1
Markup wires an event to an empty handler web/air/src/components/HeaderBar.js:109— `onSelect` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
P12 · CI test-gate honesty· Coverage collected but not gated · ×1
Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
P12 · CI test-gate honesty· Test suite runs only after the merge · ×1
Test suite runs only after the merge — `REDACTED` run(s) the test suite, but no workflow that runs tests is triggered by a pull request (or a merge queue) — so the suite reports on code that is already on the default branch. A red build there blocks nothing and the only remedy is a revert. Add the pull-request trigger to the workflow that runs your suite so the gate applies before the merge, not after it.
Duplication concentrated across 3 sibling directories (81 clone groups) web/air/src/components/OtherSetting.js:22— 81 duplicated blocks under web/ have copies in at least two of the sibling directories air, berry, default — 69 of them are reported below, and 12 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 81 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 81 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 81 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 11 sibling directories (38 clone groups) web/berry/src/views/Redemption/index.js:23— 38 duplicated blocks under web/berry/src/views/ have copies in at least two of the sibling directories About, Authentication, Channel, Dashboard, Home, Log (+5 more sibling(s) not listed) — 30 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 38 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 38 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 38 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
Duplication concentrated across 7 sibling directories (11 clone groups) web/default/src/pages/Channel/EditChannel.js:210— 11 duplicated blocks under web/default/src/pages/ have copies in at least two of the sibling directories About, Channel, Home, Log, Redemption, Token (+1 more sibling(s) not listed) — 8 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 11 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 11 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 11 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication· Duplicated block with local edits (261 matched lines × 2 locations) · ×1
Duplicated block with local edits (261 matched lines × 2 locations) web/air/src/components/RedemptionsTable.js:47— web/air/src/components/RedemptionsTable.js:47 · web/air/src/components/TokensTable.js:96 — the two spans are one implementation copied and then locally edited — 1377 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 (171 matched lines × 2 locations) · ×1
Duplicated block with local edits (171 matched lines × 2 locations) web/air/src/components/OtherSetting.js:22— web/air/src/components/OtherSetting.js:22 · web/default/src/components/OtherSetting.js:32 — the two spans are one implementation copied and then locally edited — 936 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 (168 matched lines × 2 locations) · ×1
Duplicated block with local edits (168 matched lines × 2 locations) web/air/src/App.js:27— web/air/src/App.js:27 · web/default/src/App.js:30 — the two spans are one implementation copied and then locally edited — 582 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 (163 matched lines × 2 locations) · ×1
Duplicated block with local edits (163 matched lines × 2 locations) web/air/src/components/TokensTable.js:198— web/air/src/components/TokensTable.js:198 · web/air/src/components/UsersTable.js:113 — the two spans are one implementation copied and then locally edited — 981 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 (151 matched lines × 2 locations) · ×1
Duplicated block with local edits (151 matched lines × 2 locations) web/berry/src/views/Redemption/index.js:23— web/berry/src/views/Redemption/index.js:23 · web/berry/src/views/User/index.js:23 — the two spans are one implementation copied and then locally edited — 929 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 (147 matched lines × 2 locations) · ×1
Duplicated block with local edits (147 matched lines × 2 locations) REDACTED:6— REDACTED:6 · REDACTED:6 — the two spans are one implementation copied and then locally edited — 860 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 (139 matched lines × 2 locations) · ×1
Duplicated block with local edits (139 matched lines × 2 locations) web/berry/src/views/Token/component/EditModal.js:55— web/berry/src/views/Token/component/EditModal.js:55 · web/berry/src/views/User/component/EditModal.js:57 — the two spans are one implementation copied and then locally edited — 813 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 (135 matched lines × 2 locations) · ×1
Duplicated block with local edits (135 matched lines × 2 locations) web/berry/src/views/Redemption/component/EditModal.js:37— web/berry/src/views/Redemption/component/EditModal.js:37 · web/berry/src/views/User/component/EditModal.js:55 — the two spans are one implementation copied and then locally edited — 792 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 (134 matched lines × 2 locations) · ×1
Duplicated block with local edits (134 matched lines × 2 locations) web/air/src/components/RedemptionsTable.js:125— web/air/src/components/RedemptionsTable.js:125 · web/air/src/components/UsersTable.js:105 — the two spans are one implementation copied and then locally edited — 866 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 (111 matched lines × 2 locations) · ×1
Duplicated block with local edits (111 matched lines × 2 locations) REDACTED:51— REDACTED:51 · REDACTED:46 — the two spans are one implementation copied and then locally edited — 673 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (96 lines × 2 locations) web/air/src/components/SystemSetting.js:101— web/air/src/components/SystemSetting.js:101 · web/default/src/components/SystemSetting.js:117 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (93 matched lines × 2 locations) · ×1
Duplicated block with local edits (93 matched lines × 2 locations) web/default/src/components/LoginForm.js:21— web/default/src/components/LoginForm.js:21 · REDACTED:17 — the two spans are one implementation copied and then locally edited — 490 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 (92 matched lines × 2 locations) · ×1
Duplicated block with local edits (92 matched lines × 2 locations) web/air/src/components/ChannelsTable.js:185— web/air/src/components/ChannelsTable.js:185 · web/air/src/components/TokensTable.js:199 — the two spans are one implementation copied and then locally edited — 548 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 (90 matched lines × 2 locations) · ×1
Duplicated block with local edits (90 matched lines × 2 locations) web/air/src/components/TokensTable.js:286— web/air/src/components/TokensTable.js:286 · web/default/src/components/TokensTable.js:92 — the two spans are one implementation copied and then locally edited — 500 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (88 lines × 2 locations) web/air/src/components/OperationSetting.js:28— web/air/src/components/OperationSetting.js:28 · web/default/src/components/OperationSetting.js:36 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication· Duplicated block with local edits (76 matched lines × 2 locations) · ×1
Duplicated block with local edits (76 matched lines × 2 locations) web/berry/src/views/Authentication/AuthForms/AuthLogin.js:226— web/berry/src/views/Authentication/AuthForms/AuthLogin.js:226 · web/berry/src/views/Authentication/AuthForms/AuthRegister.js:133 — the two spans are one implementation copied and then locally edited — 416 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 (75 matched lines × 2 locations) · ×1
Duplicated block with local edits (75 matched lines × 2 locations) web/default/src/components/OtherSetting.js:16— web/default/src/components/OtherSetting.js:16 · web/default/src/components/SystemSetting.js:14 — the two spans are one implementation copied and then locally edited — 482 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (72 lines × 2 locations) web/default/src/components/RedemptionsTable.js:99— web/default/src/components/RedemptionsTable.js:99 · web/default/src/components/TokensTable.js:220 — 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 (71 lines × 2 locations) web/default/src/components/TokensTable.js:251— web/default/src/components/TokensTable.js:251 · web/default/src/components/UsersTable.js:122 — 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 with local edits (57 matched lines × 2 locations) · ×1
Duplicated block with local edits (57 matched lines × 2 locations) web/berry/src/views/Topup/component/TopupCard.js:12— web/berry/src/views/Topup/component/TopupCard.js:12 · web/default/src/pages/TopUp/index.js:16 — the two spans are one implementation copied and then locally edited — 311 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (56 lines × 3 locations) web/berry/src/views/Channel/index.js:26— web/berry/src/views/Channel/index.js:26 · web/berry/src/views/Redemption/index.js:23 · web/berry/src/views/User/index.js:23 — 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 with local edits (55 matched lines × 2 locations) · ×1
Duplicated block with local edits (55 matched lines × 2 locations) REDACTED:15— REDACTED:15 · REDACTED:26 — the two spans are one implementation copied and then locally edited — 351 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 (54 matched lines × 2 locations) · ×1
Duplicated block with local edits (54 matched lines × 2 locations) web/berry/src/views/Channel/component/TableRow.js:192— web/berry/src/views/Channel/component/TableRow.js:192 · web/berry/src/views/User/component/TableRow.js:125 — the two spans are one implementation copied and then locally edited — 280 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (52 lines × 2 locations) web/berry/src/views/Setting/component/SystemSetting.js:133— web/berry/src/views/Setting/component/SystemSetting.js:133 · web/default/src/components/SystemSetting.js:117 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Duplicated block (51 lines × 2 locations) web/default/src/components/ChannelsTable.js:616— web/default/src/components/ChannelsTable.js:616 · web/default/src/components/TokensTable.js:447 — 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.
Wholesale file copy (50 identical lines × 3 files) web/berry/src/views/Authentication/Auth/GitHubOAuth.js:1— web/berry/src/views/Authentication/Auth/GitHubOAuth.js:1 · web/berry/src/views/Authentication/Auth/LarkOAuth.js:1 · web/berry/src/views/Authentication/Auth/OidcOAuth.js:1 — these 3 files are line-for-line copies of one another — 50 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication· Duplicated block with local edits (49 matched lines × 2 locations) · ×1
Duplicated block with local edits (49 matched lines × 2 locations) web/default/src/pages/Channel/EditChannel.js:210— web/default/src/pages/Channel/EditChannel.js:210 · web/default/src/pages/Token/EditToken.js:133 — the two spans are one implementation copied and then locally edited — 240 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 (47 matched lines × 2 locations) · ×1
Duplicated block with local edits (47 matched lines × 2 locations) web/air/src/components/ChannelsTable.js:523— web/air/src/components/ChannelsTable.js:523 · web/air/src/components/LogsTable.js:266 — the two spans are one implementation copied and then locally edited — 326 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (45 lines × 3 locations) web/berry/src/views/Channel/index.js:165— web/berry/src/views/Channel/index.js:165 · web/berry/src/views/Redemption/index.js:114 · web/berry/src/views/User/index.js:112 — 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 with local edits (45 matched lines × 2 locations) · ×1
Duplicated block with local edits (45 matched lines × 2 locations) web/berry/src/views/Redemption/component/EditModal.js:23— web/berry/src/views/Redemption/component/EditModal.js:23 · web/berry/src/views/Token/component/EditModal.js:39 — the two spans are one implementation copied and then locally edited — 309 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
Duplicated block (43 lines × 2 locations) web/air/src/components/ChannelsTable.js:317— web/air/src/components/ChannelsTable.js:317 · web/default/src/components/ChannelsTable.js:155 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
Complex function (anonymous) (cyclomatic 29, cognitive 28) web/berry/src/views/Channel/component/EditModal.js:285— (anonymous) has cyclomatic complexity 29 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function EditChannel (cyclomatic 29, cognitive 22) web/default/src/pages/Channel/EditChannel.js:30— EditChannel has cyclomatic complexity 29 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Breadcrumbs (cyclomatic 28, cognitive 42) web/berry/src/ui-component/extended/Breadcrumbs.js:30— Breadcrumbs has cyclomatic complexity 28 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function Profile (cyclomatic 26, cognitive 21) web/berry/src/views/Profile/index.js:41— Profile has cyclomatic complexity 26 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function SystemSetting (cyclomatic 24, cognitive 23) web/berry/src/views/Setting/component/SystemSetting.js:26— SystemSetting has cyclomatic complexity 24 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.
Complex function submit (cyclomatic 23, cognitive 25) web/default/src/pages/Channel/EditChannel.js:170— submit has cyclomatic complexity 23 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 23, cognitive 17) web/berry/src/views/Authentication/AuthForms/AuthRegister.js:135— (anonymous) has cyclomatic complexity 23 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 19, cognitive 13) web/berry/src/views/User/component/EditModal.js:135— (anonymous) has cyclomatic complexity 19 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function submit (cyclomatic 18, cognitive 21) web/air/src/pages/Channel/EditChannel.js:216— submit has cyclomatic complexity 18 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function submit (cyclomatic 17, cognitive 19) web/berry/src/views/Channel/component/EditModal.js:154— submit has cyclomatic complexity 17 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function LoginForm (cyclomatic 14, cognitive 11) web/berry/src/views/Authentication/AuthForms/AuthLogin.js:44— LoginForm has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 14, cognitive 11) web/berry/src/views/Token/component/EditModal.js:140— (anonymous) has cyclomatic complexity 14 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files· web/berry/src/views/Setting/component/SystemSetting.js · ×1
web/berry/src/views/Setting/component/SystemSetting.js: 889 lines of code web/berry/src/views/Setting/component/SystemSetting.js:1— web/berry/src/views/Setting/component/SystemSetting.js has 889 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/default/src/components/ChannelsTable.js · ×1
web/default/src/components/ChannelsTable.js: 705 lines of code web/default/src/components/ChannelsTable.js:1— web/default/src/components/ChannelsTable.js has 705 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/air/src/components/ChannelsTable.js · ×1
web/air/src/components/ChannelsTable.js: 703 lines of code web/air/src/components/ChannelsTable.js:1— web/air/src/components/ChannelsTable.js has 703 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/default/src/pages/Channel/EditChannel.js · ×1
web/default/src/pages/Channel/EditChannel.js: 681 lines of code web/default/src/pages/Channel/EditChannel.js:1— web/default/src/pages/Channel/EditChannel.js has 681 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/default/src/components/SystemSetting.js · ×1
web/default/src/components/SystemSetting.js: 641 lines of code web/default/src/components/SystemSetting.js:1— web/default/src/components/SystemSetting.js has 641 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/air/src/pages/Channel/EditChannel.js · ×1
web/air/src/pages/Channel/EditChannel.js: 625 lines of code web/air/src/pages/Channel/EditChannel.js:1— web/air/src/pages/Channel/EditChannel.js has 625 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 624 lines of code REDACTED:1— REDACTED has 624 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/berry/src/views/Channel/component/EditModal.js · ×1
web/berry/src/views/Channel/component/EditModal.js: 611 lines of code web/berry/src/views/Channel/component/EditModal.js:1— web/berry/src/views/Channel/component/EditModal.js has 611 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/air/src/components/TokensTable.js · ×1
web/air/src/components/TokensTable.js: 596 lines of code web/air/src/components/TokensTable.js:1— web/air/src/components/TokensTable.js has 596 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/default/src/components/LogsTable.js · ×1
web/default/src/components/LogsTable.js: 586 lines of code web/default/src/components/LogsTable.js:1— web/default/src/components/LogsTable.js has 586 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/air/src/components/SystemSetting.js · ×1
web/air/src/components/SystemSetting.js: 573 lines of code web/air/src/components/SystemSetting.js:1— web/air/src/components/SystemSetting.js has 573 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/berry/src/views/Setting/component/OperationSetting.js · ×1
web/berry/src/views/Setting/component/OperationSetting.js: 542 lines of code web/berry/src/views/Setting/component/OperationSetting.js:1— web/berry/src/views/Setting/component/OperationSetting.js has 542 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/default/src/components/TokensTable.js · ×1
web/default/src/components/TokensTable.js: 511 lines of code web/default/src/components/TokensTable.js:1— web/default/src/components/TokensTable.js has 511 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/default/src/components/OperationSetting.js · ×1
web/default/src/components/OperationSetting.js: 435 lines of code web/default/src/components/OperationSetting.js:1— web/default/src/components/OperationSetting.js has 435 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/default/src/pages/Dashboard/index.js · ×1
web/default/src/pages/Dashboard/index.js: 429 lines of code web/default/src/pages/Dashboard/index.js:1— web/default/src/pages/Dashboard/index.js has 429 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/air/src/components/MjLogsTable.js · ×1
web/air/src/components/MjLogsTable.js: 416 lines of code web/air/src/components/MjLogsTable.js:1— web/air/src/components/MjLogsTable.js has 416 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 402 lines of code REDACTED:1— REDACTED has 402 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Test Coverage — 0% of 231 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
No lint script — test ✓ · lint ✗ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~278 LoC) web/berry/src/constants/ChannelConstants.js— no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/constants/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~155 LoC) web/berry/src/ui-component/cards/Skeleton/PopularCard.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~99 LoC) web/berry/src/views/Dashboard/component/StatisticalCard.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~72 LoC) web/berry/src/ui-component/extended/Avatar.js— no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/ui-component/cards/CardSecondaryAction.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~59 LoC) web/berry/src/constants/SnackbarConstants.js— no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/constants/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~55 LoC) web/berry/src/ui-component/cards/CardSecondaryAction.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~44 LoC) web/berry/src/ui-component/cards/Skeleton/ProductPlaceholder.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~39 LoC) web/berry/src/layout/NavMotion.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~19 LoC) web/berry/src/ui-component/cards/Skeleton/TotalIncomeCard.js— no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/views/Dashboard/component/StatisticalCard.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Dead file (~18 LoC) web/berry/src/hooks/useScriptRef.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~13 LoC) web/berry/src/hooks/useAuth.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~8 LoC) web/berry/src/ui-component/cards/Skeleton/ImagePlaceholder.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~3 LoC) web/berry/src/constants/index.js— no import path from any entry point (3 application, 0 tooling, 0 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
Dead file (~1 LoC) web/berry/src/constants/CommonConstants.js— no import path from any entry point (3 application, 0 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (web/berry/src/constants/index.js) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
Unused dependency '@visactor/react-vchart' — Declared in web/air/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'react-dropzone' — Declared in web/air/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Unused dependency 'usehooks-ts' — Declared in web/air/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.
SC1 · Supply-chain hygiene· JavaScript dependencies are not locked · ×1
JavaScript dependencies are not locked — No package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock — JS installs aren't reproducible (SSDF PW.4.4). Commit your package manager's lockfile and install from it (`npm ci`, `yarn --immutable`, `pnpm i --frozen-lockfile` or `bun i --frozen-lockfile`). Advisory — never scored.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: fetchDashboardData web/default/src/pages/Dashboard/index.js:69— `fetchDashboardData` awaits `axios.get(…)` 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: `axios.get(url, { signal })`.
Orphaned file web/berry/src/views/Channel/component/EditModal.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/pages/Channel/EditChannel.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/ChannelsTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/SystemSetting.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/ChannelsTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/SystemSetting.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/TokensTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/berry/src/views/Setting/component/OperationSetting.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file controller/user.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/LogsTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/TokensTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/OperationSetting.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/pages/Dashboard/index.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/MjLogsTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/LogsTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/components/OperationSetting.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/pages/Detail/index.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file model/user.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file REDACTED:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/default/src/components/UsersTable.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file relay/adaptor/gemini/main.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/air/src/pages/TopUp/index.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file controller/channel-billing.go:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file web/berry/src/views/Token/component/EditModal.js:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate relay/adaptor/coze/main.go:121— `len(data) < 5 || !strings.HasPrefix(data, "data:")` appears character-identically in 2 files — relay/adaptor/coze/main.go, relay/adaptor/tencent/main.go. 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 controller/auth/github.go:89— `state == "" || session.Get("oauth_state") == nil || state != session.Get("oauth_state").(string)` appears character-identically in 3 files — controller/auth/github.go, controller/auth/lark.go, controller/auth/oidc.go. 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/air/src/pages/Channel/EditChannel.js:217— `!isEdit && (inputs.name === '' || inputs.key === '')` appears character-identically in 2 files — web/air/src/pages/Channel/EditChannel.js, web/default/src/pages/Channel/EditChannel.js. 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/air/src/pages/Home/index.js:57— `homePageContentLoaded && homePageContent === ''` appears character-identically in 3 files — web/air/src/pages/Home/index.js, web/berry/src/views/Home/index.js, web/default/src/pages/Home/index.js. 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/air/src/pages/Channel/EditChannel.js:225— `inputs.model_mapping !== '' && !verifyJSON(inputs.model_mapping)` appears character-identically in 2 files — web/air/src/pages/Channel/EditChannel.js, web/default/src/pages/Channel/EditChannel.js. 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/air/src/pages/User/AddUser.js:22— `inputs.username === '' || inputs.password === ''` appears character-identically in 2 files — web/air/src/pages/User/AddUser.js, web/default/src/pages/User/AddUser.js. 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/air/src/components/OperationSetting.js:38— `item.key === 'ModelRatio' || item.key === 'GroupRatio' || item.key === 'CompletionRatio'` appears character-identically in 2 files — web/air/src/components/OperationSetting.js, web/default/src/components/OperationSetting.js. 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/air/src/pages/Channel/EditChannel.js:230— `localInputs.base_url && localInputs.base_url.endsWith('/')` appears character-identically in 2 files — web/air/src/pages/Channel/EditChannel.js, web/default/src/pages/Channel/EditChannel.js. 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/air/src/pages/Channel/EditChannel.js:233— `localInputs.type === 3 && localInputs.other === ''` appears character-identically in 2 files — web/air/src/pages/Channel/EditChannel.js, web/default/src/pages/Channel/EditChannel.js. 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/air/src/pages/Home/index.js:28— `localStorage.getItem('home_page_content') || ''` appears character-identically in 3 files — web/air/src/pages/Home/index.js, web/berry/src/views/Home/index.js, web/default/src/pages/Home/index.js. 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/air/src/components/SystemSetting.js:101— `name === 'PasswordLoginEnabled' && inputs[name] === 'true'` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:157— `originInputs['EmailDomainWhitelist'] !== inputs.EmailDomainWhitelist.join(',') && inputs.SMTPToken !== ''` appears character-identically in 2 files — web/air/src/components/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:208— `originInputs['GitHubClientSecret'] !== inputs.GitHubClientSecret && inputs.GitHubClientSecret !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/berry/src/views/Setting/component/SystemSetting.js:238— `originInputs['LarkClientSecret'] !== inputs.LarkClientSecret && inputs.LarkClientSecret !== ''` appears character-identically in 2 files — web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:196— `originInputs['MessagePusherToken'] !== inputs.MessagePusherToken && inputs.MessagePusherToken !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:141— `originInputs['SMTPPort'] !== inputs.SMTPPort && inputs.SMTPPort !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:147— `originInputs['SMTPToken'] !== inputs.SMTPToken && inputs.SMTPToken !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:220— `originInputs['TurnstileSecretKey'] !== inputs.TurnstileSecretKey && inputs.TurnstileSecretKey !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/SystemSetting.js:181— `originInputs['WeChatServerToken'] !== inputs.WeChatServerToken && inputs.WeChatServerToken !== ''` appears character-identically in 3 files — web/air/src/components/SystemSetting.js, web/berry/src/views/Setting/component/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/ChannelsTable.js:314— `parseInt(localStorage.getItem('page-size')) || ITEMS_PER_PAGE` appears character-identically in 2 files — web/air/src/components/ChannelsTable.js, web/air/src/components/LogsTable.js. 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/air/src/components/SystemSetting.js:229— `restrictedDomainInput !== '' && !localDomainList.includes(restrictedDomainInput)` appears character-identically in 2 files — web/air/src/components/SystemSetting.js, web/default/src/components/SystemSetting.js. 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/air/src/components/LoginForm.js:54— `turnstileEnabled && turnstileToken === ''` appears character-identically in 8 files — web/air/src/components/LoginForm.js, REDACTED, REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate web/air/src/components/LoginForm.js:93— `username === 'root' && password === '123456'` appears character-identically in 2 files — web/air/src/components/LoginForm.js, web/default/src/components/LoginForm.js. 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.
README/code drift README.en.md:253— README.en.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.en.md:266— README.en.md documents the environment variable `GLOBAL_WEL_RATE_LIMIT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.en.md:269— README.en.md documents the environment variable `DATA_GYM_CACHE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.ja.md:252— README.ja.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:259— README.md documents the environment variable `OPENAI_API_BASE_URL`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:259— README.md documents the environment variable `OPENAI_API_KEY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:376— README.md documents the environment variable `SQL_CONN_MAX_LIFETIME`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:386— README.md documents the environment variable `CHANNEL_UPDATE_FREQUENCY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift README.md:402— README.md documents the environment variable `DATA_GYM_CACHE_DIR`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift web/berry/README.md:10— web/berry/README.md links to `minimal-ui-kit`, but `web/berry/minimal-ui-kit` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
Anemic entity: Ability model/ability.go:14— `Ability` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: Channel model/channel.go:20— `Channel` is an aggregate/entity with 20 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: LogStatistic model/log.go:216— `LogStatistic` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: Redemption model/redemption.go:20— `Redemption` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: Token model/token.go:23— `Token` is an aggregate/entity with 13 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file relay/billing/ratio/model.go:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file web/berry/src/views/Setting/component/SystemSetting.js:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file web/air/src/pages/Channel/EditChannel.js:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Unused export 'default' REDACTED:9— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'default' REDACTED:9— Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'default' web/default/src/i18n.js:28— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'userConstants' · ×2
Unused export 'userConstants' web/air/src/constants/user.constants.js:1— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/constants/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/constants/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'userConstants' web/default/src/constants/user.constants.js:1— Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/constants/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/constants/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'authHeader' web/air/src/helpers/auth-header.js:1— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'authHeader' web/default/src/helpers/auth-header.js:1— Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'showWarning' REDACTED:104— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'showWarning' REDACTED:60— Nothing imports this binding — it is safe to review for removal.
Unused export 'openPage' REDACTED:124— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'openPage' REDACTED:126— Nothing ultimately consumes this binding: its only referrer is the re-export in web/default/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/default/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — An a11y linter is configured (Documented) but there's no automated a11y test or CI gate. Add your test runner's axe binding (jest-axe, vitest-axe, cypress-axe or @axe-core/playwright) to verify at runtime, then gate it in CI. What was searched, so you can tell an absence from a miss: the 3 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 5 significant file(s) lose their only recent owner: web/default/src/pages/Dashboard/index.js, web/default/src/pages/Home/index.js, web/default/src/components/RedemptionsTable.js, web/default/src/components/Header.js, REDACTED. Pair on, review, or document these before any departure.
No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 4 of 4 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (19591 LoC, 327 module-visible types across 83 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.
Dormant codebase — 189 of 189 significant files have no living knowledge — the codebase as a whole is dormant, not 189 separate risks. Counted over 189 of the 467 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST — No static application security testing detected. For this repository's stack, add gosec / govulncheck (or golangci-lint) (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 8359 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
Unused export 'renderText' web/air/src/helpers/render.js:4— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'setPromptShown' · ×1
Unused export 'setPromptShown' REDACTED:231— Nothing ultimately consumes this binding: its only referrer is the re-export in web/air/src/helpers/index.js, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in web/air/src/helpers/index.js in the same commit, or the barrel will import a name that no longer exists.
Unused export 'getTodayDay' web/berry/src/utils/chart.js:16— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused export 'getSystemName' · ×1
Unused export 'getSystemName' REDACTED:5— Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code· Unused module-local declaration 'renderTimestamp' · ×1
Unused module-local declaration 'renderTimestamp' web/air/src/components/ChannelsTable.js:23— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'showWarningOptions' · ×1
Unused module-local declaration 'showWarningOptions' REDACTED:56— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
R7 · Dead Code· Unused module-local declaration 'MODE_OPTIONS' · ×1
Unused module-local declaration 'MODE_OPTIONS' web/default/src/components/LogsTable.js:45— This top-level declaration is not exported and its name occurs nowhere else in its module — not called, read, typed against, re-exported or named by a string. Nothing outside the module can reach a non-exported binding, so this is the whole search: remove it, or use it.
No security response headers detected web/air/vercel.json:1— 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 configured — defense in depth, even when a reverse proxy could set them. This is reported because `vercel.json` configures this repository's static hosting, including its response headers, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.)
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context or an AbortSignal · ×1
Not all functions that make a request accept a context.Context or an AbortSignal — Only 5/17 functions that make a cancellable request (fetch, axios, ky, ofetch; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) 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.
Silent fallback default on error common/helper/helper.go:150— `String2Int` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Subsumed condition operand monitor/manage.go:31— `strings.Contains(lowerMessage, "your credit balance is too low")` can never decide this `||` — every value satisfying `strings.Contains(lowerMessage, "your credit balance is too low")` also satisfies `strings.Contains(lowerMessage, "credit")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Outdated: cloud.google.com/go/iam — `cloud.google.com/go/iam` is required at v1.1.10 in REDACTED, but v1.15.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get cloud.google.com/go/iam@v1.15.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2 — `github.com/aws/aws-sdk-go-v2` is required at v1.27.0 in REDACTED, but v1.47.4 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2@v1.47.4 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/credentials — `github.com/aws/aws-sdk-go-v2/credentials` is required at v1.17.15 in REDACTED, but v1.20.10 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/credentials@v1.20.10 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/aws/aws-sdk-go-v2/service/bedrockruntime — `github.com/aws/aws-sdk-go-v2/service/bedrockruntime` is required at v1.8.3 in REDACTED, but v1.63.7 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/aws/aws-sdk-go-v2/service/bedrockruntime@v1.63.7 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gin-contrib/cors — `github.com/gin-contrib/cors` is required at v1.7.2 in REDACTED, but v1.7.9 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gin-contrib/cors@v1.7.9 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gin-contrib/gzip — `github.com/gin-contrib/gzip` is required at v1.0.1 in REDACTED, but v1.2.8 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gin-contrib/gzip@v1.2.8 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gin-contrib/sessions — `github.com/gin-contrib/sessions` is required at v1.0.1 in REDACTED, but v1.1.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gin-contrib/sessions@v1.1.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gin-contrib/static — `github.com/gin-contrib/static` is required at v1.1.2 in REDACTED, but v1.1.8 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gin-contrib/static@v1.1.8 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gin-gonic/gin — `github.com/gin-gonic/gin` is required at v1.10.0 in REDACTED, but v1.12.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gin-gonic/gin@v1.12.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/go-playground/validator/v10 — `github.com/go-playground/validator/v10` is required at v10.20.0 in REDACTED, but v10.30.5 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/go-playground/validator/v10@v10.30.5 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/gorilla/websocket — `github.com/gorilla/websocket` is required at v1.5.1 in REDACTED, but v1.5.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/gorilla/websocket@v1.5.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/pkoukk/tiktoken-go — `github.com/pkoukk/tiktoken-go` is required at v0.1.7 in REDACTED, but v0.1.8 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/pkoukk/tiktoken-go@v0.1.8 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.9.0 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.31.0 in REDACTED, but v0.58.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/crypto@v0.58.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/image — `golang.org/x/image` is required at v0.18.0 in REDACTED, but v0.47.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/image@v0.47.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sync — `golang.org/x/sync` is required at v0.10.0 in REDACTED, but v0.24.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sync@v0.24.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: google.golang.org/api — `google.golang.org/api` is required at v0.187.0 in REDACTED, but v0.308.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get google.golang.org/api@v0.308.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/driver/mysql — `gorm.io/driver/mysql` is required at v1.5.6 in REDACTED, but v1.6.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/driver/mysql@v1.6.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/driver/postgres — `gorm.io/driver/postgres` is required at v1.5.7 in REDACTED, but v1.6.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/driver/postgres@v1.6.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/driver/sqlite — `gorm.io/driver/sqlite` is required at v1.5.1 in REDACTED, but v1.6.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/driver/sqlite@v1.6.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/gorm — `gorm.io/gorm` is required at v1.25.10 in REDACTED, but v1.31.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/gorm@v1.31.2 && go mod tidy` and commit the updated REDACTED and go.sum.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a16e4e-d84a-7153-9bc1-5baaae0ee564 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 45 · Warnings: 596 · Recommendations: 276 · Info: 21 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 24-10-2026 @ 14:27 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.