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

yikart/AiToEarn

Measured 16 November 2026, 17:20 UTC, at code version 11dd195

First survey, so nothing to compare with yet Knowledge freshness: not measured

Knowledge freshness is not measured: Freshness signal contradicted by repo activity.

CAI score 34.1out of 100 At risk

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

A large codebase: 168,715 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 1.1 person-years · Weakest lens: Production Readiness, 22.5

Findings by how serious they are

291 critical 1267 serious 361 minor

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

This survey was produced by

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

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

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

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

84of 84 dimensions measured by tools.
1774of 1919 findings point to an exact file and line, so you can open each one in the code. The other 145 concern the repository as a whole, such as missing documentation.
84dimensions across 8 lenses, read from 168,715 lines of product code in 20 projects.
Chapters

Executive summary

yikart/AiToEarn is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back because we found no automated security scanning of the code, its secrets or its dependencies, and it has packages under a licence on your banned list. It scores 34.1 out of 100, which the At risk rating leaves unchanged.

Production Readiness, at 22.5, is the weakest lens and counts most in the score. The best first step for the work it takes is updating the outdated dependencies, worth about 7.5 points. Replacing the 16 packages under a banned licence would lift Production Readiness itself, worth about 9.6 points. Raising Production Readiness to 70 would lift the score to about 43.6.

105 known security holes in the packages the code depends on can be used by attackers. Forty-two passwords or keys are open to anyone who can read the repository, and twenty-five pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, replacing each exposed password or key and pinning each tool to an exact version would close these risks. Fixing the weaknesses the scanner points to would fix the eight security weaknesses in the code, and the 11 unsafe settings in infrastructure or container files need changing to safe values. The 37 controls that only work with a mouse need to work with the keyboard, or to become a real button.

The product code is 168,715 lines, about €170,000 to rebuild.

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

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

If Production Readiness rose from 22.5 to 70, the lowest score rated Strong, the score would rise from 34.1 to about 43.6.

Code composition: what the lines of code are
Product code 87%Tests 13%
Rebuild cost: about €170,000 · Estimate
Cost to rebuild€55,000 to €280,000, for 918 to 2,912 hours of work, about 1.1 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 34. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 168,715 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 9 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (9).
Raises the score by about 7.5 points · Low effort · Dependency Hygiene
2
Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8).
Raises the score by about 7.0 points · Low effort · Dependency Hygiene
3
Resolve the 16 Banned license finding(s) in License Compliance — start with REDACTED (14), REDACTED (2).
Raises the score by about 9.6 points · Medium effort · License Compliance

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 €170,000 to build again, about 1.1 person-years of work. Its weakest lens is Production Readiness, at 22.5 (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.
If you do one thing first · First action
Resolve the 9 Outdated (npm) finding(s) in Dependency Hygiene. Of all the actions in this report, it raises the score most for the work it takes: about 7.5 points for low effort, because it clears the 9 Dependency Hygiene 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.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 58,253 lines over the last 90 days, which is about 236,248 lines a year. At that pace, the extra work comes to an estimated 33.2 to 199.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch @yikart/aitoearn-ai-client aitoearn-ai-client @yikart/aitoearn-ai-shared aitoearn-ai-shared @yikart/aitoearn-ai-client->@yikart/aitoearn-ai-shared @yikart/common common @yikart/aitoearn-ai-client->@yikart/common @yikart/aitoearn-ai-shared->@yikart/common @yikart/aitoearn-auth aitoearn-auth @yikart/aitoearn-auth->@yikart/common @yikart/mongodb mongodb @yikart/aitoearn-auth->@yikart/mongodb @yikart/aitoearn-queue aitoearn-queue @yikart/aitoearn-queue->@yikart/aitoearn-ai-shared @yikart/aitoearn-queue->@yikart/common @yikart/aitoearn-queue->@yikart/mongodb @yikart/redis redis @yikart/aitoearn-queue->@yikart/redis @yikart/aitoearn-server-shared aitoearn-server-shared @yikart/aitoearn-server-shared->@yikart/common @yikart/ali-oss ali-oss @yikart/ali-oss->@yikart/common @yikart/assets assets @yikart/assets->@yikart/aitoearn-auth @yikart/assets->@yikart/ali-oss @yikart/aws-s3 aws-s3 @yikart/assets->@yikart/aws-s3 @yikart/assets->@yikart/common @yikart/assets->@yikart/mongodb @yikart/redlock redlock @yikart/assets->@yikart/redlock @yikart/aws-s3->@yikart/common @yikart/channel-db channel-db @yikart/channel-db->@yikart/common @yikart/config-editor config-editor @yikart/config-editor->@yikart/common @yikart/mongodb->@yikart/aitoearn-ai-shared @yikart/mongodb->@yikart/common @yikart/nest-mcp nest-mcp @yikart/nest-mcp->@yikart/common @yikart/nest-mcp->@yikart/mongodb @yikart/redis->@yikart/common @yikart/redlock->@yikart/common @yikart/redlock->@yikart/redis aitoearn-ai aitoearn-ai aitoearn-ai->@yikart/aitoearn-ai-shared aitoearn-ai->@yikart/aitoearn-auth aitoearn-ai->@yikart/aitoearn-queue aitoearn-ai->@yikart/assets aitoearn-ai->@yikart/aws-s3 aitoearn-ai->@yikart/common aitoearn-ai->@yikart/config-editor aitoearn-ai->@yikart/mongodb aitoearn-ai->@yikart/redis aitoearn-ai->@yikart/redlock aitoearn-server aitoearn-server aitoearn-server->@yikart/aitoearn-ai-client aitoearn-server->@yikart/aitoearn-ai-shared aitoearn-server->@yikart/aitoearn-auth aitoearn-server->@yikart/aitoearn-queue aitoearn-server->@yikart/aitoearn-server-shared aitoearn-server->@yikart/assets aitoearn-server->@yikart/aws-s3 aitoearn-server->@yikart/channel-db aitoearn-server->@yikart/common aitoearn-server->@yikart/config-editor aitoearn-server->@yikart/mongodb aitoearn-server->@yikart/nest-mcp aitoearn-server->@yikart/redis aitoearn-server->@yikart/redlock aitoearn-web aitoearn-web dsh-plugin-aitoearn dsh-plugin-aitoearn

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.

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 aitoearn-backend.apps.aitoearn-ai.src.core.ai-availability.ai-availability_service2 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.services.media_service3 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface4 aitoearn-backend.libs.aitoearn-auth.src.aitoearn-auth_interface5 aitoearn-backend.libs.channel-db.src.repositories.base_repository6 aitoearn-backend.libs.common.src.dtos.table_dto7 aitoearn-backend.libs.common.src.enums.account-type_enum8 aitoearn-backend.libs.common.src.enums.user-type_enum9 aitoearn-backend.libs.mongodb.src.schemas.timestamp_schema10 aitoearn-web.src.api.ai.ai_types11 aitoearn-web.src.app.config.platConfig12 aitoearn-web.src.components.ui13 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_service14 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_exception15 aitoearn-backend.apps.aitoearn-server.src.core.content.common16 aitoearn-backend.libs.assets.src.video-metadata_service17 aitoearn-backend.libs.mongodb.src.repositories.account_repository18 aitoearn-backend.libs.mongodb.src.repositories.ai-log_repository19 aitoearn-backend.libs.mongodb.src.repositories.publish-record_repository20 aitoearn-web.src.api.accounts.account_types21 aitoearn-web.src.store.agent.agent_types22 aitoearn-backend.apps.aitoearn-ai.src.core.agent.services.agent-runtime_service23 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_interface24 aitoearn-backend.libs.assets.src.assets_service25 aitoearn-web.src.api.materials.material_types26 aitoearn-web.src.components.PublishDialog.publishDialog_type27 aitoearn-backend.apps.aitoearn-ai.src.core.ai.chat.chat_service28 aitoearn-backend.apps.aitoearn-ai.src.core.ai.image.image_service29 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.grok.grok_service30 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.openai.openai_service31 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_registry32 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-state_service33 aitoearn-web.src.api.channels.channel_types34 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video_service35 aitoearn-backend.apps.aitoearn-server.src.core.channels.accounts.account_service36 aitoearn-backend.apps.aitoearn-server.src.core.channels.auth.auth_service37 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.flows.publish-flow_service38 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video-task-status_scheduler39 aitoearn-backend.apps.aitoearn-ai.src.core.draft-generation.draft-generation_service40 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-task_service
1 aitoearn-backend.apps.aitoearn-ai.src.core.ai-availability.ai-availability_service
2 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.services.media_service
3 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface
4 aitoearn-backend.libs.aitoearn-auth.src.aitoearn-auth_interface
5 aitoearn-backend.libs.channel-db.src.repositories.base_repository
6 aitoearn-backend.libs.common.src.dtos.table_dto
7 aitoearn-backend.libs.common.src.enums.account-type_enum
8 aitoearn-backend.libs.common.src.enums.user-type_enum
9 aitoearn-backend.libs.mongodb.src.schemas.timestamp_schema
10 aitoearn-web.src.api.ai.ai_types
11 aitoearn-web.src.app.config.platConfig
12 aitoearn-web.src.components.ui
13 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_service1118
14 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_exception2
15 aitoearn-backend.apps.aitoearn-server.src.core.content.common42
16 aitoearn-backend.libs.assets.src.video-metadata_service1
17 aitoearn-backend.libs.mongodb.src.repositories.account_repository112
18 aitoearn-backend.libs.mongodb.src.repositories.ai-log_repository13
19 aitoearn-backend.libs.mongodb.src.repositories.publish-record_repository12
20 aitoearn-web.src.api.accounts.account_types2
21 aitoearn-web.src.store.agent.agent_types1
22 aitoearn-backend.apps.aitoearn-ai.src.core.agent.services.agent-runtime_service111
23 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_interface261
24 aitoearn-backend.libs.assets.src.assets_service111
25 aitoearn-web.src.api.materials.material_types53
26 aitoearn-web.src.components.PublishDialog.publishDialog_type1
27 aitoearn-backend.apps.aitoearn-ai.src.core.ai.chat.chat_service1111
28 aitoearn-backend.apps.aitoearn-ai.src.core.ai.image.image_service11
29 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.grok.grok_service12111
30 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.openai.openai_service1111
31 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_registry17
32 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-state_service13
33 aitoearn-web.src.api.channels.channel_types10112
34 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video_service11111
35 aitoearn-backend.apps.aitoearn-server.src.core.channels.accounts.account_service1121
36 aitoearn-backend.apps.aitoearn-server.src.core.channels.auth.auth_service1141
37 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.flows.publish-flow_service1111511
38 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video-task-status_scheduler11111
39 aitoearn-backend.apps.aitoearn-ai.src.core.draft-generation.draft-generation_service1111111
40 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-task_service111110121
Uses a module listed above itPart of a loopThe module itself
1 aitoearn-backend.apps.aitoearn-ai.src.core.ai-availability.ai-availability_service2 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.services.media_service3 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface4 aitoearn-backend.libs.aitoearn-auth.src.aitoearn-auth_interface5 aitoearn-backend.libs.channel-db.src.repositories.base_repository6 aitoearn-backend.libs.common.src.dtos.table_dto7 aitoearn-backend.libs.common.src.enums.account-type_enum8 aitoearn-backend.libs.common.src.enums.user-type_enum9 aitoearn-backend.libs.mongodb.src.schemas.timestamp_schema10 aitoearn-web.src.api.ai.ai_types11 aitoearn-web.src.app.config.platConfig12 aitoearn-web.src.components.ui13 aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_service14 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_exception15 aitoearn-backend.apps.aitoearn-server.src.core.content.common16 aitoearn-backend.libs.assets.src.video-metadata_service17 aitoearn-backend.libs.mongodb.src.repositories.account_repository18 aitoearn-backend.libs.mongodb.src.repositories.ai-log_repository19 aitoearn-backend.libs.mongodb.src.repositories.publish-record_repository20 aitoearn-web.src.api.accounts.account_types21 aitoearn-web.src.store.agent.agent_types22 aitoearn-backend.apps.aitoearn-ai.src.core.agent.services.agent-runtime_service23 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_interface24 aitoearn-backend.libs.assets.src.assets_service25 aitoearn-web.src.api.materials.material_types26 aitoearn-web.src.components.PublishDialog.publishDialog_type27 aitoearn-backend.apps.aitoearn-ai.src.core.ai.chat.chat_service28 aitoearn-backend.apps.aitoearn-ai.src.core.ai.image.image_service29 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.grok.grok_service30 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.openai.openai_service31 aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_registry32 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-state_service33 aitoearn-web.src.api.channels.channel_types34 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video_service35 aitoearn-backend.apps.aitoearn-server.src.core.channels.accounts.account_service36 aitoearn-backend.apps.aitoearn-server.src.core.channels.auth.auth_service37 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.flows.publish-flow_service38 aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video-task-status_scheduler39 aitoearn-backend.apps.aitoearn-ai.src.core.draft-generation.draft-generation_service40 aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-task_serviceaitoearn-backend.apps.aitoearn-ai.src.core.ai-availability.ai-availability_service1aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.services.media_service2aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface3aitoearn-backend.libs.aitoearn-auth.src.aitoearn-auth_interface4aitoearn-backend.libs.channel-db.src.repositories.base_repository5aitoearn-backend.libs.common.src.dtos.table_dto6aitoearn-backend.libs.common.src.enums.account-type_enum7aitoearn-backend.libs.common.src.enums.user-type_enum8aitoearn-backend.libs.mongodb.src.schemas.timestamp_schema9aitoearn-web.src.api.ai.ai_types10aitoearn-web.src.app.config.platConfig11aitoearn-web.src.components.ui12aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_service13aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_exception14aitoearn-backend.apps.aitoearn-server.src.core.content.common15aitoearn-backend.libs.assets.src.video-metadata_service16aitoearn-backend.libs.mongodb.src.repositories.account_repository17aitoearn-backend.libs.mongodb.src.repositories.ai-log_repository18aitoearn-backend.libs.mongodb.src.repositories.publish-record_repository19aitoearn-web.src.api.accounts.account_types20aitoearn-web.src.store.agent.agent_types21aitoearn-backend.apps.aitoearn-ai.src.core.agent.services.agent-runtime_service22aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_interface23aitoearn-backend.libs.assets.src.assets_service24aitoearn-web.src.api.materials.material_types25aitoearn-web.src.components.PublishDialog.publishDialog_type26aitoearn-backend.apps.aitoearn-ai.src.core.ai.chat.chat_service27aitoearn-backend.apps.aitoearn-ai.src.core.ai.image.image_service28aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.grok.grok_service29aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.openai.openai_service30aitoearn-backend.apps.aitoearn-server.src.core.channels.platforms.platforms_registry31aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-state_service32aitoearn-web.src.api.channels.channel_types33aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video_service34aitoearn-backend.apps.aitoearn-server.src.core.channels.accounts.account_service35aitoearn-backend.apps.aitoearn-server.src.core.channels.auth.auth_service36aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.flows.publish-flow_service37aitoearn-backend.apps.aitoearn-ai.src.core.ai.video.video-task-status_scheduler38aitoearn-backend.apps.aitoearn-ai.src.core.draft-generation.draft-generation_service39aitoearn-backend.apps.aitoearn-server.src.core.channels.publish.tasks.publish-task_service401118242111213122111126111153111111112111111117131011211111112111411111511111111111111111110121+1065 more modules (most-connected shown)

At a glance — Code Health · 49.0 · Weak · gated by D2, R10, X4 ·

At a glance — Architecture · 70.4 · Adequate · gated by R9 ·

At a glance — Maturity · 60.1 · Adequate · gated by M2 ·

At a glance — Readiness · 22.5 · Critical · gated by D14, R8, P3, P5, P7 ·

At a glance — Security · 35.2 · Weak · gated by D28, D29, D36 ·

At a glance — Domain Modelling · 100.0 · Exemplary ·

At a glance — Accessibility · 42.9 · Weak · gated by AC4 ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection163High / Critical
A03:2025 — Software Supply Chain Failures140High / Critical
A07:2025 — Authentication Failures43High / Critical
A02:2025 — Security Misconfiguration26High / Critical

Roadmap

Top priorities: Resolve the 16 Banned license finding(s) in License Compliance — start with REDACTED (14), REDACTED (2); Resolve the 9 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (9); Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8).

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

Do thisHelpsEffortDimension
Resolve the 9 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (9).+7.5 ptsLowDependency Hygiene
Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8).+7.0 ptsLowDependency Hygiene
Resolve the 16 Banned license finding(s) in License Compliance — start with REDACTED (14), REDACTED (2).+9.6 ptsMediumLicense Compliance
Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.+3.7 ptsMediumSecurity & performance tooling
Resolve the 1 finding(s) in DR & Backup.+3.7 ptsMediumDR & Backup
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+3.7 ptsMediumDependency Hygiene
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 14 sites, not one: `project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:47` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:32` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/media.service.ts:75` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/app.module.ts:55` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-server/src/core/api-key/api-key.service.ts:56` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-webhook.provider.ts:83` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:475` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-webhook.provider.ts:118` (createHash("sha1")), and 6 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.+3.0 ptsMediumWeb-Security Posture
Resolve the 36 REDACTED finding(s) in Secrets (history) — start with REDACTED (9), REDACTED (4), REDACTED (4).+2.8 ptsMediumSecrets (history)

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.0SlopLicense Compliance: Banned license: ua-parser-js
REDACTED0.0SlopLicense Compliance: Banned license: @img/sharp-libvips-darwin-arm64
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.2SlopLicense Compliance: Banned license: country-state-city
REDACTED1.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.5SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.1SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.3SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED3.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.5MixedSecrets (history): REDACTED: REDACTED
project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts4.8MixedGod Classes: TooManyMethods: TwitterService
REDACTED4.8MixedSecrets (history): REDACTED: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

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

Critical — 291

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

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

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

Could not be resolved — 2

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

Methodology & how to trust this report

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

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

What we checked — 84 dimensions across the health lenses
D1D2D3D5D6D8D10D11D12D13D14D15D16D17D19D21D22D24D26D27D28D29D30D31D35D36D43AC1AC2AC3AC4AC5AC6AX1AX10AX3AX4AX6C2DM6DM9GD1IC1M1M2M3M4P1P10P2P3P4P5P6P7PF3R1R10R11R2R3R4R6R7R8R9S1X1X12X13X14X16X17X2X21X23X24X25X28X29X3X30X4X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e560-1651-754d-9ef0-0f191098e15e.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 24 test file(s) failed while being loaded here, so none of their cases ran (typically a native addon or generated module the package's install scripts build, which the analyzer's scripts-off install does not run). The 75 production file(s) those files import are unmeasured in this run, not untested, so their figures are left out of the per-file rows and the 59.3% whatever they read, rather than published as low coverage or counted toward the figure. You can widen what we reach: optional: commit the lcov report of a run where those test files load, and their modules are read from it.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D27 Navigability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Tracing effort is measured over resolved call sites, and all 584 sampled here came from .html/.js/.ts files. This repository's .tsx source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.constants.ts`, `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-publish.provider.ts`, `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.constants.ts`, `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.constants.ts`, `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/google-business/google-business.constants.ts`, … (+25 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D34 Knowledge Freshness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. File-level freshness contradicts repo activity: 45 commits in the last 90 days, yet 648 of 665 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
  • AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
  • AC4 Keyboard semantics — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 18 further occurrence(s) are not listed individually; the score already reflects all 58.
  • AC6 Visual & motion safety — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 30 further occurrence(s) are not listed individually; the score already reflects all 70.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DockerCompose (REDACTED). compose up failed (exit 15 — the compose project is invalid) — error while interpolating services.aitoearn-init.environment.JWT_SECRET: required variable JWT_SECRET is missing a value: Set JWT_SECRET to the same random key as backend auth.secret; runtime evidence skipped.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 584 further occurrence(s) are not listed individually; the score already reflects all 624.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 253 further occurrence(s) are not listed individually; the score already reflects all 293.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 43 further occurrence(s) are not listed individually; the score already reflects all 83.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 639 further occurrence(s) are not listed individually; the score already reflects all 679.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 300 further occurrence(s) are not listed individually; the score already reflects all 340.
  • R8 Dependency Hygiene — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 66 further occurrence(s) are not listed individually; the score already reflects all 106.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2 further occurrence(s) are not listed individually; the score already reflects all 42.

Repo exclusion declarations: 18 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • 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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run 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 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.3 / 10Weak✓ Tool-verified

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

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

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

164 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was useAiBatchGenerateBarController.useAiBatchGenerateBarController at 200. A further 4 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being BilibiliPlatformException.policyFromPlatformCode at 120 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.exception.ts (BilibiliPlatformException.policyFromPlatformCode at 120), project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx (index.PrimitiveField at 21), project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.exception.ts (DouyinPlatformException.policyFromPlatformCode at 18). 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.

aitoearn-bridge.handleMessage (cyclomatic 25) · ×5skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173
aitoearn-bridge.post (cyclomatic 16) · ×5skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107
index.ActionCard::getActionConfig (cyclomatic 26) · ×2project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:94
useAiBatchGenerateBarController.useAiBatchGenerateBarController (cyclomatic 200)project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:61
usePubParamsVerify.usePubParamsVerify.errParamsMap (cyclomatic 147)project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with useAiBatchGenerateBarController.useAiBatchGenerateBarController (cyclomatic 200), usePubParamsVerify.usePubParamsVerify.errParamsMap (cyclomatic 147). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 4.3 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity3.0 / 10Weak✓ Tool-verified

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

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

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

202 method(s) exceeded the cognitive complexity threshold of 15; the worst was usePubParamsVerify.usePubParamsVerify.errParamsMap at 258.

aitoearn-bridge.handleMessage (cognitive 38) · ×5skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173
aitoearn-bridge.process.stdin.on("data") (cognitive 26) · ×5skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:233
aitoearn-bridge.post (cognitive 18) · ×5skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107
index.ActionCard::handleClick (cognitive 24) · ×2project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:224
usePubParamsVerify.usePubParamsVerify.errParamsMap (cognitive 258)project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with usePubParamsVerify.usePubParamsVerify.errParamsMap (cognitive 258), useAiBatchGenerateBarController.useAiBatchGenerateBarController (cognitive 226). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 3.0 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D3 · God Classes6.3 / 10Adequate✓ Tool-verified

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

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

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

168 god class(es) detected.

FunctionTooLong: useAiBatchGenerateBarController.useAiBatchGenerateBarController · ×107project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:61
FileTooLong: hooks/useAiBatchGenerateBarController.ts · ×24project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts
ClassTooLong: useAiBatchGenerateBarController · ×17project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1
TooManyMethods: PublishRecordRepository · ×13project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:34
MethodTooLong: PublishFlowService.createFlowRecords · ×7project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/flows/publish-flow.service.ts:78

What to do

  1. Resolve the 107 FunctionTooLong finding(s) in God Classes — start with REDACTED (41), page.tsx (6), usePubParamsVerify.tsx (2). — One of this dimension's main actionable groups (107 warning-level).
  2. Resolve the 24 FileTooLong finding(s) in God Classes — start with REDACTED (3), useAiBatchGenerateBarController.ts, draft-generation.service.ts. — One of this dimension's main actionable groups (24 warning-level).
  3. Resolve the 17 ClassTooLong finding(s) in God Classes — start with useAiBatchGenerateBarController.ts, draft-generation.service.ts, RecordCore.tsx. — One of this dimension's main actionable groups (17 warning-level).

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

D5 · Coupling9.2 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

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

Off the main sequence: @yikart/aws-s3 · ×2
Off the main sequence: @yikart/common · ×2

What to do

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

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

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

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

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

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

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

2 of 214 classes have LCOM4 above 3.

Low cohesion: TwitterService (LCOM4 4) · ×2project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:25

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with twitter.service.ts, content.mcp.controller.ts. — One of this dimension's main actionable groups (2 warning-level).

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

D8 · Code Coverage9.2 / 10Stronggated by 95 serious findings✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

Line coverage 59.3% — 95 file(s) below 50%. Measured from the JavaScript/TypeScript suite (vitest + @vitest/coverage-v8 via `pnpm install --frozen-lockfile --ignore-scripts` in project/aitoearn-backend/, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.

Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/common/guards/rate-limit.guard.ts · ×95project/aitoearn-backend/apps/aitoearn-server/src/common/guards/rate-limit.guard.ts:1

What to do

  1. Resolve the 95 Low coverage finding(s) in Code Coverage — start with REDACTED (2), rate-limit.guard.ts, server-redis-keys.ts. — One of this dimension's main actionable groups (95 warning-level).

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

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

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

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

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

0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 914 tests.

Mock-dominated test: acks messages without invoking handlers when the topic does not match · ×60project/aitoearn-backend/libs/redis/src/event-stream.explorer.spec.ts:95

✓ On the Gold path — maintain.

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

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.

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

0 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `pnpm install --frozen-lockfile --ignore-scripts` in project/aitoearn-backend/ (766 tests)): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene4.8 / 10Weak✓ Tool-verified

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

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

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

135 outdated direct production npm dependency(ies) of 183 graded, 1 pinning defect(s), across 16 REDACTED (16 of them the product) and 2 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 6 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry 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, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: image-size · ×8REDACTED:42
One package at two majors across the workspace: zod
Outdated (npm): @nestjs/axios · ×9REDACTED:16
Deprecated: glob · ×6REDACTED:5469
Outdated (npm): @ai-sdk/google · ×126

What to do

  1. Resolve the 9 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (9). — One of this dimension's main actionable groups (9 recommendation-level).
  2. Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 1 One package at two majors across the workspace finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance0.0 / 10Critical✓ Tool-verified

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

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

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

16 of 1335 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1335 package(s) this repository's committed lockfile installs for a consumer — its 183 production, optional and peer dependency(ies), across 16 product REDACTED manifest(s), and everything those install in turn. Its 82 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 4 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules). This repository publishes itself under MIT / Proprietary, which is its own choice and is not judged here.

Banned license: @img/sharp-libvips-darwin-arm64 · ×16REDACTED:2247

What to do

  1. Resolve the 16 Banned license finding(s) in License Compliance — start with REDACTED (14), REDACTED (2). — One of this dimension's main actionable groups (16 issue-level).

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

D15 · Churn × Complexity Hotspots10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

Top hotspots: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts (2×21=42) Repeated repair below the complexity floor: project/aitoearn-backend/libs/assets/src/video-metadata.service.ts (3 of 3 changes were fixes)

Hotspot: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.tsproject/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:58
Repeated repair: project/aitoearn-backend/libs/assets/src/video-metadata.service.tsproject/aitoearn-backend/libs/assets/src/video-metadata.service.ts:49

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with publish-task.service.ts. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Repeated repair finding(s) in Churn × Complexity Hotspots — start with video-metadata.service.ts. — One of this dimension's main actionable groups (1 warning-level).

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

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.

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

12 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts. Counted over 664 of the 1447 production source files in this repository: 782 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D17 · Explicit Debt10.0 / 10Stronggated by 8 serious findings✓ Tool-verified

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

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

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

8 deducted task-comment markers across 166388 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 · ×5project/aitoearn-web/src/store/plugin/plats/douyin/index.ts:254
XxxComment · ×3project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1894

What to do

  1. Resolve the 5 TodoComment finding(s) in Explicit Debt — start with REDACTED (2), UnifiedChannelSpaceList.tsx, sse-ping.service.ts. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 3 XxxComment finding(s) in Explicit Debt — start with volcengine.interface.ts, drama-recap.mcp.ts, style-transfer.mcp.ts. — One of this dimension's main actionable groups (3 warning-level).

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

D19 · Documentation Quality6.2 / 10Adequate✓ Tool-verified

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

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

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

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

Documentation: no build, run or usage example · ×10project/aitoearn-backend/libs/aitoearn-ai-client/README.md:1

What to do

  1. Resolve the 10 Documentation finding(s) in Documentation Quality — start with README.md (10). — One of this dimension's main actionable groups (10 recommendation-level).

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

D21 · Naming Consistency9.3 / 10Exemplary✓ Tool-verified

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

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

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

15 naming inconsistencies among 2194 declarations measured against a convention their peers follow.

`baseURL` spells `URL` where 380 names in the project spell it `Url` · ×10project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.exception.ts:296
`FancyTextID` spells `ID` where 1708 names in the project spell it `Id`project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1917
`FontID` spells `ID` where 1708 names in the project spell it `Id`project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1919
`formatJSON` spells `JSON` where 28 names in the project spell it `Json`project/aitoearn-web/src/components/Chat/ChatMessage/ToolDetailModal.tsx:33
`buildPromptForAPI` spells `API` where 88 names in the project spell it `Api`project/aitoearn-web/src/store/agent/utils/buildPrompt.ts:58

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

✓ On the Gold path — maintain.

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

D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged

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

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

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

0 API inconsistencies among 635 exposed members measured against a convention their peers follow.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D24 · Comment Value2.8 0.3 / 10Critical✓ Tool-verified

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

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

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

20 of 277 judged comments only repeat the code they sit on (7.2 %). 3786 comment(s) in another language or script were not judged.

redundant comment · ×10project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.vo.ts:106
doc comments repeat the names · ×5project/aitoearn-backend/libs/mongodb/src/repositories/account.repository.ts:188

What to do

  1. Resolve the 10 redundant comment finding(s) in Comment Value — start with mcp-sse.service.ts (3), mcp-streamable-http.service.ts (2), agent.vo.ts. — One of this dimension's main actionable groups (10 recommendation-level).

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

D26 · Project Cohesion7.0 / 10Strong✓ Tool-verified

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

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

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

3 of 20 build units (npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×3REDACTED:1

What to do

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

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

56 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated. Measured over the .html/.js/.ts source only — this repository's .tsx was not sampled for call sites, so this score covers part of the tree, not all of it.

Pass-through layer · ×2project/aitoearn-backend/apps/aitoearn-server/src/core/content/material-group.service.ts:7

✓ On the Gold path — maintain.

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

D28 · Secrets (history)0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

163 finding(s): 0 critical, 42 high, 121 medium, 0 low. 25 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 41 file(s) — `project/aitoearn-backend/.ai/mcp/mcp.json`, `project/aitoearn-backend/.claude/instincts/commit-convention.yaml`, `project/aitoearn-backend/.claude/instincts/dto-vo-pattern.yaml`, `project/aitoearn-backend/.claude/instincts/exception-handling.yaml`, `project/aitoearn-backend/.claude/instincts/nestjs-layering.yaml`, … (+36 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 6 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

133 finding(s): 12 critical, 93 high, 22 medium, 6 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 92 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (47), REDACTED (45). — One of this dimension's main actionable groups (92 issue-level).
  2. Resolve the 11 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED (5). — One of this dimension's main actionable groups (11 issue-level).
  3. Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security4.8 / 10Weak✓ Tool-verified

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

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

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

26 finding(s): 0 critical, 11 high, 15 medium, 0 low.

REDACTED
REDACTED

What to do

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

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×6) — project/aitoearn-web/.agents/skills/impeccable/scripts/detector/detect-antipatterns-browser.js:310, project/aitoearn-web/.agents/skills/impeccable/scripts/detector/detect-antipatterns-browser.js:1166, project/aitoearn-web/.agents/skills/impeccable/scripts/detector/rules/checks.mjs:596, …
  • Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). (×3) — project/aitoearn-web/src/app/[lng]/ai-social/components/PromptGallery/components/VideoDetailModal.tsx:84, project/aitoearn-web/src/components/common/MediaPreview/index.tsx:516, project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:142
  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushCanvas.tsx:85

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels5.2 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×5) — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:825, project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530, project/aitoearn-web/src/app/layout/MobileNav/index.tsx:51, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:855
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:2806
  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×15) — project/aitoearn-web/src/app/[lng]/tasks-history/TasksHistoryPageContent.tsx:217, project/aitoearn-web/src/app/layout/LayoutSidebar/components/LogoSection.tsx:35, project/aitoearn-web/src/app/layout/LayoutSidebar/components/LogoSection.tsx:53, …
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×7) — project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigJsonPanel/index.tsx:271, project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterPollSection.tsx:154, project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:339, …
  • This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — project/aitoearn-web/src/app/layout/SettingsModal/tabs/GeneralTab.tsx:125, project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:661, project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterBaseSection.tsx:43, …
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:176
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. — project/aitoearn-web/src/components/Chat/ChatInput/index.tsx:232
  • This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. — project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:138
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:141, project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:179, project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:194, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.0 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×5) — project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:2, project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:2, project/aitoearn-web/src/app/healthz/layout.tsx:10, …
  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×3) — project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:395, project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:652, project/aitoearn-web/src/app/[lng]/websit/plugin-update-docs/PluginUpdateDocsContent.tsx:379
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — project/aitoearn-web/src/app/healthz/page.tsx:3

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.7 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0". (×2) — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:825, project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:9787
  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×30) — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530, project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountItem.tsx:24, project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx:75, …
  • This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — project/aitoearn-web/src/app/layout/LayoutSidebar/components/UserDropdownMenu.tsx:245
  • A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×3) — project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:147, project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:208, project/aitoearn-web/src/components/ChannelManager/components/SpaceItem.tsx:113
  • This <div> announces itself as a role="separator" and is operated by pointerdown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds). — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:386
  • This <img> binds mousedown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — project/aitoearn-web/src/components/common/MediaPreview/index.tsx:473
  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. (×2) — project/aitoearn-web/src/components/common/WechatBrowserOverlay/index.tsx:48, project/aitoearn-web/src/components/common/WechatBrowserOverlay/index.tsx:119

What to do

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

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety4.2 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.loading` moves (`animation: spin 0.9s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:227
  • `.checkmark` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/select-accounts.ejs:204
  • `.container` moves (`animation: fadeIn 0.5s ease-out`) 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. (×2) — project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:33, project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:33
  • `.task-id` sets color: #667eea on background-color: white — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:113, project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:114
  • `.status[class*="running"]` sets color: #1976d2 on background-color: #e3f2fd — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:131, project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:133
  • `.status[class*="requires"]` sets color: #e65100 on background-color: #fff3e0 — 3.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:141, project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:143
  • <div> moves — its `animate-[fadeIn_0.2s_ease-out]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530
  • <div> moves — its `animate-[tipFadeIn_0.3s_ease-out]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:542
  • This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:743
  • <div> moves — its `animate-[spin_40s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:250
  • <div> moves — its `animate-[spin_30s_linear_infinite_reverse]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:253
  • <div> moves — its `animate-[spin_20s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:259
  • <div> moves — its `animate-[spin_30s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:307
  • <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×6) — project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:159, project/aitoearn-web/src/components/ChannelManager/components/AuthLoadingPage.tsx:198, project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:69, …
  • <svg> moves — its inline style sets `animation: shortlink-spin 1s linear infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/app/shortLink/page.tsx:60
  • <div> moves — its inline style sets `animation: bounceDots 1.4s ease-in-out infinite both` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:494, project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:502, project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:510
  • <span> moves — its inline style sets `animation: thinkingGlow 1.8s ease-in-out infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:521
  • <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×3) — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:585, project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:589, project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:593
  • <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushToolbar.tsx:196
  • <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2). — project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:365
  • <div> moves — its inline style sets `animation: shrink ${item.duration}ms linear forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. — project/aitoearn-web/src/components/ui/NotificationCenter.tsx:331
  • <svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:. (×2) — project/aitoearn-web/src/components/ui/button.tsx:62, project/aitoearn-web/src/components/ui/spin.tsx:28
  • `.textarea:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PromptEditorDialog/PromptEditorDialog.module.scss:18
  • `.editorContent` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:12
  • `.mentionChipFocused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:46
  • `.menuItem` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:158

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.
AX1 · Captive dependencies10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether any singleton service captures a scoped/transient dependency — a silent lifetime/threading bug.

Method: Roslyn scan: DI registrations parsed from AddSingleton/Scoped/Transient; each singleton checked for captured shorter-lifetime dependencies. Exhaustive, deterministic.

AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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

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

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

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

  • `ToolBarInlineActions` declares 16 required operations: `onDraftModeChange`, `onContentTypeChange`, `onVideoModelsChange`, `onVideoModelSelectionModeChange`, `onVideoModelParamChange`, `onResolutionChange`, `onAspectRatioChange`, `onDurationChange`, `onQuantityChange`, `onImageModelsChange`, `onImageModelSelectionModeChange`, `onImageCountChange`, `onImageSizeChange`, `onPlatformsChange`, `onMoreOptionsChange`, `onSubmit`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/types/base.ts:7

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
C2 · Access Controls7.0 / 10Strong✓ Tool-verified

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

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

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

What to do

  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
DM6 · Domain ↔ infrastructure boundary10.0 / 10Exemplary✓ Tool-verified

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

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

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

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

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.

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

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.

IC1 · Incompleteness & stubs6.6 / 10Adequate✓ Tool-verified

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.

  • `AiAvailabilityService` has 3 unfinished members out of 5 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:13
  • `recordSuccess` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:29
  • `recordFailure` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:33
  • `recordAsyncComplete` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:37
  • The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — REDACTED:357
  • `saveConfig` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/models-config/models-config.service.ts:15
  • `revokeToken` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:140
  • The guard above `return 'text-primary';` also returns `'text-primary'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalSummary/index.tsx:42
  • The guard above `return 'bg-gradient-back text-gradient-foreground';` also returns `'bg-gradient-back text-gradient-foreground'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarHolidayBadge/index.tsx:64
  • `isPlatformAvailable` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — project/aitoearn-web/src/app/config/platConfig.ts:67
  • The guard above `return accountGroupList;` also returns `accountGroupList`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:227
  • Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×3) — project/aitoearn-web/src/components/PublishDialog/compoents/DouyinLaunchModal/index.tsx:64, project/aitoearn-web/src/components/PublishDialog/compoents/PublishDatePicker/DateTimePicker.tsx:232, project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:589
  • `execute` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×6) — project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:291, project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:311, project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:410, …
  • `handleErrorMessage` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:297
  • The guard above `return 'cloudflare';` also returns `'cloudflare'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — project/aitoearn-web/src/utils/oss.ts:73

What to do

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

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

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

What to do

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

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

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

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

What to do

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

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

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

M4 · Documentation accuracy6.0 / 10Adequate✓ Tool-verified

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

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

  • project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/docs/WEB_API.md`, but `project/aitoearn-web/src/demo/docs/WEB_API.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — project/aitoearn-web/src/store/plugin/docs/README.md:420
  • project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/PublishType/`, but `project/aitoearn-web/src/demo/PublishType` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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. — project/aitoearn-web/src/store/plugin/docs/README.md:421

What to do

  • Reconcile the README with reality: project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/docs/WEB_API.md`, but `project/aitoearn-web/src/demo/docs/WEB_API.md` does not exist; project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/PublishType/`, but `project/aitoearn-web/src/demo/PublishType` does not exist.
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified

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

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

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability9.8 / 10Exemplary✓ Tool-verified

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

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

  • Only 15/16 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `project/aitoearn-web`.

What to do

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

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

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

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 6 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. — REDACTED:4
  • `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:5

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — 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.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

  • A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

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

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

  • `fetch(` 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. — project/aitoearn-backend/libs/common/src/loggers/feishu.logger.ts:30

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • `fs.readFileSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:66, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:313
  • `fs.existsSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:69, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:316
  • `fs.unlinkSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:70, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:317
  • `fs.existsSync` in `uploadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:923
  • `fs.readFileSync` in `uploadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:929
  • `fs.mkdirSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:961, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:970, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:987
  • `fs.writeFileSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×3) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:962, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:976, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:993
  • `fs.readFileSync` in `parseAgentIds` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1009
  • `fs.existsSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1028, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1036
  • `fs.readFileSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1030, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1041
  • `fs.readdirSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1037
  • `readFileSync` in `get` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — skills/dsh-plugin-aitoearn/lib/index.js:58

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.9 / 10Exemplary✓ Tool-verified

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

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

R10 · Code Duplication3.5 / 10Weak✓ Tool-verified

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

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

  • skills/qwen-skill-aitoearn/aitoearn/ and skills/qwenwork-plugin-aitoearn/skills/aitoearn/ are near-verbatim copies of each other: 56 files are byte-identical under the same relative paths (~7125 lines; the trees hold 56 and 56 files). That is one structural fact, not 56 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/qwen-skill-aitoearn/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/codex-plugin-aitoearn/ and skills/dsh-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 61 and 62 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/codex-plugin-aitoearn/ and skills/qwenwork-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 61 and 60 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/codex-plugin-aitoearn/skills/aitoearn/ and skills/qwen-skill-aitoearn/aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 56 and 56 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/dsh-plugin-aitoearn/ and skills/qwenwork-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 62 and 60 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/dsh-plugin-aitoearn/skills/aitoearn/ and skills/qwen-skill-aitoearn/aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 56 and 56 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/codex-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/dsh-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/qwen-skill-aitoearn/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/qwen-skill-aitoearn/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • skills/qwenwork-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place. — skills/qwenwork-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1
  • 136 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/ have copies in at least two of the sibling directories bilibili, douyin, facebook, google-business, instagram, kwai (+8 more sibling(s) not listed) — 99 of them are reported below, and 37 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 136 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 136 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 136 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10
  • 43 duplicated blocks under project/aitoearn-web/src/ have copies in at least two of the sibling directories api, app, components, hooks, store — 21 of them are reported below, and 22 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 43 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 43 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 43 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. — project/aitoearn-web/src/app/[lng]/ai-social/components/TaskPreview/components/MediaPreviewCard/index.tsx:28
  • 30 duplicated blocks under project/aitoearn-backend/ have copies in at least two of the sibling directories apps, libs — 10 of them are reported below, and 20 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 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 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 30 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.dto.ts:9
  • 26 duplicated blocks under project/aitoearn-backend/libs/ have copies in at least two of the sibling directories aitoearn-ai-shared, aitoearn-auth, aitoearn-queue, aitoearn-server-shared, ali-oss, aws-s3 (+7 more sibling(s) not listed) — 11 of them are reported below, and 15 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 26 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 26 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 26 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. — project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1
  • 25 duplicated blocks under project/aitoearn-backend/apps/ have copies in at least two of the sibling directories aitoearn-ai, aitoearn-server — 6 of them are reported below, and 19 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 25 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 25 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 25 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. — project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:35
  • 23 duplicated blocks under project/aitoearn-web/src/components/ have copies in at least two of the sibling directories ChannelManager, Chat, Plugin, PublishDialog, draft-box, ui — 11 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 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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. — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236
  • 20 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/channels/ have copies in at least two of the sibling directories accounts, analytics, auth, engagement, mcp, platforms (+4 more sibling(s) not listed) — 13 of them are reported below, and 7 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/analytics/analytics.service.ts:113
  • 11 duplicated blocks under project/aitoearn-web/src/app/[lng]/ have copies in at least two of the sibling directories accounts, agent-assets, ai-social, auth, chat, draft-box (+2 more sibling(s) not listed) — 4 of them are reported below, and 7 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. — project/aitoearn-web/src/app/[lng]/tasks-history/page.tsx:14
  • 11 duplicated blocks under project/aitoearn-web/src/app/[lng]/websit/ have copies in at least two of the sibling directories data-deletion, data-protection-agreement, extension-privacy-policy, plugin-guide, plugin-update-docs, privacy-policy (+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. — project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:192
  • 10 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/ have copies in at least two of the sibling directories aideo, assets, chat, image, libs, logs (+1 more sibling(s) not listed) — 4 of them are reported below, and 6 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.controller.ts:31
  • 10 duplicated blocks under project/aitoearn-web/src/components/draft-box/components/ have copies in at least two of the sibling directories AiBatchGenerateBar, AllListSection, BatchActionBar, CreateMaterialModal, CreatePlanModal, DraftListToolbar (+7 more sibling(s) not listed) — 6 of them are reported below, and 4 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177
  • 9 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/ have copies in at least two of the sibling directories dashscope, grok, openai, relay, volcengine — 7 of them are reported below, and 2 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 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 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 9 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/grok/grok.service.ts:120
  • 8 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/ have copies in at least two of the sibling directories api-key, channels, content, publish-record, user — 4 of them are reported below, and 4 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 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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. — REDACTED:10
  • 7 duplicated blocks under project/aitoearn-web/src/components/PublishDialog/compoents/ have copies in at least two of the sibling directories AccountSelector, DesktopPublishContent, PlatParamsSetting, PubParmasTextarea, mobile — 4 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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. — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337
  • 6 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ have copies in at least two of the sibling directories agent, ai, draft-generation — 1 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:94
  • project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177 · project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:83 — the two spans are one implementation copied and then locally edited — 1500 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. — project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177
  • project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:51 · project/aitoearn-web/src/app/[lng]/tasks-history/components/VideoHistoryModal/index.tsx:26 — the two spans are one implementation copied and then locally edited — 1057 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. — project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:51
  • skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · +1 more site(s) not listed — these 5 files are line-for-line copies of one another — 177 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. — skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25
  • project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236 · project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:116 — the two spans are one implementation copied and then locally edited — 922 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. — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236
  • project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337 · project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:267 — the two spans are one implementation copied and then locally edited — 876 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. — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337
  • project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:39 · project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx:27 — the two spans are one implementation copied and then locally edited — 972 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. — project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:39
  • project/aitoearn-web/src/store/agent/task-instance/message.handler.ts:14 · project/aitoearn-web/src/store/agent/utils/message.ts:80 — the two spans are one implementation copied and then locally edited — 836 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. — project/aitoearn-web/src/store/agent/task-instance/message.handler.ts:14
  • project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/drama-recap.service.ts:27 · project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/video-style-transfer.service.ts:27 — the two spans are one implementation copied and then locally edited — 690 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/drama-recap.service.ts:27
  • project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:49 · project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/PhoneLoginForm.tsx:37 — the two spans are one implementation copied and then locally edited — 691 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. — project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:49
  • project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1 · project/aitoearn-backend/libs/mongodb/src/schemas/engagement.task.schema.ts:1 — these 2 files are line-for-line copies of one another — 108 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. — project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-work.provider.ts:9 — the two spans are one implementation copied and then locally edited — 552 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.module.ts:19 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.module.ts:19 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.module.ts:19 — the 3 copies are spread across 3 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.module.ts:19
  • project/aitoearn-web/src/components/ui/date-picker/index.tsx:42 · project/aitoearn-web/src/components/ui/date-range-picker/index.tsx:54 — the two spans are one implementation copied and then locally edited — 540 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — project/aitoearn-web/src/components/ui/date-picker/index.tsx:42
  • project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:51 · project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalSummary/index.tsx:65 — the two spans are one implementation copied and then locally edited — 442 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. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:51
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.service.ts:54 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.service.ts:55 — the two spans are one implementation copied and then locally edited — 373 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.service.ts:54

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.
R11 · Import Boundaries9.9 / 10Exemplary✓ Tool-verified

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.

  • project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/claude-code-router/claude-code-router.service.ts:58 imports @musistudio/claude-code-router/dist/cli.js, 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/claude-code-router/claude-code-router.service.ts:58
  • project/aitoearn-backend/libs/common/src/utils/zod-openapi.util.ts:3 imports @nestjs/swagger/dist/services/schema-object-factory, 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. — project/aitoearn-backend/libs/common/src/utils/zod-openapi.util.ts:3

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity6.0 / 10Adequate✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • (anonymous) has cyclomatic complexity 146 and cognitive complexity 265; 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. — project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264
  • (anonymous) has cyclomatic complexity 59 and cognitive complexity 108; 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. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useLocalUploadHandler.ts:67
  • (anonymous) has cyclomatic complexity 56 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:256
  • RecordContent has cyclomatic complexity 54 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:700
  • (top-level) has cyclomatic complexity 53 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:8
  • migrate has cyclomatic complexity 49 and cognitive complexity 94; 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. — project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:329
  • (anonymous) has cyclomatic complexity 39 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 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. — project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:61
  • (anonymous) has cyclomatic complexity 38 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:728
  • ConfigManagerDialog has cyclomatic complexity 37 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:207
  • validatePublishContent has cyclomatic complexity 33 and cognitive complexity 30; 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:36
  • processAideoTask has cyclomatic complexity 32 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:135
  • (anonymous) has cyclomatic complexity 32 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:81
  • applyGenerationParams has cyclomatic complexity 32 and cognitive complexity 30; 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. — project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:221
  • (anonymous) has cyclomatic complexity 32 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/draft-box/components/GenerationParamsCard/index.tsx:226
  • (anonymous) has cyclomatic complexity 32 and cognitive complexity 26; 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. — project/aitoearn-web/src/components/draft-box/components/GenerationDetailDialog/index.tsx:104
  • ChatMessage has cyclomatic complexity 32 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. — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:357
  • (anonymous) has cyclomatic complexity 31 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1155
  • (anonymous) has cyclomatic complexity 31 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/draft-box/components/GeneratingCard/index.tsx:109
  • getMaterialValidationIssues has cyclomatic complexity 30 and cognitive complexity 43; 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. — project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useMaterialValidation.ts:56
  • categoryFromMetaGraphError has cyclomatic complexity 30 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/meta-graph-error.util.ts:23
  • (anonymous) has cyclomatic complexity 29 and cognitive complexity 52; 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. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchSubmitHandler.ts:108
  • createFromRequest has cyclomatic complexity 29 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:49
  • (anonymous) has cyclomatic complexity 29 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:206
  • (anonymous) has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:176
  • transformToWorkDetail has cyclomatic complexity 29 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. — project/aitoearn-web/src/store/plugin/plats/douyin/workDetail.ts:62
  • (anonymous) has cyclomatic complexity 28 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 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. — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:96
  • pollTask has cyclomatic complexity 27 and cognitive complexity 47; 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. — project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:95
  • processResultMessage has cyclomatic complexity 27 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:513
  • (anonymous) has cyclomatic complexity 27 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:86
  • (anonymous) has cyclomatic complexity 27 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. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:260
  • NavItem has cyclomatic complexity 27 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. — project/aitoearn-web/src/app/layout/LayoutSidebar/components/NavSection.tsx:47
  • PlatformTaskCard has cyclomatic complexity 27 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:356
  • (anonymous) has cyclomatic complexity 26 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:250
  • callFunction has cyclomatic complexity 26 and cognitive complexity 26; 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:102
  • (anonymous) has cyclomatic complexity 26 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:94
  • (anonymous) has cyclomatic complexity 25 and cognitive complexity 30; 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. — project/aitoearn-web/src/store/plugin/store.ts:1081
  • (anonymous) has cyclomatic complexity 25 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:204
  • categoryFromGoogleApiError has cyclomatic complexity 25 and cognitive complexity 15; 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/google-api-error.util.ts:48
  • (anonymous) has cyclomatic complexity 24 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:82
  • handleMessage has cyclomatic complexity 24 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173
R3 · Large Files7.6 / 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.

  • project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts has 1615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1
  • project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts has 1247 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:1
  • project/aitoearn-web/src/store/plugin/store.ts has 1115 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/store/plugin/store.ts:1
  • project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx has 1081 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1
  • project/aitoearn-web/src/store/draft-box/planDetailStore.ts has 1006 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/store/draft-box/planDetailStore.ts:1
  • project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts has 933 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts has 918 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts has 906 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts has 900 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:1
  • project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts has 884 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts has 879 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts has 815 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:1
  • project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts has 798 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts:1
  • project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx has 796 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:1
  • project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx has 768 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:1
  • project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx has 712 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx:1
  • project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts has 707 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:1
  • project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx has 700 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts has 687 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts:1
  • project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx has 679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts has 661 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts:1
  • project/aitoearn-backend/libs/common/src/i18n/messages.ts has 660 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/libs/common/src/i18n/messages.ts:1
  • project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx has 644 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:1
  • project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx has 620 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts has 616 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts:1
  • project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:1
  • project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts has 615 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:1
  • project/aitoearn-web/src/store/agent/handlers/action.handlers.ts has 609 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts 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. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts:1
  • project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx has 577 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:1
  • project/aitoearn-web/src/components/Chat/utils/convertMessages.ts has 563 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:1
  • project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx has 561 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:1
  • project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx has 556 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:1
  • REDACTED has 554 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
  • project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts:1
  • project/aitoearn-web/src/components/common/MediaPreview/index.tsx has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/common/MediaPreview/index.tsx:1
  • project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx has 528 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:1
  • project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage4.4 / 10Weak✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1, project/aitoearn-web/src/store/plugin/store.ts:1, project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED 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: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code7.0 / 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 86 application, 70 tooling and 162 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 (86 application, 70 tooling, 162 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 (×34) — REDACTED, project/aitoearn-web/src/components/ui/date-range-picker/index.tsx, project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx, …
  • no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-backend/apps/aitoearn-server/src/common/utils/index.ts) — 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 (×2) — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts, project/aitoearn-backend/apps/aitoearn-server/src/common/utils/ip.util.ts
  • no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/platforms/douyin.api.ts) — 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 — project/aitoearn-web/src/api/platforms/douyin.types.ts
  • no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/channels/channel.server.ts) — 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 — project/aitoearn-web/src/api/_server/server-fetch.ts
  • no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/platforms/work.api.ts) — 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 — project/aitoearn-web/src/api/platforms/work.types.ts

What to do

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

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED. (×2) — project/aitoearn-backend/apps/aitoearn-ai/test/setup.ts:42, project/aitoearn-backend/libs/assets/src/adapters/ali-oss.adapter.ts:1
  • Imported but not declared in any reachable REDACTED — installs work only by hoisting accident. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:9
  • Declared in REDACTED 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. (×8) — REDACTED:22, REDACTED:23, REDACTED:28, …
  • Declared in REDACTED 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) — REDACTED:16, REDACTED:44, REDACTED:53
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — while scripts/init.mjs DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it. — REDACTED:45
  • Declared in REDACTED 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. (×4) — REDACTED:7, REDACTED:37, REDACTED:47, …
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — while project/aitoearn-backend/apps/aitoearn-ai/test/setup.ts DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it. — REDACTED:13
  • Declared in REDACTED but never imported anywhere in that package or its workspace members — while scripts/init.mjs DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it. — REDACTED:48
  • Declared in REDACTED 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. — REDACTED:22
  • Declared in REDACTED 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. (×18) — REDACTED:36, REDACTED:37, REDACTED:39, …

What to do

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

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts → project/aitoearn-backend/libs/common/src/utils/index.ts → project/aitoearn-backend/libs/common/src/utils/exception.util.ts → project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts (one verified cycle inside a mutually-dependent group of 6 files) — project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts:3
  • project/aitoearn-web/src/utils/request/index.ts → project/aitoearn-web/src/utils/request/client.ts → project/aitoearn-web/src/store/user/index.ts → project/aitoearn-web/src/api/auth/auth.api.ts → project/aitoearn-web/src/utils/request/index.ts (one verified cycle inside a mutually-dependent group of 20 files) — project/aitoearn-web/src/utils/request/index.ts:1
  • project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx → project/aitoearn-web/src/components/draft-box/components/DraftContentModule/index.tsx → project/aitoearn-web/src/components/PublishDialog/index.tsx → project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx → project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx:11
  • project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts → project/aitoearn-web/src/components/PublishDialog/usePublishDialogStorageStore.tsx → project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts — project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts:11

What to do

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

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. 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.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×14) — project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:47, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:32, project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/media.service.ts:75, …
  • `https://r.wdfl.co/rw.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. — project/aitoearn-web/src/app/[lng]/layout.tsx:81
  • 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 `nginx.conf` is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (−2.0 on this card.) — nginx/nginx.conf:66

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 14 sites, not one: `project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:47` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:32` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/media.service.ts:75` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/app.module.ts:55` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-server/src/core/api-key/api-key.service.ts:56` (createHash("sha1")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-webhook.provider.ts:83` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:475` (createHash("md5")), `project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-webhook.provider.ts:118` (createHash("sha1")), and 6 further site(s). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
  • 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.
X1 · Async correctness8.0 / 10Strong✓ Tool-verified

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.

  • The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. — project/aitoearn-web/src/utils/request/FetchService.ts:37

What to do

  • `async` Promise executor
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • `countModifiedLeafFields` is exported and takes `value: unknown` from its caller, and it calls itself at line 59 (`countModifiedLeafFields`) with a piece of `value` (and at line 73) — and nowhere in `countModifiedLeafFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `countModifiedLeafFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-web/src/app/layout/ConfigManagerDialog/utils/configFieldMeta.ts:59
  • `buildConfigSections` is exported, takes a document from its caller (line 119) and hands it to `hasConfiguredRelay`, which calls itself at line 95 (`hasConfiguredRelay`) with a piece of `value` (and at line 98) — and nowhere in `hasConfiguredRelay` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `hasConfiguredRelay` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-web/src/app/layout/ConfigManagerDialog/utils/configSections.ts:95
  • `toYamlTextResult` is exported, takes a document from its caller (line 41) and hands it to `normalizeYamlValue`, which calls itself at line 17 (`normalizeYamlValue`) with a piece of `value` (and at line 24) — and nowhere in `normalizeYamlValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `normalizeYamlValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-backend/libs/common/src/utils/mcp-response.util.ts:17
  • `serializeError` is exported, takes a document from its caller (line 3) and hands it to `pruneAxiosSocketData`, which calls itself at line 31 (`pruneAxiosSocketData`) with a piece of `value` (and at line 36) — and nowhere in `pruneAxiosSocketData` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `pruneAxiosSocketData` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-backend/libs/common/src/loggers/error.serializer.ts:31
  • `filterTree` is exported, takes a document from its caller (line 57) and hands it to `filter`, which calls itself at line 69 (`filter`) with a piece of `treeData` — and nowhere in `filter` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `filter` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/list2tree.util.ts:69
  • `deleteEmptyChildren` is exported and takes `arr: any` from its caller, and it calls itself at line 81 (`deleteEmptyChildren`) with a piece of `arr` — and nowhere in `deleteEmptyChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deleteEmptyChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/list2tree.util.ts:81

What to do

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

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

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

  • Only 13/45 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `createPublishImageFromMedia` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:343
  • `createPublishVideoFromMedia` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:364
  • `fetchLatestDownloadUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-web/src/app/config/appDownloadConfig.ts:57
  • `loadSharedTask` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-web/src/app/[lng]/chat/page.tsx:110
  • `serverFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-web/src/api/_server/server-fetch.ts:32
  • `write` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/libs/common/src/loggers/feishu.logger.ts:15
  • `putObjectFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. (×2) — project/aitoearn-backend/libs/aws-s3/src/s3.service.ts:62, project/aitoearn-backend/libs/ali-oss/src/ali-oss.service.ts:23
  • `pullMessages` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/libs/assets/src/r2-events.service.ts:41
  • `ackMessages` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/libs/assets/src/r2-events.service.ts:59
  • `uploadFileFromLocalUrl` 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 })`. (×2) — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-client.service.ts:39, project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/relay-media/relay-media-resolver.service.ts:140
  • `handleRelay` awaits `axios(…)` 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(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-exception.filter.ts:51
  • `appendMediaUpload` awaits `axios.post(…)` 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.post(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:287
  • `normalizeWorkLink` 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 })`. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:647
  • `resolveRedirectUrl` 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 })`. (×6) — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-work.provider.ts:154, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest-work.provider.ts:152, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/kwai/kwai-work.provider.ts:173, …
  • `resolveShortLink` 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 })`. — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/rednote/rednote-work.provider.ts:101
  • `urlToBlob` 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 })`. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:94
  • `getFileSizeFromUrl` awaits `axios.head(…)` 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.head(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:140
  • `getRemoteFileSize` awaits `axios.head(…)` 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.head(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:172
  • `getIpAddress` 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 })`. — project/aitoearn-backend/apps/aitoearn-server/src/common/utils/ip.util.ts:48
  • `downloadUrlAndUploadAsStream` 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 })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/upload.service.ts:173
  • `fetchImageAsBase64` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:203
  • `getUploadableByUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/image/image.service.ts:73
  • `loadImageFromUrl` 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 })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118
  • `getImageDimensions` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:81
  • `saveVideoFromFileName` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:133

What to do

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

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

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

X23 · Unguarded diagnostic materialisation7.0 / 10Strong✓ Tool-verified

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.

  • `debug` at line 57 is called with an argument built by `JSON.stringify(capabilities)` (line 58), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:57
  • `debug` at line 101 is called with an argument built by `JSON.stringify(body)` (line 102), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:101
  • `debug` at line 103 is called with an argument built by `map(i => i.Vid)` (line 108), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/aideo.service.ts:103
  • `debug` at line 47 is called with an argument built by `URLSets?.map(u => u.SourceUrl)` (line 50), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/upload.service.ts:47
  • `debug` at line 58 is called with an argument built by `Data?.map(d => d.JobId)` (line 59), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/upload.service.ts:58
  • `debug` at line 111 is called with an argument built by `images.reduce((sum, img) => sum + img.imageData.length, 0)` (line 113), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:111
  • `debug` at line 104 is called with an argument built by `videoInputs.map(v => (typeof v === 'string' ? v : v.type === 'stream' ? 'stream' : v.url))` (line 108), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch. — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:104

What to do

  • Each finding names the diagnostic call and the expression inside its argument whose cost scales with a collection. Confirm from the two that the argument is built before the call — that is JavaScript's evaluation order, not a guess — then put the construction behind the level check the logger offers (`if (logger.isLevelEnabled('debug'))` for pino and winston, `isDebugEnabled()` for log4js, the repository's own debug flag where it has one), or hand the logger the object and a format string (`logger.debug({ payload }, 'raw request')`) so the serialising happens only when the line is written. Moving the call is not the fix: it is the join/projection/stringify in the argument that is paid, wherever the call sits.
X24 · Document value interpolated into markup unescaped2.7 / 10Weak✓ 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.

  • `toJsStringLiteral(pageCallbackUrl)` is text this program did not author, and it is written into a script or style context through EJS's raw `<%- %>` output 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:312
  • `toJsStringLiteral(pageRedirectUri)` is text this program did not author, and it is written into a script or style context through EJS's raw `<%- %>` output 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:313

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.
X25 · Inert configuration knob7.5 / 10Strong✓ Tool-verified

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

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

  • `useToolBarDerivedData` accepts `duration` from the caller and keeps it in `duration` on line 13, where only it can read the value — but nothing ever reads `duration`. Setting `duration` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `duration` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `duration` from the accepted options so callers stop setting a knob that does nothing. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:13
  • `useToolBarDerivedData` accepts `inputVideoDuration` from the caller and keeps it in `inputVideoDuration` on line 16, where only it can read the value — but nothing ever reads `inputVideoDuration`. Setting `inputVideoDuration` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `inputVideoDuration` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `inputVideoDuration` from the accepted options so callers stop setting a knob that does nothing. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:16
  • `useToolBarDerivedData` accepts `videoResolutions` from the caller and keeps it in `videoResolutions` on line 26, where only it can read the value — but nothing ever reads `videoResolutions`. Setting `videoResolutions` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `videoResolutions` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `videoResolutions` from the accepted options so callers stop setting a knob that does nothing. — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:26
  • `useTaskPolling` accepts `options.onTaskUpdate` from the caller and keeps it in `onTaskUpdate` on line 50, where only it can read the value — but nothing ever reads `onTaskUpdate`. Setting `options.onTaskUpdate` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `onTaskUpdate` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `options.onTaskUpdate` from the accepted options so callers stop setting a knob that does nothing. — project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:50

What to do

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

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

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

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

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

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

X3 · Exception handling6.1 / 10Adequate✓ Tool-verified

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

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

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×37) — skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:67, skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:158, skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:67, …
  • `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — skills/dsh-plugin-aitoearn/lib/index.js:36
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×2) — project/aitoearn-web/src/store/account.ts:180, project/aitoearn-web/src/app/layout/shared/hooks/useGitHubStars.ts:37

What to do

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

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

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

X4 · Structured logging3.5 / 10Weak✓ Tool-verified

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

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

  • `log` at line 245 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/common/src/starter.ts:245
  • `log` at line 250 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/common/src/starter.ts:250
  • `log` at line 252 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/common/src/starter.ts:252
  • `debug` at line 64 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/common/src/interceptors/response.interceptor.ts:64
  • `verbose` at line 70 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.verbose({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.verbose('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/common/src/interceptors/response.interceptor.ts:70
  • `warn` at line 85 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:85
  • `log` at line 88 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:88
  • `warn` at line 150 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:150
  • `log` at line 154 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:154
  • `error` at line 69 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/decorators/queue-processor.decorator.ts:69
  • `error` at line 72 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — project/aitoearn-backend/libs/aitoearn-queue/src/decorators/queue-processor.decorator.ts:72

What to do

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

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

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

  • 20/21 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~1.0 `!` null assertions per 1k TypeScript source lines — 191 assertion(s) across the 187045 source line(s) of the 1402 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts (14), project/aitoearn-web/src/store/plugin/plats/douyin/index.ts (10), project/aitoearn-web/src/store/plugin/plats/xhs/index.ts (9). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

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

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health49.0Weak — gated by D2, R10, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture70.4Adequate — gated by R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity60.1Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness22.5Critical — gated by D14, R8, P3, P5, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security35.2Weak — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100.0ExemplaryStrongest area.
Accessibility42.9Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

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

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

  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • 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 15 — the compose project is invalid) — error while interpolating services.aitoearn-init.environment.JWT_SECRET: required variable JWT_SECRET is missing a value: Set JWT_SECRET to the same random key as backend auth.secret; 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 — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D25 ADR Conformance — no ADRs to check
  • D32 Data Compliance (PII/GDPR) — 30 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D34 Knowledge Freshness — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • 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.
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • 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
  • DM1 Aggregate boundaries — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM10 One transaction, one aggregate — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM2 Strongly-typed ids — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM3 Integration-event coupling — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM4 Rich vs anemic model — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM5 Encapsulated state — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • DM7 Repository granularity — not applicable: no DDD domain layer was detected (no aggregate, entity or value-object structure), so there is no domain model for this card to grade
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 396 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • 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 REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 291 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×92
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 67 more in this group — see findings.md.
D28 · Secrets (history) · REDACTED · ×36
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 11 more in this group — see findings.md.
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×34
  • Click handler on a non-interactive <div> project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:825 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
  • Click handler on a non-interactive <div> project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:9787 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabindex="0".
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountItem.tsx:24 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx:75 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/SpaceGroupItem.tsx:85 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:778 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1062 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/ai-social/components/HomeChat/index.tsx:296 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/ai-social/components/TaskPreview/components/MediaPreviewCard/index.tsx:35 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:148 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/layout/MobileNav/index.tsx:51 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:147 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:208 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/ChannelManager/components/SpaceItem.tsx:113 — A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/Chat/TaskCard/index.tsx:180 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/Plugin/PluginReady/PublishListTab.tsx:72 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/AccountSelector/index.tsx:137 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/AccountSelector/index.tsx:167 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/Choose/ImgChoose.tsx:85 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/ErrorSummary/index.tsx:103 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/index.tsx:161 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx:454 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx:485 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • Click handler on a non-interactive <div> project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextareaUpload.tsx:492 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
  • + 9 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D14 · License Compliance · Banned license · ×16
  • Banned license: @img/sharp-libvips-darwin-arm64 REDACTED:2247 — `@img/sharp-libvips-darwin-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-darwin-x64 REDACTED:2257 — `@img/sharp-libvips-darwin-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm REDACTED:2280 — `@img/sharp-libvips-linux-arm` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-arm64 REDACTED:2268 — `@img/sharp-libvips-linux-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-ppc64 REDACTED:2286 — `@img/sharp-libvips-linux-ppc64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-riscv64 REDACTED:2292 — `@img/sharp-libvips-linux-riscv64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-s390x REDACTED:2298 — `@img/sharp-libvips-linux-s390x` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linux-x64 REDACTED:2310 — `@img/sharp-libvips-linux-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-arm64 REDACTED:2322 — `@img/sharp-libvips-linuxmusl-arm64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-libvips-linuxmusl-x64 REDACTED:2334 — `@img/sharp-libvips-linuxmusl-x64` 1.2.4 is published on registry.npmjs.org under `LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-wasm32 REDACTED:2431 — `@img/sharp-wasm32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later AND MIT`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-arm64 REDACTED:2436 — `@img/sharp-win32-arm64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-ia32 REDACTED:2442 — `@img/sharp-win32-ia32` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: @img/sharp-win32-x64 REDACTED:2454 — `@img/sharp-win32-x64` 0.34.5 is published on registry.npmjs.org under `Apache-2.0 AND LGPL-3.0-or-later`, which this policy bans, and it is not declared by this repository but is installed by one of its production, optional or peer dependencies, as its committed lockfile resolves — a transitive dependency ships its licence just the same — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
  • Banned license: country-state-city REDACTED:94 — `country-state-city` 3.2.1 is published on registry.npmjs.org under `GPL-3.0`, which this policy bans, and it is a production, optional or peer dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
  • Banned license: ua-parser-js REDACTED:58 — `ua-parser-js` 2.0.10 is published on registry.npmjs.org under `AGPL-3.0-or-later`, which this policy bans, and it is a production, optional or peer dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
AC2 · Forms & labels · <button> with no accessible text · ×15
  • <button> with no accessible text project/aitoearn-web/src/app/[lng]/tasks-history/TasksHistoryPageContent.tsx:217 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/app/layout/LayoutSidebar/components/LogoSection.tsx:35 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/app/layout/LayoutSidebar/components/LogoSection.tsx:53 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/app/layout/MobileNav/components/MobileTopBar.tsx:44 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:130 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:185 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:214 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:121 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushToolbar.tsx:116 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/common/MediaPreview/index.tsx:565 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ImageStack/components/DesktopImageStack/index.tsx:68 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ImageStack/components/MediaStackCard/index.tsx:98 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ImageStack/components/MobileImageStack/index.tsx:36 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PlatformLimitsInfo/index.tsx:55 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PromptComposer/index.tsx:127 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
D30 · Dependency Vulnerabilities · Critical CVE · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×6
  • <img> without a text alternative project/aitoearn-web/.agents/skills/impeccable/scripts/detector/detect-antipatterns-browser.js:310 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative project/aitoearn-web/.agents/skills/impeccable/scripts/detector/detect-antipatterns-browser.js:1166 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative project/aitoearn-web/.agents/skills/impeccable/scripts/detector/rules/checks.mjs:596 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:147 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:206 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:444 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
D28 · Secrets (history) · High secret · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×5
  • Custom control with no accessible name on <div> project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:825 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> project/aitoearn-web/src/app/layout/MobileNav/index.tsx:51 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/PubParmasTextuploadImage.tsx:41 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:423 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×3
  • <input> without a programmatic label project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:855 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:2806 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:176 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (4 files) · ×2
  • Import cycle (4 files) project/aitoearn-web/src/utils/request/index.ts:1 — project/aitoearn-web/src/utils/request/index.ts → project/aitoearn-web/src/utils/request/client.ts → project/aitoearn-web/src/store/user/index.ts → project/aitoearn-web/src/api/auth/auth.api.ts → project/aitoearn-web/src/utils/request/index.ts (one verified cycle inside a mutually-dependent group of 20 files)
  • Import cycle (4 files) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx:11 — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx → project/aitoearn-web/src/components/draft-box/components/DraftContentModule/index.tsx → project/aitoearn-web/src/components/PublishDialog/index.tsx → project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx → project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/PublishDialogDraftPanel.tsx
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label project/aitoearn-web/src/components/Chat/ChatInput/index.tsx:232 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <label> that labels no control · ×1
  • <label> that labels no control project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:138 — This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang project/aitoearn-web/src/app/healthz/page.tsx:3 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC4 · Keyboard semantics · Hover-only interaction on <div> · ×1
  • Hover-only interaction on <div> project/aitoearn-web/src/app/layout/LayoutSidebar/components/UserDropdownMenu.tsx:245 — This <div> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×1
  • Click handler on a non-interactive <img> project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:252 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Clickable role="separator" that no keyboard user can reach · ×1
  • Clickable role="separator" that no keyboard user can reach project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:386 — This <div> announces itself as a role="separator" and is operated by pointerdown, but nothing can put focus on it: no tabIndex={0}, no key handler, and nothing in its scripts moves focus. A keyboard cannot produce a pointer drag, so the control cannot be operated at all (WCAG 2.1.1). Give it tabIndex={0}="0" and move it with the arrow keys in a key handler (with aria-valuenow for the position it holds).
AC4 · Keyboard semantics · Double-click handler on a non-interactive <img> · ×1
  • Double-click handler on a non-interactive <img> project/aitoearn-web/src/components/common/MediaPreview/index.tsx:473 — This <img> binds mousedown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Critical vulnerability · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'execa' · ×1
  • Unlisted import 'execa' project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:9 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts:3 — project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts → project/aitoearn-backend/libs/common/src/utils/index.ts → project/aitoearn-backend/libs/common/src/utils/exception.util.ts → project/aitoearn-backend/libs/common/src/exceptions/app.exception.ts (one verified cycle inside a mutually-dependent group of 6 files)
R9 · Circular Imports · Import cycle (2 files) · ×1
  • Import cycle (2 files) project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts:11 — project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts → project/aitoearn-web/src/components/PublishDialog/usePublishDialogStorageStore.tsx → project/aitoearn-web/src/components/PublishDialog/usePublishDialog.ts
Serious — 1267 finding(s)
D3 · God Classes · FunctionTooLong · ×107
  • FunctionTooLong: useAiBatchGenerateBarController.useAiBatchGenerateBarController project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:61 — FunctionTooLong — useAiBatchGenerateBarController runs 1298 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1198 over it, 12.98× 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: ShareModal.ShareModal project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:65 — FunctionTooLong — ShareModal runs 635 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 535 over it, 6.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.PluginPublishCard project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:61 — FunctionTooLong — PluginPublishCard runs 581 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 481 over it, 5.81× 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.ConfigManagerDialog project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:207 — FunctionTooLong — ConfigManagerDialog runs 470 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 370 over it, 4.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: index.MediaPreview project/aitoearn-web/src/components/common/MediaPreview/index.tsx:59 — FunctionTooLong — MediaPreview runs 434 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 334 over it, 4.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: PluginGuideContent.PluginGuideContent project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:212 — FunctionTooLong — PluginGuideContent runs 415 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 315 over it, 4.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: accountCore.AccountPageCore project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:42 — FunctionTooLong — AccountPageCore runs 391 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 291 over it, 3.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.MobileCalendar project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/index.tsx:35 — FunctionTooLong — MobileCalendar runs 391 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 291 over it, 3.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.PrivacyPolicyPage project/aitoearn-web/src/app/[lng]/websit/privacy-policy/page.tsx:33 — FunctionTooLong — PrivacyPolicyPage runs 391 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 291 over it, 3.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: DraftListSection.DraftListSection project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:256 — FunctionTooLong — DraftListSection runs 353 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 253 over it, 3.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: DataProtectionContent.DataProtectionContent project/aitoearn-web/src/app/[lng]/websit/data-protection-agreement/DataProtectionContent.tsx:38 — FunctionTooLong — DataProtectionContent runs 328 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 228 over it, 3.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.ExtensionPrivacyPolicyPage project/aitoearn-web/src/app/[lng]/websit/extension-privacy-policy/page.tsx:33 — FunctionTooLong — ExtensionPrivacyPolicyPage runs 302 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.EcosystemDiagram project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:15 — FunctionTooLong — EcosystemDiagram runs 296 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 196 over it, 2.96× 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: usePubParamsVerify.usePubParamsVerify project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:256 — FunctionTooLong — usePubParamsVerify runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× 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.AllListSection project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:176 — FunctionTooLong — AllListSection runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× 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: agent.methods.createStoreMethods project/aitoearn-web/src/store/agent/agent.methods.ts:49 — FunctionTooLong — createStoreMethods runs 287 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 187 over it, 2.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: AccountsTab.AccountsTab project/aitoearn-web/src/components/Plugin/PluginReady/AccountsTab.tsx:161 — FunctionTooLong — AccountsTab runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.MediaListSection project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:81 — FunctionTooLong — MediaListSection runs 276 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 176 over it, 2.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: page.TermsOfServicePage project/aitoearn-web/src/app/[lng]/websit/terms-of-service/page.tsx:33 — FunctionTooLong — TermsOfServicePage runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× 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: usePubParamsVerify.usePubParamsVerify.errParamsMap project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264 — FunctionTooLong — usePubParamsVerify.errParamsMap runs 256 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 156 over it, 2.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.MediaUpload project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:78 — FunctionTooLong — MediaUpload runs 252 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 152 over it, 2.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.GenerationParamsCard project/aitoearn-web/src/components/draft-box/components/GenerationParamsCard/index.tsx:226 — FunctionTooLong — GenerationParamsCard runs 250 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 150 over it, 2.50× 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: page.ChatDetailPage project/aitoearn-web/src/app/[lng]/chat/[taskId]/page.tsx:25 — FunctionTooLong — ChatDetailPage runs 243 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 143 over it, 2.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: usePublishActions.usePublishActions project/aitoearn-web/src/components/PublishDialog/hooks/usePublishActions.ts:159 — FunctionTooLong — usePublishActions 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: ChannelSidebar.ChannelSidebar project/aitoearn-web/src/components/ChannelManager/components/ChannelSidebar.tsx:25 — FunctionTooLong — ChannelSidebar 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.
  • + 82 more in this group — see findings.md.
D8 · Code Coverage · Low coverage · ×95
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/common/guards/rate-limit.guard.ts project/aitoearn-backend/apps/aitoearn-server/src/common/guards/rate-limit.guard.ts:1 — 18.9% line coverage (7/37).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/common/redis/server-redis-keys.ts project/aitoearn-backend/apps/aitoearn-server/src/common/redis/server-redis-keys.ts:1 — 0.0% line coverage (0/13).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/common/redis/server-redis.service.ts project/aitoearn-backend/apps/aitoearn-server/src/common/redis/server-redis.service.ts:1 — 5.1% line coverage (2/39).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:1 — 18.3% line coverage (20/109).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/mcp/channels.mcp.controller.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/mcp/channels.mcp.controller.ts:1 — 37.5% line coverage (18/48).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/mcp/channels.mcp.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/mcp/channels.mcp.service.ts:1 — 41.9% line coverage (18/43).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-auth.provider.ts:1 — 41.2% line coverage (7/17).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:1 — 45.3% line coverage (43/95).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-miniapp.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-miniapp.service.ts:1 — 31.9% line coverage (22/69).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.service.ts:1 — 38.8% line coverage (57/147).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-analytics.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-analytics.provider.ts:1 — 33.3% line coverage (10/30).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-auth.provider.ts:1 — 40.0% line coverage (10/25).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-engagement.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-engagement.provider.ts:1 — 41.2% line coverage (7/17).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:1 — 28.6% line coverage (18/63).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/google-business/google-business.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/google-business/google-business.service.ts:1 — 44.4% line coverage (16/36).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-auth.provider.ts:1 — 46.7% line coverage (7/15).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-engagement.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-engagement.provider.ts:1 — 36.8% line coverage (7/19).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/linkedin/linkedin-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/linkedin/linkedin-auth.provider.ts:1 — 44.4% line coverage (8/18).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/linkedin/linkedin-webhook.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/linkedin/linkedin-webhook.provider.ts:1 — 5.9% line coverage (2/34).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest.service.ts:1 — 34.7% line coverage (26/75).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/rednote/offline-qr/rednote-offline-qr.controller.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/rednote/offline-qr/rednote-offline-qr.controller.ts:1 — 33.3% line coverage (1/3).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-analytics.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-analytics.provider.ts:1 — 18.2% line coverage (8/44).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-auth.provider.ts:1 — 47.4% line coverage (9/19).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.service.ts:1 — 46.8% line coverage (37/79).
  • Low coverage: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-auth.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-auth.provider.ts:1 — 31.8% line coverage (7/22).
  • + 70 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×80
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 55 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/store/plugin/store.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/store/draft-box/planDetailStore.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/store/agent/agent.methods.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/components/common/MediaPreview/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/index.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:67 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:67 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:67 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:67 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:67 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:158 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/utils/ui/notification.ts:32 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/utils/ui/notification.ts:43 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/account.ts:180 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planDetailStore.ts:268 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planDetailStore.ts:302 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planDetailStore.ts:464 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planDetailStore.ts:816 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planDetailStore.ts:855 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planTabStore/index.ts:141 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/planTabStore/index.ts:187 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/store/draft-box/brandPromotionStore/index.ts:72 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/components/draft-box/hooks/useGenerationPolling.ts:81 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/components/draft-box/components/GenerationDetailDialog/index.tsx:304 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts:493 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts:553 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 14 more in this group — see findings.md.
X2 · Cancellation propagation · Async function without AbortSignal · ×32
  • Async function without AbortSignal: createPublishImageFromMedia project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:343 — `createPublishImageFromMedia` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: createPublishVideoFromMedia project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:364 — `createPublishVideoFromMedia` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchLatestDownloadUrl project/aitoearn-web/src/app/config/appDownloadConfig.ts:57 — `fetchLatestDownloadUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: loadSharedTask project/aitoearn-web/src/app/[lng]/chat/page.tsx:110 — `loadSharedTask` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: serverFetch project/aitoearn-web/src/api/_server/server-fetch.ts:32 — `serverFetch` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: write project/aitoearn-backend/libs/common/src/loggers/feishu.logger.ts:15 — `write` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: putObjectFromUrl project/aitoearn-backend/libs/aws-s3/src/s3.service.ts:62 — `putObjectFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: pullMessages project/aitoearn-backend/libs/assets/src/r2-events.service.ts:41 — `pullMessages` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: ackMessages project/aitoearn-backend/libs/assets/src/r2-events.service.ts:59 — `ackMessages` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: putObjectFromUrl project/aitoearn-backend/libs/ali-oss/src/ali-oss.service.ts:23 — `putObjectFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: uploadFileFromLocalUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-client.service.ts:39 — `uploadFileFromLocalUrl` 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 })`.
  • Async function without AbortSignal: handleRelay project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-exception.filter.ts:51 — `handleRelay` awaits `axios(…)` 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(url, { signal })`.
  • Async function without AbortSignal: appendMediaUpload project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:287 — `appendMediaUpload` awaits `axios.post(…)` 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.post(url, { signal })`.
  • Async function without AbortSignal: normalizeWorkLink project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:647 — `normalizeWorkLink` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-work.provider.ts:154 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: resolveShortLink project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/rednote/rednote-work.provider.ts:101 — `resolveShortLink` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest-work.provider.ts:152 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/kwai/kwai-work.provider.ts:173 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:180 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-work.provider.ts:78 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: resolveRedirectUrl project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-work.provider.ts:71 — `resolveRedirectUrl` 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 })`.
  • Async function without AbortSignal: urlToBlob project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:94 — `urlToBlob` 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 })`.
  • Async function without AbortSignal: getFileSizeFromUrl project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:140 — `getFileSizeFromUrl` awaits `axios.head(…)` 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.head(url, { signal })`.
  • Async function without AbortSignal: getRemoteFileSize project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts:172 — `getRemoteFileSize` awaits `axios.head(…)` 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.head(url, { signal })`.
  • Async function without AbortSignal: getIpAddress project/aitoearn-backend/apps/aitoearn-server/src/common/utils/ip.util.ts:48 — `getIpAddress` 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 })`.
  • + 7 more in this group — see findings.md.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×26
  • Animation without a prefers-reduced-motion guard project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:227 — `.loading` moves (`animation: spin 0.9s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:33 — `.container` moves (`animation: fadeIn 0.5s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:33 — `.container` moves (`animation: fadeIn 0.5s ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:530 — <div> moves — its `animate-[fadeIn_0.2s_ease-out]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:542 — <div> moves — its `animate-[tipFadeIn_0.3s_ease-out]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:250 — <div> moves — its `animate-[spin_40s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:253 — <div> moves — its `animate-[spin_30s_linear_infinite_reverse]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:259 — <div> moves — its `animate-[spin_20s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/[lng]/ai-social/components/EcosystemDiagram/index.tsx:307 — <div> moves — its `animate-[spin_30s_linear_infinite]` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:159 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/app/shortLink/page.tsx:60 — <svg> moves — its inline style sets `animation: shortlink-spin 1s linear infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/ChannelManager/components/AuthLoadingPage.tsx:198 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:494 — <div> moves — its inline style sets `animation: bounceDots 1.4s ease-in-out infinite both` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:502 — <div> moves — its inline style sets `animation: bounceDots 1.4s ease-in-out infinite both` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:510 — <div> moves — its inline style sets `animation: bounceDots 1.4s ease-in-out infinite both` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:521 — <span> moves — its inline style sets `animation: thinkingGlow 1.8s ease-in-out infinite` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:585 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:589 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:593 — <span> moves — its `animate-bounce` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:69 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:61 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:234 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:75 — <div> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/ui/NotificationCenter.tsx:331 — <div> moves — its inline style sets `animation: shrink ${item.duration}ms linear forwards` — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • Animation without a prefers-reduced-motion guard project/aitoearn-web/src/components/ui/button.tsx:62 — <svg> moves — its `animate-spin` utility runs with no motion-safe:/motion-reduce: variant — and nothing reads prefers-reduced-motion for it, so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Gate it on @media (prefers-reduced-motion: no-preference) or motion-safe:.
  • + 1 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×24
  • FileTooLong: hooks/useAiBatchGenerateBarController.ts project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts — FileTooLong — 1357 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: useAiBatchGenerateBarController (61-1713). The bar is 500 significant lines; this is 857 over it, 2.71× 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: draft-generation/draft-generation.service.ts project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts — FileTooLong — 995 significant lines (blank, comment-only and punctuation-only lines excluded), about 88% of them inside a single declaration: DraftGenerationService (149-1389). The bar is 500 significant lines; this is 495 over it, 1.99× 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: volcengine/volcengine.interface.ts project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts — FileTooLong — 936 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 436 over it, 1.87× 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/RecordCore.tsx project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx — FileTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: RecordCore (259-1151). The bar is 500 significant lines; this is 406 over it, 1.81× 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: plugin/store.ts project/aitoearn-web/src/store/plugin/store.ts — FileTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded), about 68% of them inside a single declaration: usePluginStore (390-1275). The bar is 500 significant lines; this is 277 over it, 1.55× 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: platforms/platforms.interface.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts — FileTooLong — 762 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 262 over it, 1.52× 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: services/agent-runtime.service.ts project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts — FileTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: AgentRuntimeService (90-1049). The bar is 500 significant lines; this is 260 over it, 1.52× 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: wechat/wechat.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts — FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), about 73% of them inside a single declaration: WeChatService (253-1041). The bar is 500 significant lines; this is 245 over it, 1.49× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: draft-box/planDetailStore.ts project/aitoearn-web/src/store/draft-box/planDetailStore.ts — FileTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: usePlanDetailStore (219-1105). The bar is 500 significant lines; this is 222 over it, 1.44× 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: media/media.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MediaService (127-999). The bar is 500 significant lines; this is 199 over it, 1.40× 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: Share/ShareModal.tsx project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx — FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ShareModal (65-859). The bar is 500 significant lines; this is 188 over it, 1.38× 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: tasks/publish-task.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts — FileTooLong — 687 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: PublishTaskService (45-986). The bar is 500 significant lines; this is 187 over it, 1.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: auth/auth.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts — FileTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: AuthService (42-903). The bar is 500 significant lines; this is 172 over it, 1.34× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: repositories/publish-record.repository.ts project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts — FileTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: PublishRecordRepository (35-959). The bar is 500 significant lines; this is 162 over it, 1.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ConfigField/index.tsx project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx — FileTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 137 over it, 1.27× 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: PluginPublishCard/index.tsx project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx — FileTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: PluginPublishCard (61-842). The bar is 500 significant lines; this is 125 over it, 1.25× 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: facebook/facebook.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts — FileTooLong — 618 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: FacebookService (30-881). The bar is 500 significant lines; this is 118 over it, 1.24× 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: ConfigManagerDialog/index.tsx project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx — FileTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: ConfigManagerDialog (207-783). The bar is 500 significant lines; this is 111 over it, 1.22× 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: plugin-guide/PluginGuideContent.tsx project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx — FileTooLong — 585 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: PluginGuideContent (212-668). The bar is 500 significant lines; this is 85 over it, 1.17× 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: PublishDialog/PublishDialog.util.ts project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts — FileTooLong — 576 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 76 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ContentTabs/mediaTabStore.ts project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts — FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 74 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/DraftListSection.tsx project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx — FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: DraftListSection (256-696). The bar is 500 significant lines; this is 45 over it, 1.09× 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: tiktok/tiktok-publish.provider.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts — FileTooLong — 535 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: TikTokPublishProvider (31-754). The bar is 500 significant lines; this is 35 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: youtube/youtube.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts — FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: YoutubeService (17-706). The bar is 500 significant lines; this is 18 over it, 1.04× 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×22
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
PF3 · Async & latency hygiene · Sync-over-async blocking · ×21
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:66 — `fs.readFileSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:69 — `fs.existsSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/subtitle.mcp.ts:70 — `fs.unlinkSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:313 — `fs.readFileSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:316 — `fs.existsSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts:317 — `fs.unlinkSync` in `extractAudioWithFFmpeg` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:923 — `fs.existsSync` in `uploadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:929 — `fs.readFileSync` in `uploadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:961 — `fs.mkdirSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:962 — `fs.writeFileSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:970 — `fs.mkdirSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:976 — `fs.writeFileSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:987 — `fs.mkdirSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:993 — `fs.writeFileSync` in `downloadAgentSession` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1009 — `fs.readFileSync` in `parseAgentIds` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1028 — `fs.existsSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1030 — `fs.readFileSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1036 — `fs.existsSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1037 — `fs.readdirSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1041 — `fs.readFileSync` in `uploadAgentSessionFiles` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking skills/dsh-plugin-aitoearn/lib/index.js:58 — `readFileSync` in `get` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · ClassTooLong · ×17
  • ClassTooLong: useAiBatchGenerateBarController project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1 — ClassTooLong — 1298 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 898 over it, 3.25× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DraftGenerationService project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:148 — ClassTooLong — 880 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 480 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RecordCore project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1 — ClassTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 295 over it, 1.74× 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: AgentRuntimeService project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:89 — ClassTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 277 over it, 1.69× 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: PublishTaskService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:44 — ClassTooLong — 652 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 252 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PublishRecordRepository project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:34 — ClassTooLong — 638 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 238 over it, 1.60× 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: ShareModal project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:1 — ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 235 over it, 1.59× 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: AuthService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:41 — ClassTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 233 over it, 1.58× 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: MediaService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:126 — ClassTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 205 over it, 1.51× 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: FacebookService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts:29 — ClassTooLong — 590 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 190 over it, 1.48× 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: WeChatService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:252 — ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 145 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: TikTokPublishProvider project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts:30 — ClassTooLong — 506 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 106 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: YoutubeService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts:16 — ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 30 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: TwitterService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:25 — ClassTooLong — 452 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 52 over it, 1.13× 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: PublishStateService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts:31 — ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 32 over it, 1.08× 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: PluginGuideContent project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:1 — ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 15 over it, 1.04× 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: InstagramPublishProvider REDACTED:20 — ClassTooLong — 410 significant lines (blank, comment-only and punctuation-only lines excluded), 17 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.
D31 · IaC & Container Security · Medium IaC · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · Weak hash algorithm · ×14
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:47 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/volcengine.utils.ts:32 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/media.service.ts:75 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/app.module.ts:55 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/api-key/api-key.service.ts:56 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-webhook.provider.ts:83 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:475 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin-webhook.provider.ts:118 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.service.ts:470 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat-msg-crypto.service.ts:54 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat-official/wechat-official-webhook.provider.ts:104 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:939 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-web/src/api/materials/material.api.ts:56 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm project/aitoearn-web/src/api/materials/material.api.ts:59 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D3 · God Classes · TooManyMethods · ×13
  • TooManyMethods: PublishRecordRepository project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:34 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PublishRecordService project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts:21 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PublishTaskService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:44 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AccountService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/accounts/account.service.ts:61 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AccountRepository project/aitoearn-backend/libs/mongodb/src/repositories/account.repository.ts:15 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WeChatService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:252 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MediaService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:126 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TwitterService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:25 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TaskInstance project/aitoearn-web/src/store/agent/task-instance/TaskInstance.ts:45 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ServerRedisService project/aitoearn-backend/apps/aitoearn-server/src/common/redis/server-redis.service.ts:5 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 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.
  • TooManyMethods: AuthService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:41 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 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.
  • TooManyMethods: FacebookService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts:29 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PublishStateService project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts:31 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 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.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D12 · Dependency Hygiene · Deprecated · ×8
  • Deprecated: image-size REDACTED:42 — image-size 2.0.2, declared in REDACTED, is marked deprecated by its publisher: "Use latest 2.x please". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: image-size REDACTED:45 — image-size 2.0.2, declared in REDACTED, is marked deprecated by its publisher: "Use latest 2.x please". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: prom-client REDACTED:40 — prom-client 15.1.3, declared in REDACTED, is marked deprecated by its publisher: "prom-client has been replaced by @prometheus-io/client". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:36 — eslint 9.39.4, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: crypto-js REDACTED:96 — crypto-js 4.2.0, declared in REDACTED, is marked deprecated by its publisher: "Active development of CryptoJS has been discontinued. This library is no longer maintained.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: glob REDACTED:104 — glob 11.1.0, declared in REDACTED, is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: next REDACTED:116 — next 14.2.29, declared in REDACTED, is marked deprecated by its publisher: "This version has a security vulnerability. Please upgrade to a patched version. See https://nextjs.org/blog/security-update-2025-12-11 for more details.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:170 — eslint 9.39.4, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
IC1 · Incompleteness & stubs · Fake-async · ×8
  • Fake-async — async method never awaits project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.service.ts:140 — `revokeToken` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:291 — `execute` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:311 — `execute` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:410 — `execute` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:438 — `execute` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:466 — `execute` 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 project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:499 — `execute` 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 project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:297 — `handleErrorMessage` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
D3 · God Classes · MethodTooLong · ×7
  • MethodTooLong: PublishFlowService.createFlowRecords project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/flows/publish-flow.service.ts:78 — MethodTooLong — createFlowRecords runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: BilibiliPlatformException.policyFromPlatformCode project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.exception.ts:82 — MethodTooLong — policyFromPlatformCode runs 172 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentRuntimeService.createContentGenerationTask project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:425 — MethodTooLong — createContentGenerationTask runs 163 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 63 over it, 1.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AgentRuntimeService.claudeQuery project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:195 — MethodTooLong — claudeQuery runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: TikTokPublishProvider.publishVideo project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts:244 — MethodTooLong — publishVideo runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PublishTaskService.processPublishJob project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:58 — MethodTooLong — processPublishJob runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EngagementService.callFunction project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:102 — MethodTooLong — callFunction runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×6
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-web/src/app/layout/ConfigManagerDialog/utils/configFieldMeta.ts:59 — `countModifiedLeafFields` is exported and takes `value: unknown` from its caller, and it calls itself at line 59 (`countModifiedLeafFields`) with a piece of `value` (and at line 73) — and nowhere in `countModifiedLeafFields` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `countModifiedLeafFields` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-web/src/app/layout/ConfigManagerDialog/utils/configSections.ts:95 — `buildConfigSections` is exported, takes a document from its caller (line 119) and hands it to `hasConfiguredRelay`, which calls itself at line 95 (`hasConfiguredRelay`) with a piece of `value` (and at line 98) — and nowhere in `hasConfiguredRelay` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `hasConfiguredRelay` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-backend/libs/common/src/utils/mcp-response.util.ts:17 — `toYamlTextResult` is exported, takes a document from its caller (line 41) and hands it to `normalizeYamlValue`, which calls itself at line 17 (`normalizeYamlValue`) with a piece of `value` (and at line 24) — and nowhere in `normalizeYamlValue` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `normalizeYamlValue` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-backend/libs/common/src/loggers/error.serializer.ts:31 — `serializeError` is exported, takes a document from its caller (line 3) and hands it to `pruneAxiosSocketData`, which calls itself at line 31 (`pruneAxiosSocketData`) with a piece of `value` (and at line 36) — and nowhere in `pruneAxiosSocketData` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `pruneAxiosSocketData` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-backend/apps/aitoearn-server/src/common/utils/list2tree.util.ts:69 — `filterTree` is exported, takes a document from its caller (line 57) and hands it to `filter`, which calls itself at line 69 (`filter`) with a piece of `treeData` — and nowhere in `filter` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `filter` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap project/aitoearn-backend/apps/aitoearn-server/src/common/utils/list2tree.util.ts:81 — `deleteEmptyChildren` is exported and takes `arr: any` from its caller, and it calls itself at line 81 (`deleteEmptyChildren`) with a piece of `arr` — and nowhere in `deleteEmptyChildren` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `deleteEmptyChildren` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
AC2 · Forms & labels · <Textarea> field component without a label · ×5
  • <Textarea> field component without a label project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigJsonPanel/index.tsx:271 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:141 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:179 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:194 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Textarea> field component without a label project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PromptEditorDialog/index.tsx:125 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <Slider> field component without a label · ×5
  • <Slider> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:339 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Slider> field component without a label project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushToolbar.tsx:277 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Slider> field component without a label project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/ImageExportControls/index.tsx:123 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Slider> field component without a label project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/components/DurationSelect/index.tsx:60 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Slider> field component without a label project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/components/ImageCountSelect/index.tsx:27 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure · Page without a main landmark · ×5
  • Page without a main landmark project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark project/aitoearn-web/src/app/healthz/layout.tsx:10 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark project/aitoearn-web/src/app/healthz/page.tsx:3 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark project/aitoearn-web/src/app/shortLink/layout.tsx:10 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · aitoearn-bridge.handleMessage (cyclomatic 25) · ×5
  • aitoearn-bridge.handleMessage (cyclomatic 25) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • aitoearn-bridge.handleMessage (cyclomatic 25) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • aitoearn-bridge.handleMessage (cyclomatic 25) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • aitoearn-bridge.handleMessage (cyclomatic 25) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • aitoearn-bridge.handleMessage (cyclomatic 25) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aitoearn-bridge.post (cyclomatic 16) · ×5
  • aitoearn-bridge.post (cyclomatic 16) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post 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.
  • aitoearn-bridge.post (cyclomatic 16) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post 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.
  • aitoearn-bridge.post (cyclomatic 16) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post 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.
  • aitoearn-bridge.post (cyclomatic 16) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post 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.
  • aitoearn-bridge.post (cyclomatic 16) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post 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.
D17 · Explicit Debt · TodoComment · ×5
  • TodoComment project/aitoearn-web/src/store/plugin/plats/douyin/index.ts:254 — // TODO: 实现抖音评论列表 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment project/aitoearn-web/src/store/plugin/plats/douyin/index.ts:270 — // TODO: 实现抖音子评论列表 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx:187 — // TODO: 从API获取真实频道数据 — 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 project/aitoearn-backend/libs/nest-mcp/src/services/sse-ping.service.ts:127 — // TODO: After non writable connections are discovered it'd be useful to cleanup transports/mcp servers — 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 project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts:36 — // TODO: 等前端重构 — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D2 · Cognitive Complexity · aitoearn-bridge.handleMessage (cognitive 38) · ×5
  • aitoearn-bridge.handleMessage (cognitive 38) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 14). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.handleMessage (cognitive 38) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 14). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.handleMessage (cognitive 38) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 14). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.handleMessage (cognitive 38) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 14). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.handleMessage (cognitive 38) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:173 — aitoearn-bridge.handleMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 5 (9 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 14). Of this number, 37 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aitoearn-bridge.process.stdin.on("data") (cognitive 26) · ×5
  • aitoearn-bridge.process.stdin.on("data") (cognitive 26) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:233 — aitoearn-bridge.process.stdin.on("data") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 16 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.
  • aitoearn-bridge.process.stdin.on("data") (cognitive 26) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:233 — aitoearn-bridge.process.stdin.on("data") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 16 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.
  • aitoearn-bridge.process.stdin.on("data") (cognitive 26) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:233 — aitoearn-bridge.process.stdin.on("data") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 16 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.
  • aitoearn-bridge.process.stdin.on("data") (cognitive 26) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:233 — aitoearn-bridge.process.stdin.on("data") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 16 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.
  • aitoearn-bridge.process.stdin.on("data") (cognitive 26) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:233 — aitoearn-bridge.process.stdin.on("data") has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (5 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 11). Of this number, 16 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.
D2 · Cognitive Complexity · aitoearn-bridge.post (cognitive 18) · ×5
  • aitoearn-bridge.post (cognitive 18) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (5 pts), error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.post (cognitive 18) skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (5 pts), error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.post (cognitive 18) skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (5 pts), error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.post (cognitive 18) skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (5 pts), error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • aitoearn-bridge.post (cognitive 18) skills/trae-skill-aitoearn/scripts/aitoearn-bridge.mjs:107 — aitoearn-bridge.post has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 5, ternaries 2 (5 pts), error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Forked directory tree (55 identical files, ~7035 lines × 2 trees) · ×5
  • Forked directory tree (55 identical files, ~7035 lines × 2 trees) skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/codex-plugin-aitoearn/ and skills/dsh-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 61 and 62 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (55 identical files, ~7035 lines × 2 trees) skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/codex-plugin-aitoearn/ and skills/qwenwork-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 61 and 60 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (55 identical files, ~7035 lines × 2 trees) skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/codex-plugin-aitoearn/skills/aitoearn/ and skills/qwen-skill-aitoearn/aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 56 and 56 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (55 identical files, ~7035 lines × 2 trees) skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/dsh-plugin-aitoearn/ and skills/qwenwork-plugin-aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 62 and 60 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (55 identical files, ~7035 lines × 2 trees) skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/dsh-plugin-aitoearn/skills/aitoearn/ and skills/qwen-skill-aitoearn/aitoearn/ are near-verbatim copies of each other: 55 files are byte-identical under the same relative paths (~7035 lines; the trees hold 56 and 56 files). That is one structural fact, not 55 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
AC2 · Forms & labels · <Select> field component without a label · ×4
  • <Select> field component without a label project/aitoearn-web/src/app/layout/SettingsModal/tabs/GeneralTab.tsx:125 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:661 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterBaseSection.tsx:43 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterPollSection.tsx:170 — This UI-library field component has no label / aria-label / aria-labelledby / id, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id alone, wherever it is set, names nothing until a label points at it). The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×4
  • Focus outline removed in CSS without a :focus replacement project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PromptEditorDialog/PromptEditorDialog.module.scss:18 — `.textarea:focus-visible` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:12 — `.editorContent` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:46 — `.mentionChipFocused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/MediaMentionPromptInput.module.scss:158 — `.menuItem` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Hollow method · ×4
  • Hollow method — returns a constant without doing the work project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:29 — `recordSuccess` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:33 — `recordFailure` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:37 — `recordAsyncComplete` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
  • Hollow method — returns a constant without doing the work project/aitoearn-web/src/app/config/platConfig.ts:67 — `isPlatformAvailable` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
IC1 · Incompleteness & stubs · Both branches are identical · ×4
  • Both branches are identical — the condition decides nothing REDACTED:357 — The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
  • Both branches are identical — the condition decides nothing project/aitoearn-web/src/components/PublishDialog/compoents/DouyinLaunchModal/index.tsx:64 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing project/aitoearn-web/src/components/PublishDialog/compoents/PublishDatePicker/DateTimePicker.tsx:232 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
  • Both branches are identical — the condition decides nothing project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:589 — Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×4
  • Guard cannot change the result — returns what the code already falls through to project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalSummary/index.tsx:42 — The guard above `return 'text-primary';` also returns `'text-primary'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarHolidayBadge/index.tsx:64 — The guard above `return 'bg-gradient-back text-gradient-foreground';` also returns `'bg-gradient-back text-gradient-foreground'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:227 — The guard above `return accountGroupList;` also returns `accountGroupList`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to project/aitoearn-web/src/utils/oss.ts:73 — The guard above `return 'cloudflare';` also returns `'cloudflare'`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R10 · Code Duplication · Forked directory tree (49 identical files, ~6629 lines × 2 trees) · ×4
  • Forked directory tree (49 identical files, ~6629 lines × 2 trees) skills/codex-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/codex-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (49 identical files, ~6629 lines × 2 trees) skills/dsh-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/dsh-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (49 identical files, ~6629 lines × 2 trees) skills/qwen-skill-aitoearn/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/qwen-skill-aitoearn/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
  • Forked directory tree (49 identical files, ~6629 lines × 2 trees) skills/qwenwork-plugin-aitoearn/skills/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/qwenwork-plugin-aitoearn/skills/aitoearn/ and skills/trae-skill-aitoearn/ are near-verbatim copies of each other: 49 files are byte-identical under the same relative paths (~6629 lines; the trees hold 56 and 56 files). That is one structural fact, not 49 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
X25 · Inert configuration knob · Option is kept and never read · ×4
  • Option is kept and never read project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:13 — `useToolBarDerivedData` accepts `duration` from the caller and keeps it in `duration` on line 13, where only it can read the value — but nothing ever reads `duration`. Setting `duration` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `duration` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `duration` from the accepted options so callers stop setting a knob that does nothing.
  • Option is kept and never read project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:16 — `useToolBarDerivedData` accepts `inputVideoDuration` from the caller and keeps it in `inputVideoDuration` on line 16, where only it can read the value — but nothing ever reads `inputVideoDuration`. Setting `inputVideoDuration` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `inputVideoDuration` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `inputVideoDuration` from the accepted options so callers stop setting a knob that does nothing.
  • Option is kept and never read project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/hooks/useToolBarDerivedData.ts:26 — `useToolBarDerivedData` accepts `videoResolutions` from the caller and keeps it in `videoResolutions` on line 26, where only it can read the value — but nothing ever reads `videoResolutions`. Setting `videoResolutions` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `videoResolutions` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `videoResolutions` from the accepted options so callers stop setting a knob that does nothing.
  • Option is kept and never read project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:50 — `useTaskPolling` accepts `options.onTaskUpdate` from the caller and keeps it in `onTaskUpdate` on line 50, where only it can read the value — but nothing ever reads `onTaskUpdate`. Setting `options.onTaskUpdate` therefore changes nothing: every caller gets the same behaviour whatever they pass, and nothing reports that the option was ignored. Read `onTaskUpdate` where the behaviour it configures is decided — or, if the behaviour genuinely is fixed, remove `options.onTaskUpdate` from the accepted options so callers stop setting a knob that does nothing.
AC1 · Text alternatives · <video> without a captions track · ×3
  • <video> without a captions track project/aitoearn-web/src/app/[lng]/ai-social/components/PromptGallery/components/VideoDetailModal.tsx:84 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
  • <video> without a captions track project/aitoearn-web/src/components/common/MediaPreview/index.tsx:516 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
  • <video> without a captions track project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:142 — Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation).
D17 · Explicit Debt · XxxComment · ×3
  • XxxComment project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1894 — //xxx 或 URL */ — 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.
  • XxxComment project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/drama-recap.mcp.ts:61 — //xxx format). URLs auto-uploaded. — 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.
  • XxxComment project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/style-transfer.mcp.ts:42 — //xxx format); URLs auto-uploaded — 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.
AC3 · Page structure · Heading level jumps from h2 to h4 · ×2
  • Heading level jumps from h2 to h4 project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:395 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h2 to h4 project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:652 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×2
  • Modal dialog does not manage focus project/aitoearn-web/src/components/common/WechatBrowserOverlay/index.tsx:48 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
  • Modal dialog does not manage focus project/aitoearn-web/src/components/common/WechatBrowserOverlay/index.tsx:119 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.7 · ×2
  • Low contrast colour pair in CSS (3.7:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:113 — `.task-id` sets color: #667eea on background-color: white — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.7:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:114 — `.task-id` sets color: #667eea on background-color: white — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.0 · ×2
  • Low contrast colour pair in CSS (4.0:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:131 — `.status[class*="running"]` sets color: #1976d2 on background-color: #e3f2fd — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.0:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:133 — `.status[class*="running"]` sets color: #1976d2 on background-color: #e3f2fd — 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.5 · ×2
  • Low contrast colour pair in CSS (3.5:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent-zh.hbs:141 — `.status[class*="requires"]` sets color: #e65100 on background-color: #fff3e0 — 3.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (3.5:1) project/aitoearn-backend/apps/aitoearn-server/src/views/mail/agent.hbs:143 — `.status[class*="requires"]` sets color: #e65100 on background-color: #fff3e0 — 3.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Focus outline removed inline · ×2
  • Focus outline removed inline project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushToolbar.tsx:196 — <button> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
  • Focus outline removed inline project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:365 — <input> takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2).
D1 · Cyclomatic Complexity · index.ActionCard · ×2
  • index.ActionCard::getActionConfig (cyclomatic 26) project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:94 — index.ActionCard::getActionConfig has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: one other method here (index.ActionCard::handleClick) 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.ActionCard::handleClick (cyclomatic 18) project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:224 — index.ActionCard::handleClick has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (index.ActionCard::getActionConfig) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · index.ActionCard · ×2
  • index.ActionCard::handleClick (cognitive 24) project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:224 — index.ActionCard::handleClick has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 3, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (index.ActionCard::getActionConfig) 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.ActionCard::getActionConfig (cognitive 18) project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:94 — index.ActionCard::getActionConfig has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 17, match/switch 1. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (index.ActionCard::handleClick) 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: @yikart/aws-s3 — @yikart/aws-s3: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: @yikart/mongodb — @yikart/mongodb: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: TwitterService (LCOM4 4) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:25 — TwitterService'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: ContentMcpController (LCOM4 4) project/aitoearn-backend/apps/aitoearn-server/src/core/content/content.mcp.controller.ts:71 — ContentMcpController'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.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:third-party-deep-import] project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/claude-code-router/claude-code-router.service.ts:58 — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/claude-code-router/claude-code-router.service.ts:58 imports @musistudio/claude-code-router/dist/cli.js, 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] project/aitoearn-backend/libs/common/src/utils/zod-openapi.util.ts:3 — project/aitoearn-backend/libs/common/src/utils/zod-openapi.util.ts:3 imports @nestjs/swagger/dist/services/schema-object-factory, 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.
R7 · Dead Code · Dead file (~179 LoC) · ×2
  • Dead file (~179 LoC) project/aitoearn-web/src/app/config/appDownloadConfig.ts — no import path from any entry point (86 application, 70 tooling, 162 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 (~179 LoC) project/aitoearn-web/src/components/ui/form.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~76 LoC) · ×2
  • Dead file (~76 LoC) project/aitoearn-web/src/api/platforms/douyin.types.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/platforms/douyin.api.ts) — 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 (~76 LoC) project/aitoearn-web/src/components/ui/grid.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~66 LoC) · ×2
  • Dead file (~66 LoC) project/aitoearn-backend/libs/mongodb/src/schemas/reply-comment-record.schema.ts — no import path from any entry point (86 application, 70 tooling, 162 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 (~66 LoC) project/aitoearn-web/src/components/ui/spin.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~49 LoC) · ×2
  • Dead file (~49 LoC) project/aitoearn-web/src/api/platforms/work.types.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/platforms/work.api.ts) — 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 (~49 LoC) project/aitoearn-web/src/app/layout/LayoutSidebar/components/BottomSection/SettingsEntry.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'tslib' · ×2
  • Unused dependency 'tslib' REDACTED:16 — Declared in REDACTED 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 'tslib' REDACTED:22 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nestjs/axios' · ×2
  • Unused dependency '@nestjs/axios' REDACTED:16 — Declared in REDACTED 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 '@nestjs/axios' REDACTED:7 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'js-yaml' · ×2
  • Unused dependency 'js-yaml' REDACTED:44 — Declared in REDACTED 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 'js-yaml' REDACTED:47 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'jsonwebtoken' · ×2
  • Unused dependency 'jsonwebtoken' REDACTED:45 — Declared in REDACTED but never imported anywhere in that package or its workspace members — while scripts/init.mjs DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
  • Unused dependency 'jsonwebtoken' REDACTED:48 — Declared in REDACTED but never imported anywhere in that package or its workspace members — while scripts/init.mjs DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×2
  • Untrusted text written into markup unescaped project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:312 — `toJsStringLiteral(pageCallbackUrl)` is text this program did not author, and it is written into a script or style context through EJS's raw `<%- %>` output 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/callback.ejs:313 — `toJsStringLiteral(pageRedirectUri)` is text this program did not author, and it is written into a script or style context through EJS's raw `<%- %>` output 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. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
AC1 · Text alternatives · <canvas> without a text alternative · ×1
  • <canvas> without a text alternative project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/BrushCanvas.tsx:85 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
AC2 · Forms & labels · <NumberInput> field component without a label · ×1
  • <NumberInput> field component without a label project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterPollSection.tsx:154 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×1
  • Heading level jumps from h1 to h3 project/aitoearn-web/src/app/[lng]/websit/plugin-update-docs/PluginUpdateDocsContent.tsx:379 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.0 · ×1
  • Low contrast colour pair in CSS (1.0:1) project/aitoearn-backend/apps/aitoearn-server/src/views/channels/auth/select-accounts.ejs:204 — `.checkmark` sets color: #fff on background-color: #fff — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Low contrast Tailwind colour pair (3.1 · ×1
  • Low contrast Tailwind colour pair (3.1:1) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:743 — This element's Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade.
D1 · Cyclomatic Complexity · useAiBatchGenerateBarController.useAiBatchGenerateBarController (cyclomatic 200) · ×1
  • useAiBatchGenerateBarController.useAiBatchGenerateBarController (cyclomatic 200) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:61 — useAiBatchGenerateBarController.useAiBatchGenerateBarController has cyclomatic complexity 200 (threshold 15). Most of this is not in the body itself: 12 of the 200 points are its own statements and the rest belongs to 37 function literals inside it that branch (lines 728, 1155, 1298, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · usePubParamsVerify.usePubParamsVerify.errParamsMap (cyclomatic 147) · ×1
  • usePubParamsVerify.usePubParamsVerify.errParamsMap (cyclomatic 147) project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264 — usePubParamsVerify.usePubParamsVerify.errParamsMap has cyclomatic complexity 147 (threshold 15). Of this number, 137 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.ConfigManagerDialog (cyclomatic 97) · ×1
  • index.ConfigManagerDialog (cyclomatic 97) project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:207 — index.ConfigManagerDialog has cyclomatic complexity 97 (threshold 15). Of this number, 36 points are the body's own statements and 61 belong to 23 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ShareModal.ShareModal (cyclomatic 87) · ×1
  • ShareModal.ShareModal (cyclomatic 87) project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:65 — ShareModal.ShareModal has cyclomatic complexity 87 (threshold 15). Most of this is not in the body itself: 10 of the 87 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 437, 347, 282, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DraftListSection.DraftListSection (cyclomatic 75) · ×1
  • DraftListSection.DraftListSection (cyclomatic 75) project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:256 — DraftListSection.DraftListSection has cyclomatic complexity 75 (threshold 15). Of this number, 56 points are the body's own statements and 19 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.PluginPublishCard (cyclomatic 69) · ×1
  • index.PluginPublishCard (cyclomatic 69) project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:61 — index.PluginPublishCard has cyclomatic complexity 69 (threshold 15). Of this number, 38 points are the body's own statements and 31 belong to 12 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · convertMessages.convertMessages (cyclomatic 60) · ×1
  • convertMessages.convertMessages (cyclomatic 60) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:37 — convertMessages.convertMessages has cyclomatic complexity 60 (threshold 15). Most of this is not in the body itself: 1 of the 60 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 86, a function literal at line 96, saveStepsToMessage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload (cyclomatic 58) · ×1
  • useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload (cyclomatic 58) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useLocalUploadHandler.ts:67 — useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload has cyclomatic complexity 58 (threshold 15). Of this number, 55 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · accountCore.AccountPageCore (cyclomatic 56) · ×1
  • accountCore.AccountPageCore (cyclomatic 56) project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:42 — accountCore.AccountPageCore has cyclomatic complexity 56 (threshold 15). Most of this is not in the body itself: 3 of the 56 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 82, a function literal at line 273, a function literal at line 218, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.DesktopPublishContent (cyclomatic 56) · ×1
  • index.DesktopPublishContent (cyclomatic 56) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:96 — index.DesktopPublishContent has cyclomatic complexity 56 (threshold 15). Of this number, 29 points are the body's own statements and 27 belong to 9 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.MediaUpload (cyclomatic 55) · ×1
  • index.MediaUpload (cyclomatic 55) project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:78 — index.MediaUpload has cyclomatic complexity 55 (threshold 15). Of this number, 23 points are the body's own statements and 32 belong to 9 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.MediaPreview (cyclomatic 52) · ×1
  • index.MediaPreview (cyclomatic 52) project/aitoearn-web/src/components/common/MediaPreview/index.tsx:59 — index.MediaPreview has cyclomatic complexity 52 (threshold 15). Of this number, 23 points are the body's own statements and 29 belong to 16 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MobileContent.MobileContent (cyclomatic 50) · ×1
  • MobileContent.MobileContent (cyclomatic 50) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:35 — MobileContent.MobileContent has cyclomatic complexity 50 (threshold 15). Most of this is not in the body itself: 14 of the 50 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 95, 77, 317, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.ChatMessage (cyclomatic 47) · ×1
  • index.ChatMessage (cyclomatic 47) project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:357 — index.ChatMessage has cyclomatic complexity 47 (threshold 15). Of this number, 35 points are the body's own statements and 12 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · MobilePublishContent.MobilePublishContent (cyclomatic 47) · ×1
  • MobilePublishContent.MobilePublishContent (cyclomatic 47) project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:67 — MobilePublishContent.MobilePublishContent has cyclomatic complexity 47 (threshold 15). Of this number, 22 points are the body's own statements and 25 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · usePublishActions.usePublishActions.pubClick (cyclomatic 47) · ×1
  • usePublishActions.usePublishActions.pubClick (cyclomatic 47) project/aitoearn-web/src/components/PublishDialog/hooks/usePublishActions.ts:181 — usePublishActions.usePublishActions.pubClick has cyclomatic complexity 47 (threshold 15). Of this number, 20 points are the body's own statements and 27 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.MediaListSection (cyclomatic 47) · ×1
  • index.MediaListSection (cyclomatic 47) project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:81 — index.MediaListSection has cyclomatic complexity 47 (threshold 15). Of this number, 32 points are the body's own statements and 15 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.GenerationParamsCard (cyclomatic 47) · ×1
  • index.GenerationParamsCard (cyclomatic 47) project/aitoearn-web/src/components/draft-box/components/GenerationParamsCard/index.tsx:226 — index.GenerationParamsCard has cyclomatic complexity 47 (threshold 15). Of this number, 31 points are the body's own statements and 16 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.DateRangeCalendar (cyclomatic 46) · ×1
  • index.DateRangeCalendar (cyclomatic 46) project/aitoearn-web/src/components/ui/date-range-picker/index.tsx:38 — index.DateRangeCalendar has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 6 of the 46 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 177, 121, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.AllListSection (cyclomatic 45) · ×1
  • index.AllListSection (cyclomatic 45) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:176 — index.AllListSection has cyclomatic complexity 45 (threshold 15). Of this number, 29 points are the body's own statements and 16 belong to 11 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NotificationCenter.NotificationCenter (cyclomatic 45) · ×1
  • NotificationCenter.NotificationCenter (cyclomatic 45) project/aitoearn-web/src/components/ui/NotificationCenter.tsx:75 — NotificationCenter.NotificationCenter has cyclomatic complexity 45 (threshold 15). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to 17 function items inside it that branch (a function literal at line 82, a function literal at line 269, a function literal at line 159, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.ChatInput (cyclomatic 44) · ×1
  • index.ChatInput (cyclomatic 44) project/aitoearn-web/src/components/Chat/ChatInput/index.tsx:65 — index.ChatInput has cyclomatic complexity 44 (threshold 15). Of this number, 24 points are the body's own statements and 20 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.PublishDetailCard (cyclomatic 44) · ×1
  • index.PublishDetailCard (cyclomatic 44) project/aitoearn-web/src/components/Chat/ChatMessage/PublishDetailCard/index.tsx:60 — index.PublishDetailCard has cyclomatic complexity 44 (threshold 15). Of this number, 22 points are the body's own statements and 22 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.MaterialSelectionModalContent (cyclomatic 43) · ×1
  • index.MaterialSelectionModalContent (cyclomatic 43) project/aitoearn-web/src/components/PublishDialog/compoents/MaterialSelectionModal/index.tsx:84 — index.MaterialSelectionModalContent has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 14 of the 43 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 214, getTitle, a function literal at line 175, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.VideoHistoryModal (cyclomatic 42) · ×1
  • index.VideoHistoryModal (cyclomatic 42) project/aitoearn-web/src/app/[lng]/tasks-history/components/VideoHistoryModal/index.tsx:36 — index.VideoHistoryModal has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 7 of the 42 points are its own statements and the rest belongs to 10 function items inside it that branch (loadVideos, parseTimestamp, getStatusText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · convertMessages.processUserMessage (cyclomatic 39) · ×1
  • convertMessages.processUserMessage (cyclomatic 39) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:285 — convertMessages.processUserMessage has cyclomatic complexity 39 (threshold 15). Of this number, 17 points are the body's own statements and 22 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useTaskPolling.useTaskPolling (cyclomatic 38) · ×1
  • useTaskPolling.useTaskPolling (cyclomatic 38) project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:43 — useTaskPolling.useTaskPolling has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 95, 71, 143, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ChannelSidebar.ChannelSidebar (cyclomatic 38) · ×1
  • ChannelSidebar.ChannelSidebar (cyclomatic 38) project/aitoearn-web/src/components/ChannelManager/components/ChannelSidebar.tsx:25 — ChannelSidebar.ChannelSidebar has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 10 of the 38 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 163, handlePlatformClick, a function literal at line 235, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PublishFlowService.createFlowRecords (cyclomatic 37) · ×1
  • PublishFlowService.createFlowRecords (cyclomatic 37) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/flows/publish-flow.service.ts:78 — PublishFlowService.createFlowRecords has cyclomatic complexity 37 (threshold 15). Of this number, 36 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DateTimePicker.DateTimePicker (cyclomatic 36) · ×1
  • DateTimePicker.DateTimePicker (cyclomatic 36) project/aitoearn-web/src/components/PublishDialog/compoents/PublishDatePicker/DateTimePicker.tsx:26 — DateTimePicker.DateTimePicker has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 14 of the 36 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 193, a function literal at line 251, a function literal at line 278, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DraftBoxCore.DraftBoxCore (cyclomatic 33) · ×1
  • DraftBoxCore.DraftBoxCore (cyclomatic 33) project/aitoearn-web/src/app/[lng]/draft-box/DraftBoxCore.tsx:21 — DraftBoxCore.DraftBoxCore has cyclomatic complexity 33 (threshold 15). Of this number, 22 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AideoService.processAideoTask (cyclomatic 32) · ×1
  • AideoService.processAideoTask (cyclomatic 32) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:135 — AideoService.processAideoTask has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EmailLoginForm.EmailLoginForm (cyclomatic 32) · ×1
  • EmailLoginForm.EmailLoginForm (cyclomatic 32) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:44 — EmailLoginForm.EmailLoginForm has cyclomatic complexity 32 (threshold 15). 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, handleGoogleSuccess, 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.
D1 · Cyclomatic Complexity · ProfileTab.ProfileTab (cyclomatic 32) · ×1
  • ProfileTab.ProfileTab (cyclomatic 32) project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:25 — ProfileTab.ProfileTab has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSaveName, handleCropComplete, handleFileSelect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · publish-content.utils.validatePublishContent (cyclomatic 31) · ×1
  • publish-content.utils.validatePublishContent (cyclomatic 31) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:36 — publish-content.utils.validatePublishContent has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.HomeChat (cyclomatic 31) · ×1
  • index.HomeChat (cyclomatic 31) project/aitoearn-web/src/app/[lng]/ai-social/components/HomeChat/index.tsx:51 — index.HomeChat has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 152, 67, 249, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.UserLogsModal (cyclomatic 31) · ×1
  • index.UserLogsModal (cyclomatic 31) project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:61 — index.UserLogsModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (loadLogs, a function literal at line 208, getStatusText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SharePreviewModal.SharePreviewModal (cyclomatic 31) · ×1
  • SharePreviewModal.SharePreviewModal (cyclomatic 31) project/aitoearn-web/src/components/Chat/Share/SharePreviewModal.tsx:50 — SharePreviewModal.SharePreviewModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 121, 82, 57, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · convertMessages.processResultMessage (cyclomatic 31) · ×1
  • convertMessages.processResultMessage (cyclomatic 31) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:513 — convertMessages.processResultMessage has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit (cyclomatic 31) · ×1
  • useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit (cyclomatic 31) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchSubmitHandler.ts:108 — useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · workDetail.transformToWorkDetail (cyclomatic 31) · ×1
  • workDetail.transformToWorkDetail (cyclomatic 31) project/aitoearn-web/src/store/plugin/plats/douyin/workDetail.ts:62 — workDetail.transformToWorkDetail has cyclomatic complexity 31 (threshold 15). Of this number, 29 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VolcengineVideoService.createFromRequest (cyclomatic 30) · ×1
  • VolcengineVideoService.createFromRequest (cyclomatic 30) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:49 — VolcengineVideoService.createFromRequest has cyclomatic complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · meta-graph-error.util.categoryFromMetaGraphError (cyclomatic 30) · ×1
  • meta-graph-error.util.categoryFromMetaGraphError (cyclomatic 30) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/meta-graph-error.util.ts:23 — meta-graph-error.util.categoryFromMetaGraphError has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · page.ChatDetailPage (cyclomatic 30) · ×1
  • page.ChatDetailPage (cyclomatic 30) project/aitoearn-web/src/app/[lng]/chat/[taskId]/page.tsx:25 — page.ChatDetailPage has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 112, 198, 273, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.GeneratingTaskCard (cyclomatic 30) · ×1
  • index.GeneratingTaskCard (cyclomatic 30) project/aitoearn-web/src/components/draft-box/components/GeneratingCard/index.tsx:109 — index.GeneratingTaskCard has cyclomatic complexity 30 (threshold 15). Of this number, 28 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useMaterialValidation.getMaterialValidationIssues (cyclomatic 30) · ×1
  • useMaterialValidation.getMaterialValidationIssues (cyclomatic 30) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useMaterialValidation.ts:56 — useMaterialValidation.getMaterialValidationIssues has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.TransferDraftDialog (cyclomatic 30) · ×1
  • index.TransferDraftDialog (cyclomatic 30) project/aitoearn-web/src/components/draft-box/components/TransferDraftDialog/index.tsx:58 — index.TransferDraftDialog has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 128, 88, 159, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · searchable-select.SearchableSelect (cyclomatic 30) · ×1
  • searchable-select.SearchableSelect (cyclomatic 30) project/aitoearn-web/src/components/ui/searchable-select.tsx:71 — searchable-select.SearchableSelect has cyclomatic complexity 30 (threshold 15). Of this number, 19 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AccountsTab.AccountsTab (cyclomatic 29) · ×1
  • AccountsTab.AccountsTab (cyclomatic 29) project/aitoearn-web/src/components/Plugin/PluginReady/AccountsTab.tsx:161 — AccountsTab.AccountsTab has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 330, a function literal at line 219, a function literal at line 196, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · platformCompatibility.checkPlatformCompatibility (cyclomatic 29) · ×1
  • platformCompatibility.checkPlatformCompatibility (cyclomatic 29) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/utils/platformCompatibility.ts:192 — platformCompatibility.checkPlatformCompatibility has cyclomatic complexity 29 (threshold 15). Of this number, 19 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useCreateMaterialForm.useCreateMaterialForm (cyclomatic 29) · ×1
  • useCreateMaterialForm.useCreateMaterialForm (cyclomatic 29) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:40 — useCreateMaterialForm.useCreateMaterialForm has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 174, 89, 76, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.TaskItem (cyclomatic 29) · ×1
  • index.TaskItem (cyclomatic 29) project/aitoearn-web/src/components/draft-box/components/GenerationDetailDialog/index.tsx:104 — index.TaskItem has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useChatState.useChatState (cyclomatic 28) · ×1
  • useChatState.useChatState (cyclomatic 28) project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts:46 — useChatState.useChatState has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 167, 220, 230, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · NavSection.NavItem (cyclomatic 28) · ×1
  • NavSection.NavItem (cyclomatic 28) project/aitoearn-web/src/app/layout/LayoutSidebar/components/NavSection.tsx:47 — NavSection.NavItem has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.BilibiliPartitionCascader (cyclomatic 28) · ×1
  • index.BilibiliPartitionCascader (cyclomatic 28) project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/BilibiliPartitionCascader/index.tsx:155 — index.BilibiliPartitionCascader has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 199, 229, 335, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · VideoCoverSeting.VideoCoverSeting (cyclomatic 28) · ×1
  • VideoCoverSeting.VideoCoverSeting (cyclomatic 28) project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:57 — VideoCoverSeting.VideoCoverSeting has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 121, 176, 75, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TasksHistoryPageContent.TasksHistoryPageContent (cyclomatic 27) · ×1
  • TasksHistoryPageContent.TasksHistoryPageContent (cyclomatic 27) project/aitoearn-web/src/app/[lng]/tasks-history/TasksHistoryPageContent.tsx:24 — TasksHistoryPageContent.TasksHistoryPageContent has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RatingModal.RatingModal (cyclomatic 27) · ×1
  • RatingModal.RatingModal (cyclomatic 27) project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:26 — RatingModal.RatingModal 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 4 function items inside it that branch (a function literal at line 46, handleSubmit, canSubmit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PublishDetailModal.PlatformTaskCard (cyclomatic 27) · ×1
  • PublishDetailModal.PlatformTaskCard (cyclomatic 27) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:356 — PublishDetailModal.PlatformTaskCard has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useCreateMaterialForm.useCreateMaterialForm.handleSubmit (cyclomatic 27) · ×1
  • useCreateMaterialForm.useCreateMaterialForm.handleSubmit (cyclomatic 27) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:250 — useCreateMaterialForm.useCreateMaterialForm.handleSubmit has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EngagementService.callFunction (cyclomatic 26) · ×1
  • EngagementService.callFunction (cyclomatic 26) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:102 — EngagementService.callFunction has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.CalendarHolidayBadge (cyclomatic 26) · ×1
  • index.CalendarHolidayBadge (cyclomatic 26) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarHolidayBadge/index.tsx:72 — index.CalendarHolidayBadge has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.PluginPublishingFloatButton (cyclomatic 26) · ×1
  • index.PluginPublishingFloatButton (cyclomatic 26) project/aitoearn-web/src/components/Plugin/PluginPublishingFloatButton/index.tsx:77 — index.PluginPublishingFloatButton has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 106, a function literal at line 135, handleOpenDetail). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.PlatformSelector (cyclomatic 26) · ×1
  • index.PlatformSelector (cyclomatic 26) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PlatformSelector/index.tsx:34 — index.PlatformSelector has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 8 of the 26 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 202, 47, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.ConditionalDeleteDialogContent (cyclomatic 26) · ×1
  • index.ConditionalDeleteDialogContent (cyclomatic 26) project/aitoearn-web/src/components/draft-box/components/ConditionalDeleteDialog/index.tsx:53 — index.ConditionalDeleteDialogContent has cyclomatic complexity 26 (threshold 15). Of this number, 15 points are the body's own statements and 11 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.usePlanTabStore (cyclomatic 26) · ×1
  • index.usePlanTabStore (cyclomatic 26) project/aitoearn-web/src/store/draft-box/planTabStore/index.ts:31 — index.usePlanTabStore has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 8 function items inside it that branch (syncTabs, a function literal at line 117, a function literal at line 163, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · google-api-error.util.categoryFromGoogleApiError (cyclomatic 25) · ×1
  • google-api-error.util.categoryFromGoogleApiError (cyclomatic 25) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/google-api-error.util.ts:48 — google-api-error.util.categoryFromGoogleApiError has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PublishRecordReadService.updateWorkLink (cyclomatic 24) · ×1
  • PublishRecordReadService.updateWorkLink (cyclomatic 24) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/records/publish-record-read.service.ts:92 — PublishRecordReadService.updateWorkLink has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.CalendarFestivalDetailDialog (cyclomatic 24) · ×1
  • index.CalendarFestivalDetailDialog (cyclomatic 24) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:64 — index.CalendarFestivalDetailDialog has cyclomatic complexity 24 (threshold 15). Of this number, 15 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.AvatarCropModal (cyclomatic 24) · ×1
  • index.AvatarCropModal (cyclomatic 24) project/aitoearn-web/src/app/layout/SettingsModal/tabs/components/AvatarCropModal/index.tsx:161 — index.AvatarCropModal has cyclomatic complexity 24 (threshold 15). Of this number, 19 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.DatePicker (cyclomatic 24) · ×1
  • index.DatePicker (cyclomatic 24) project/aitoearn-web/src/components/ui/date-picker/index.tsx:31 — index.DatePicker has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 162, 55, 83, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · steps.Steps (cyclomatic 24) · ×1
  • steps.Steps (cyclomatic 24) project/aitoearn-web/src/components/ui/steps.tsx:32 — steps.Steps has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 83, a function literal at line 132, getStepIcon, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · GeminiService.generateImage (cyclomatic 23) · ×1
  • GeminiService.generateImage (cyclomatic 23) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:49 — GeminiService.generateImage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 51). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AideoService.saveOutputVideos (cyclomatic 23) · ×1
  • AideoService.saveOutputVideos (cyclomatic 23) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:336 — AideoService.saveOutputVideos has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · publish.schema.getFieldLabel (cyclomatic 23) · ×1
  • publish.schema.getFieldLabel (cyclomatic 23) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/publish.schema.ts:117 — publish.schema.getFieldLabel has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ConnectChannelList.ConnectChannelList (cyclomatic 23) · ×1
  • ConnectChannelList.ConnectChannelList (cyclomatic 23) project/aitoearn-web/src/components/ChannelManager/components/ConnectChannelList.tsx:28 — ConnectChannelList.ConnectChannelList has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (handlePlatformClick, a function literal at line 148). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.MessageStepContent (cyclomatic 23) · ×1
  • index.MessageStepContent (cyclomatic 23) project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:111 — index.MessageStepContent 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 literals inside it that branch (lines 124, 262, 204, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TaskHistoryList.TaskHistoryList (cyclomatic 23) · ×1
  • TaskHistoryList.TaskHistoryList (cyclomatic 23) project/aitoearn-web/src/components/Chat/TaskHistoryList.tsx:29 — TaskHistoryList.TaskHistoryList has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (handleDelete, a function literal at line 87, handleRatingUpdate, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.MediaStackCard (cyclomatic 23) · ×1
  • index.MediaStackCard (cyclomatic 23) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ImageStack/components/MediaStackCard/index.tsx:22 — index.MediaStackCard has cyclomatic complexity 23 (threshold 15). Of this number, 17 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.
D1 · Cyclomatic Complexity · DraftDetailDialog.DraftDetailContent (cyclomatic 23) · ×1
  • DraftDetailDialog.DraftDetailContent (cyclomatic 23) project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:188 — DraftDetailDialog.DraftDetailContent has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · draftBoxConfigStore.useDraftBoxConfigStore (cyclomatic 23) · ×1
  • draftBoxConfigStore.useDraftBoxConfigStore (cyclomatic 23) project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:209 — draftBoxConfigStore.useDraftBoxConfigStore has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · publish.api.normalizeChannelPublishRecord (cyclomatic 22) · ×1
  • publish.api.normalizeChannelPublishRecord (cyclomatic 22) project/aitoearn-web/src/api/platforms/publish.api.ts:9 — publish.api.normalizeChannelPublishRecord has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useCalendarTiming.normalizePublishRecord (cyclomatic 22) · ×1
  • useCalendarTiming.normalizePublishRecord (cyclomatic 22) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts:84 — useCalendarTiming.normalizePublishRecord has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.TaskPreview (cyclomatic 22) · ×1
  • index.TaskPreview (cyclomatic 22) project/aitoearn-web/src/app/[lng]/ai-social/components/TaskPreview/index.tsx:40 — index.TaskPreview has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 78, a function literal at line 104, a function literal at line 151, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ChannelItem.ChannelItem (cyclomatic 22) · ×1
  • ChannelItem.ChannelItem (cyclomatic 22) project/aitoearn-web/src/components/ChannelManager/components/ChannelItem.tsx:39 — ChannelItem.ChannelItem has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · WorkflowComponents.WorkflowStepItem (cyclomatic 22) · ×1
  • WorkflowComponents.WorkflowStepItem (cyclomatic 22) project/aitoearn-web/src/components/Chat/ChatMessage/WorkflowComponents.tsx:29 — WorkflowComponents.WorkflowStepItem has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PublishDetailModal.UserActionPanel (cyclomatic 22) · ×1
  • PublishDetailModal.UserActionPanel (cyclomatic 22) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:175 — PublishDetailModal.UserActionPanel has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 210, handleCancelPublish, a function literal at line 233, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useUploadSync.useUploadSync (cyclomatic 22) · ×1
  • useUploadSync.useUploadSync (cyclomatic 22) project/aitoearn-web/src/components/PublishDialog/hooks/useUploadSync.ts:25 — useUploadSync.useUploadSync has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 39, 81, 31). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · usePublishDialogStorageStore.usePublishDialogStorageStore (cyclomatic 22) · ×1
  • usePublishDialogStorageStore.usePublishDialogStorageStore (cyclomatic 22) project/aitoearn-web/src/components/PublishDialog/usePublishDialogStorageStore.tsx:244 — usePublishDialogStorageStore.usePublishDialogStorageStore has cyclomatic complexity 22 (threshold 15). Of this number, 16 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.MediaCard (cyclomatic 22) · ×1
  • index.MediaCard (cyclomatic 22) project/aitoearn-web/src/components/draft-box/components/MediaCard/index.tsx:50 — index.MediaCard has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.DraftContentModule (cyclomatic 22) · ×1
  • index.DraftContentModule (cyclomatic 22) project/aitoearn-web/src/components/draft-box/components/DraftContentModule/index.tsx:52 — index.DraftContentModule has cyclomatic complexity 22 (threshold 15). Of this number, 11 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · homeFeed.transformToHomeFeedItem (cyclomatic 22) · ×1
  • homeFeed.transformToHomeFeedItem (cyclomatic 22) project/aitoearn-web/src/store/plugin/plats/douyin/homeFeed.ts:174 — homeFeed.transformToHomeFeedItem has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AgentRuntimeService.claudeQuery (cyclomatic 21) · ×1
  • AgentRuntimeService.claudeQuery (cyclomatic 21) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:195 — AgentRuntimeService.claudeQuery has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PublishTaskService.processPublishJob (cyclomatic 21) · ×1
  • PublishTaskService.processPublishJob (cyclomatic 21) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:58 — PublishTaskService.processPublishJob has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CalendarToolbar.CalendarToolbar (cyclomatic 21) · ×1
  • CalendarToolbar.CalendarToolbar (cyclomatic 21) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarToolbar.tsx:41 — CalendarToolbar.CalendarToolbar has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.TaskCard (cyclomatic 21) · ×1
  • index.TaskCard (cyclomatic 21) project/aitoearn-web/src/components/Chat/TaskCard/index.tsx:105 — index.TaskCard has cyclomatic complexity 21 (threshold 15). Of this number, 14 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PublishDetailModal.PublishDetailModal (cyclomatic 21) · ×1
  • PublishDetailModal.PublishDetailModal (cyclomatic 21) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:493 — PublishDetailModal.PublishDetailModal has cyclomatic complexity 21 (threshold 15). Of this number, 11 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.ModelSelect (cyclomatic 21) · ×1
  • index.ModelSelect (cyclomatic 21) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/components/ModelSelect/index.tsx:8 — index.ModelSelect has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 90, 57, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · modal.Modal (cyclomatic 21) · ×1
  • modal.Modal (cyclomatic 21) project/aitoearn-web/src/components/ui/modal.tsx:84 — modal.Modal has cyclomatic complexity 21 (threshold 15). Of this number, 19 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.
D1 · Cyclomatic Complexity · device.detectClientDeviceType (cyclomatic 21) · ×1
  • device.detectClientDeviceType (cyclomatic 21) project/aitoearn-web/src/store/user/utils/device.ts:36 — device.detectClientDeviceType has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.MobileCalendar · ×1
  • index.MobileCalendar::renderCalendarView (cyclomatic 20) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/index.tsx:423 — index.MobileCalendar::renderCalendarView has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainPage.MainPage (cyclomatic 20) · ×1
  • MainPage.MainPage (cyclomatic 20) project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:29 — MainPage.MainPage has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 153, 82, 112, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · WorkflowComponents.WorkflowSection (cyclomatic 20) · ×1
  • WorkflowComponents.WorkflowSection (cyclomatic 20) project/aitoearn-web/src/components/Chat/ChatMessage/WorkflowComponents.tsx:99 — WorkflowComponents.WorkflowSection has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DraftListSection.DraftCard (cyclomatic 20) · ×1
  • DraftListSection.DraftCard (cyclomatic 20) project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:89 — DraftListSection.DraftCard has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VolcengineVideoService.extractInput (cyclomatic 19) · ×1
  • VolcengineVideoService.extractInput (cyclomatic 19) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:377 — VolcengineVideoService.extractInput has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agent.utils.enhancePrompt (cyclomatic 19) · ×1
  • agent.utils.enhancePrompt (cyclomatic 19) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.utils.ts:21 — agent.utils.enhancePrompt has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhoneLoginForm.PhoneLoginForm (cyclomatic 19) · ×1
  • PhoneLoginForm.PhoneLoginForm (cyclomatic 19) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/PhoneLoginForm.tsx:37 — PhoneLoginForm.PhoneLoginForm has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (handleSubmit, handleSendCode). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SpaceItem.SpaceItem (cyclomatic 19) · ×1
  • SpaceItem.SpaceItem (cyclomatic 19) project/aitoearn-web/src/components/ChannelManager/components/SpaceItem.tsx:71 — SpaceItem.SpaceItem has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · number-input.NumberInput (cyclomatic 19) · ×1
  • number-input.NumberInput (cyclomatic 19) project/aitoearn-web/src/components/ui/number-input.tsx:28 — number-input.NumberInput has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (resolveBlurValue, a function literal at line 33, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · pagination.Pagination (cyclomatic 19) · ×1
  • pagination.Pagination (cyclomatic 19) project/aitoearn-web/src/components/ui/pagination.tsx:175 — pagination.Pagination has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (getPageNumbers, handlePageChange, a function literal at line 281, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useDouyinPublishSession.useDouyinPublishSession.pollOnce (cyclomatic 19) · ×1
  • useDouyinPublishSession.useDouyinPublishSession.pollOnce (cyclomatic 19) project/aitoearn-web/src/hooks/useDouyinPublishSession.ts:82 — useDouyinPublishSession.useDouyinPublishSession.pollOnce has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · OpenAIVideoService.callback (cyclomatic 18) · ×1
  • OpenAIVideoService.callback (cyclomatic 18) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/openai/openai.service.ts:169 — OpenAIVideoService.callback has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AuthService.getValidCredential (cyclomatic 18) · ×1
  • AuthService.getValidCredential (cyclomatic 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:506 — AuthService.getValidCredential has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaService.validateImage (cyclomatic 18) · ×1
  • MediaService.validateImage (cyclomatic 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:238 — MediaService.validateImage has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · build-docker.createDepsWorkspace (cyclomatic 18) · ×1
  • build-docker.createDepsWorkspace (cyclomatic 18) project/aitoearn-backend/scripts/build-docker.mjs:152 — build-docker.createDepsWorkspace has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · build-docker.resetDependencies (cyclomatic 18) · ×1
  • build-docker.resetDependencies (cyclomatic 18) project/aitoearn-backend/scripts/build-docker.mjs:271 — build-docker.resetDependencies has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.SettingsModal (cyclomatic 18) · ×1
  • index.SettingsModal (cyclomatic 18) project/aitoearn-web/src/app/layout/SettingsModal/index.tsx:49 — index.SettingsModal has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 58, a function literal at line 76, renderContent, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · generateShareImages.forceOpaqueStyles (cyclomatic 18) · ×1
  • generateShareImages.forceOpaqueStyles (cyclomatic 18) project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:403 — generateShareImages.forceOpaqueStyles has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 456, 427, 447). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.ToolBarInline (cyclomatic 18) · ×1
  • index.ToolBarInline (cyclomatic 18) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/index.tsx:33 — index.ToolBarInline has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sse.handler.handleStreamEvent (cyclomatic 18) · ×1
  • sse.handler.handleStreamEvent (cyclomatic 18) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:110 — sse.handler.handleStreamEvent has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VideoTaskStatusScheduler.processTask (cyclomatic 17) · ×1
  • VideoTaskStatusScheduler.processTask (cyclomatic 17) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/video-task-status.scheduler.ts:66 — VideoTaskStatusScheduler.processTask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AideoMcp.createGetAideoTaskStatusTool (cyclomatic 17) · ×1
  • AideoMcp.createGetAideoTaskStatusTool (cyclomatic 17) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/aideo.mcp.ts:69 — AideoMcp.createGetAideoTaskStatusTool 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 2 function literals inside it that branch (lines 82, 110). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · draft-generation-platforms.getCompatibleAccountTypes (cyclomatic 17) · ×1
  • draft-generation-platforms.getCompatibleAccountTypes (cyclomatic 17) project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation-platforms.ts:127 — draft-generation-platforms.getCompatibleAccountTypes 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 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · publish.schema.getPublishValidationIssueMessage (cyclomatic 17) · ×1
  • publish.schema.getPublishValidationIssueMessage (cyclomatic 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/publish.schema.ts:69 — publish.schema.getPublishValidationIssueMessage has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · load-file-from-env.util.loadFilesFromEnvSync (cyclomatic 17) · ×1
  • load-file-from-env.util.loadFilesFromEnvSync (cyclomatic 17) project/aitoearn-backend/libs/common/src/utils/load-file-from-env.util.ts:11 — load-file-from-env.util.loadFilesFromEnvSync has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.PCWeekView (cyclomatic 17) · ×1
  • index.PCWeekView (cyclomatic 17) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/PCWeekView/index.tsx:217 — index.PCWeekView 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 8 function literals inside it that branch (lines 331, 246, 412, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AuthLoadingPage.AuthLoadingPage (cyclomatic 17) · ×1
  • AuthLoadingPage.AuthLoadingPage (cyclomatic 17) project/aitoearn-web/src/components/ChannelManager/components/AuthLoadingPage.tsx:17 — AuthLoadingPage.AuthLoadingPage has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnifiedChannelSpaceList.UnifiedChannelSpaceList (cyclomatic 17) · ×1
  • UnifiedChannelSpaceList.UnifiedChannelSpaceList (cyclomatic 17) project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx:26 — UnifiedChannelSpaceList.UnifiedChannelSpaceList has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 141, 67, 97, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SelectableMediaCard.SelectableMediaCard (cyclomatic 17) · ×1
  • SelectableMediaCard.SelectableMediaCard (cyclomatic 17) project/aitoearn-web/src/components/PublishDialog/compoents/MaterialSelectionModal/components/SelectableMediaCard.tsx:17 — SelectableMediaCard.SelectableMediaCard has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TwitterMediaSection.TwitterMediaSection (cyclomatic 17) · ×1
  • TwitterMediaSection.TwitterMediaSection (cyclomatic 17) project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/TwitterMediaSection.tsx:25 — TwitterMediaSection.TwitterMediaSection has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CropOverlay.CropOverlay (cyclomatic 17) · ×1
  • CropOverlay.CropOverlay (cyclomatic 17) project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/CropOverlay.tsx:39 — CropOverlay.CropOverlay 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.
D1 · Cyclomatic Complexity · index.AllDraftCard (cyclomatic 17) · ×1
  • index.AllDraftCard (cyclomatic 17) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:77 — index.AllDraftCard has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.MorePanel (cyclomatic 17) · ×1
  • index.MorePanel (cyclomatic 17) project/aitoearn-web/src/components/draft-box/components/PlanTabBar/MorePanel/index.tsx:37 — index.MorePanel has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 7 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GeminiService.extractGeminiModalityTokenDetails (cyclomatic 16) · ×1
  • GeminiService.extractGeminiModalityTokenDetails (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:163 — GeminiService.extractGeminiModalityTokenDetails has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · volcengine.utils.validateVideoAudioMergeInputs (cyclomatic 16) · ×1
  • volcengine.utils.validateVideoAudioMergeInputs (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.utils.ts:191 — volcengine.utils.validateVideoAudioMergeInputs has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DashscopeVideoService.buildPayload (cyclomatic 16) · ×1
  • DashscopeVideoService.buildPayload (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/dashscope/dashscope.service.ts:145 — DashscopeVideoService.buildPayload has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VolcengineVideoService.callback (cyclomatic 16) · ×1
  • VolcengineVideoService.callback (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:277 — VolcengineVideoService.callback has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · agent.utils.sanitizeMessage (cyclomatic 16) · ×1
  • agent.utils.sanitizeMessage (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.utils.ts:129 — agent.utils.sanitizeMessage 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 4 function literals inside it that branch (lines 139, 132, 141, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MediaService.preparePublishImage (cyclomatic 16) · ×1
  • MediaService.preparePublishImage (cyclomatic 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:630 — MediaService.preparePublishImage has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AssetsService.confirmUploadByUser (cyclomatic 16) · ×1
  • AssetsService.confirmUploadByUser (cyclomatic 16) project/aitoearn-backend/libs/assets/src/assets.service.ts:349 — AssetsService.confirmUploadByUser has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · api-doc.decorator.ApiDoc (cyclomatic 16) · ×1
  • api-doc.decorator.ApiDoc (cyclomatic 16) project/aitoearn-backend/libs/common/src/decorators/api-doc.decorator.ts:42 — api-doc.decorator.ApiDoc has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.TimeCell (cyclomatic 16) · ×1
  • index.TimeCell (cyclomatic 16) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/PCWeekView/index.tsx:100 — index.TimeCell has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · agentAssetsPageCore.AgentAssetsPageCore (cyclomatic 16) · ×1
  • agentAssetsPageCore.AgentAssetsPageCore (cyclomatic 16) project/aitoearn-web/src/app/[lng]/agent-assets/agentAssetsPageCore.tsx:46 — agentAssetsPageCore.AgentAssetsPageCore has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 91, 67, 128, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AiSocialPageContent.AiSocialPageContent (cyclomatic 16) · ×1
  • AiSocialPageContent.AiSocialPageContent (cyclomatic 16) project/aitoearn-web/src/app/[lng]/ai-social/AiSocialPageContent.tsx:22 — AiSocialPageContent.AiSocialPageContent has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 157, a function literal at line 131, BackToTop, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.ChatMessageList (cyclomatic 16) · ×1
  • index.ChatMessageList (cyclomatic 16) project/aitoearn-web/src/app/[lng]/chat/[taskId]/components/ChatMessageList/index.tsx:44 — index.ChatMessageList has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · index.ConfigJsonPanel (cyclomatic 16) · ×1
  • index.ConfigJsonPanel (cyclomatic 16) project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigJsonPanel/index.tsx:179 — index.ConfigJsonPanel has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 212, 203, 278, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · UserDropdownMenu.UserDropdownMenu (cyclomatic 16) · ×1
  • UserDropdownMenu.UserDropdownMenu (cyclomatic 16) project/aitoearn-web/src/app/layout/LayoutSidebar/components/UserDropdownMenu.tsx:195 — UserDropdownMenu.UserDropdownMenu has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · validation.getTwitterPublishValidationMessages (cyclomatic 16) · ×1
  • validation.getTwitterPublishValidationMessages (cyclomatic 16) project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/validation.ts:5 — validation.getTwitterPublishValidationMessages has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.MediaMentionThumbnail (cyclomatic 16) · ×1
  • index.MediaMentionThumbnail (cyclomatic 16) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/components/MediaMentionThumbnail/index.tsx:18 — index.MediaMentionThumbnail has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · platformLimits.calcEffectiveLimitsDetailed (cyclomatic 16) · ×1
  • platformLimits.calcEffectiveLimitsDetailed (cyclomatic 16) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/utils/platformLimits.ts:48 — platformLimits.calcEffectiveLimitsDetailed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.CreatePlanModal (cyclomatic 16) · ×1
  • index.CreatePlanModal (cyclomatic 16) project/aitoearn-web/src/components/draft-box/components/CreatePlanModal/index.tsx:25 — index.CreatePlanModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 63, 52, 100). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sse.handler.handleSSEMessage (cyclomatic 16) · ×1
  • sse.handler.handleSSEMessage (cyclomatic 16) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:37 — sse.handler.handleSSEMessage has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D12 · Dependency Hygiene · One package at two majors across the workspace · ×1
  • One package at two majors across the workspace: zod — `zod` is maintained at 2 different major versions inside this one repository — major 3 in REDACTED; major 4 in REDACTED, REDACTED, REDACTED (+3 more). Every major carries its own breaking changes, advisories and upgrade path, so the cost of keeping current is paid more than once; and where the packages are installed together, the resolver cannot dedupe them, so both copies ship.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:58 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in PublishTaskService.processPublishJob at line 58. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:34:30 +08:00' --until='2026-11-16 18:34:30 +08:00' --full-history --no-merges -- project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D15 · Churn × Complexity Hotspots · Repeated repair · ×1
  • Repeated repair: project/aitoearn-backend/libs/assets/src/video-metadata.service.ts project/aitoearn-backend/libs/assets/src/video-metadata.service.ts:49 — project/aitoearn-backend/libs/assets/src/video-metadata.service.ts changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is VideoMetadataService.probeVideoMetadata at line 49), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: close gaps in open issues #592 #597 #579 #586”; “fix(facebook): transcode incompatible videos to H.264 faststart before upload (fixes #592)”; “fix(assets): validate media URLs and identify ffprobe when probing remote videos (fixes #597)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 18:34:30 +08:00' --until='2026-11-16 18:34:30 +08:00' --full-history --no-merges -- project/aitoearn-backend/libs/assets/src/video-metadata.service.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D2 · Cognitive Complexity · usePubParamsVerify.usePubParamsVerify.errParamsMap (cognitive 258) · ×1
  • usePubParamsVerify.usePubParamsVerify.errParamsMap (cognitive 258) project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264 — usePubParamsVerify.usePubParamsVerify.errParamsMap has cognitive complexity 258 (threshold 15). Drivers by points: if/else 72 (195 pts), boolean chains 45, loops 3 (9 pts), match/switch 2 (6 pts), ternaries 1 (3 pts) (nesting depth added 135). Of this number, 248 points are the body's own statements and 10 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useAiBatchGenerateBarController.useAiBatchGenerateBarController (cognitive 226) · ×1
  • useAiBatchGenerateBarController.useAiBatchGenerateBarController (cognitive 226) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:61 — useAiBatchGenerateBarController.useAiBatchGenerateBarController has cognitive complexity 226 (threshold 15). Drivers by points: if/else 99 (116 pts), ternaries 46 (59 pts), boolean chains 41, loops 5 (10 pts) (nesting depth added 35). Most of this is not in the body itself: 10 of the 226 points are its own statements and the rest belongs to 37 function literals inside it that branch (lines 728, 1155, 348, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload (cognitive 103) · ×1
  • useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload (cognitive 103) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useLocalUploadHandler.ts:67 — useLocalUploadHandler.useLocalUploadHandler.handleLocalUpload has cognitive complexity 103 (threshold 15). Drivers by points: if/else 33 (71 pts), boolean chains 16, error handling 2 (6 pts), ternaries 4 (6 pts), loops 2 (4 pts) (nesting depth added 46). Of this number, 100 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShareModal.ShareModal (cognitive 102) · ×1
  • ShareModal.ShareModal (cognitive 102) project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:65 — ShareModal.ShareModal has cognitive complexity 102 (threshold 15). Drivers by points: if/else 30 (37 pts), ternaries 15 (28 pts), boolean chains 24, error handling 9 (12 pts), loops 1 (nesting depth added 23). Most of this is not in the body itself: 10 of the 102 points are its own statements and the rest belongs to 19 function literals inside it that branch (lines 347, 282, 437, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · platformCompatibility.checkPlatformCompatibility (cognitive 97) · ×1
  • platformCompatibility.checkPlatformCompatibility (cognitive 97) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/utils/platformCompatibility.ts:192 — platformCompatibility.checkPlatformCompatibility has cognitive complexity 97 (threshold 15). Drivers by points: if/else 21 (88 pts), boolean chains 8, loops 1 (nesting depth added 67). Of this number, 65 points are the body's own statements and 32 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · accountCore.AccountPageCore (cognitive 92) · ×1
  • accountCore.AccountPageCore (cognitive 92) project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:42 — accountCore.AccountPageCore has cognitive complexity 92 (threshold 15). Drivers by points: if/else 29 (54 pts), boolean chains 17, error handling 4 (13 pts), ternaries 4 (8 pts) (nesting depth added 38). Most of this is not in the body itself: 2 of the 92 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 82, a function literal at line 273, 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.
D2 · Cognitive Complexity · index.ConfigManagerDialog (cognitive 90) · ×1
  • index.ConfigManagerDialog (cognitive 90) project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:207 — index.ConfigManagerDialog has cognitive complexity 90 (threshold 15). Drivers by points: if/else 34 (36 pts), boolean chains 32, ternaries 13 (16 pts), error handling 5, loops 1 (nesting depth added 5). Of this number, 29 points are the body's own statements and 61 belong to 23 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · convertMessages.convertMessages (cognitive 90) · ×1
  • convertMessages.convertMessages (cognitive 90) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:37 — convertMessages.convertMessages has cognitive complexity 90 (threshold 15). Drivers by points: if/else 27 (60 pts), boolean chains 20, loops 1 (5 pts), ternaries 2 (5 pts) (nesting depth added 40). None of this is in the body itself: all 90 points belong to 7 function items inside it that branch (a function literal at line 96, a function literal at line 86, saveStepsToMessage, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · convertMessages.processUserMessage (cognitive 67) · ×1
  • convertMessages.processUserMessage (cognitive 67) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:285 — convertMessages.processUserMessage has cognitive complexity 67 (threshold 15). Drivers by points: if/else 23 (50 pts), boolean chains 15, ternaries 1 (2 pts) (nesting depth added 28). Of this number, 22 points are the body's own statements and 45 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.DesktopPublishContent (cognitive 65) · ×1
  • index.DesktopPublishContent (cognitive 65) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:96 — index.DesktopPublishContent has cognitive complexity 65 (threshold 15). Drivers by points: ternaries 15 (24 pts), if/else 17 (22 pts), boolean chains 19 (nesting depth added 14). Of this number, 26 points are the body's own statements and 39 belong to 9 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.PluginPublishCard (cognitive 63) · ×1
  • index.PluginPublishCard (cognitive 63) project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:61 — index.PluginPublishCard has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 33, if/else 25 (27 pts), ternaries 2, match/switch 1 (nesting depth added 2). Of this number, 35 points are the body's own statements and 28 belong to 12 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PublishFlowService.createFlowRecords (cognitive 60) · ×1
  • PublishFlowService.createFlowRecords (cognitive 60) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/flows/publish-flow.service.ts:78 — PublishFlowService.createFlowRecords has cognitive complexity 60 (threshold 15). Drivers by points: if/else 19 (35 pts), ternaries 6 (13 pts), boolean chains 7, loops 5 (nesting depth added 23). Of this number, 59 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MaterialSelectionModalContent (cognitive 60) · ×1
  • index.MaterialSelectionModalContent (cognitive 60) project/aitoearn-web/src/components/PublishDialog/compoents/MaterialSelectionModal/index.tsx:84 — index.MaterialSelectionModalContent has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (25 pts), ternaries 8 (17 pts), boolean chains 12, error handling 5 (6 pts) (nesting depth added 14). Of this number, 20 points are the body's own statements and 40 belong to 9 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useTaskPolling.useTaskPolling (cognitive 57) · ×1
  • useTaskPolling.useTaskPolling (cognitive 57) project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:43 — useTaskPolling.useTaskPolling has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 7, loops 3 (5 pts), ternaries 3, error handling 1 (nesting depth added 24). None of this is in the body itself: all 57 points belong to 5 function literals inside it that branch (lines 95, 71, 239, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DraftListSection.DraftListSection (cognitive 57) · ×1
  • DraftListSection.DraftListSection (cognitive 57) project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:256 — DraftListSection.DraftListSection has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 28, ternaries 19 (22 pts), if/else 5, match/switch 2 (nesting depth added 3). Of this number, 46 points are the body's own statements and 11 belong to 7 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · usePublishActions.usePublishActions.pubClick (cognitive 55) · ×1
  • usePublishActions.usePublishActions.pubClick (cognitive 55) project/aitoearn-web/src/components/PublishDialog/hooks/usePublishActions.ts:181 — usePublishActions.usePublishActions.pubClick has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 17, error handling 4 (8 pts), ternaries 4 (6 pts) (nesting depth added 9). Of this number, 25 points are the body's own statements and 30 belong to 9 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit (cognitive 54) · ×1
  • useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit (cognitive 54) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchSubmitHandler.ts:108 — useAiBatchSubmitHandler.useAiBatchSubmitHandler.handleSubmit has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 9 (17 pts), boolean chains 9 (nesting depth added 19). Of this number, 52 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NotificationCenter.NotificationCenter (cognitive 53) · ×1
  • NotificationCenter.NotificationCenter (cognitive 53) project/aitoearn-web/src/components/ui/NotificationCenter.tsx:75 — NotificationCenter.NotificationCenter has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (23 pts), ternaries 13 (17 pts), boolean chains 13 (nesting depth added 11). None of this is in the body itself: all 53 points belong to 17 function items inside it that branch (a function literal at line 82, a function literal at line 269, a function literal at line 159, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AideoService.saveOutputVideos (cognitive 52) · ×1
  • AideoService.saveOutputVideos (cognitive 52) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:336 — AideoService.saveOutputVideos has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 5, loops 1 (3 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.ChatInput (cognitive 51) · ×1
  • index.ChatInput (cognitive 51) project/aitoearn-web/src/components/Chat/ChatInput/index.tsx:65 — index.ChatInput has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 10 (16 pts), boolean chains 15, loops 1 (nesting depth added 11). Of this number, 27 points are the body's own statements and 24 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MediaListSection (cognitive 48) · ×1
  • index.MediaListSection (cognitive 48) project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:81 — index.MediaListSection has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 13 (21 pts), boolean chains 15, if/else 12 (nesting depth added 8). Of this number, 33 points are the body's own statements and 15 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.AllListSection (cognitive 46) · ×1
  • index.AllListSection (cognitive 46) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:176 — index.AllListSection has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16, boolean chains 15, ternaries 9 (15 pts) (nesting depth added 6). Of this number, 27 points are the body's own statements and 19 belong to 11 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.VideoHistoryModal (cognitive 45) · ×1
  • index.VideoHistoryModal (cognitive 45) project/aitoearn-web/src/app/[lng]/tasks-history/components/VideoHistoryModal/index.tsx:36 — index.VideoHistoryModal has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 13, if/else 11 (12 pts), error handling 1, match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 6 of the 45 points are its own statements and the rest belongs to 10 function items inside it that branch (loadVideos, parseTimestamp, a function literal at line 210, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MobilePublishContent.MobilePublishContent (cognitive 45) · ×1
  • MobilePublishContent.MobilePublishContent (cognitive 45) project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:67 — MobilePublishContent.MobilePublishContent has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 21, if/else 13 (14 pts), ternaries 9 (10 pts) (nesting depth added 2). Of this number, 21 points are the body's own statements and 24 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · MobileContent.MobileContent (cognitive 43) · ×1
  • MobileContent.MobileContent (cognitive 43) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:35 — MobileContent.MobileContent has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 23, if/else 14 (16 pts), ternaries 3, loops 1 (nesting depth added 2). Most of this is not in the body itself: 12 of the 43 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 95, 77, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.HomeChat (cognitive 42) · ×1
  • index.HomeChat (cognitive 42) project/aitoearn-web/src/app/[lng]/ai-social/components/HomeChat/index.tsx:51 — index.HomeChat has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 9, error handling 3 (6 pts), ternaries 2 (4 pts) (nesting depth added 12). Most of this is not in the body itself: 1 of the 42 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 152, 67, 249, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.MobileCalendar · ×1
  • index.MobileCalendar::renderCalendarView (cognitive 41) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/index.tsx:423 — index.MobileCalendar::renderCalendarView has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 15 (36 pts), if/else 4 (5 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmailLoginForm.EmailLoginForm (cognitive 41) · ×1
  • EmailLoginForm.EmailLoginForm (cognitive 41) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:44 — EmailLoginForm.EmailLoginForm has cognitive complexity 41 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 12, ternaries 3 (4 pts), error handling 3 (nesting depth added 5). Most of this is not in the body itself: 9 of the 41 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSubmit, handleGoogleSuccess, 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.
D2 · Cognitive Complexity · useMaterialValidation.getMaterialValidationIssues (cognitive 41) · ×1
  • useMaterialValidation.getMaterialValidationIssues (cognitive 41) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useMaterialValidation.ts:56 — useMaterialValidation.getMaterialValidationIssues has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 9, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MediaUpload (cognitive 38) · ×1
  • index.MediaUpload (cognitive 38) project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:78 — index.MediaUpload has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 21, if/else 12 (13 pts), loops 1 (3 pts), ternaries 1 (nesting depth added 3). Of this number, 16 points are the body's own statements and 22 belong to 9 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · convertMessages.processResultMessage (cognitive 38) · ×1
  • convertMessages.processResultMessage (cognitive 38) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:513 — convertMessages.processResultMessage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 14, ternaries 3 (8 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MediaPreview (cognitive 38) · ×1
  • index.MediaPreview (cognitive 38) project/aitoearn-web/src/components/common/MediaPreview/index.tsx:59 — index.MediaPreview has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (23 pts), boolean chains 14, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 11 of the 38 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 111, a function literal at line 206, handleDoubleClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AideoService.processAideoTask (cognitive 37) · ×1
  • AideoService.processAideoTask (cognitive 37) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:135 — AideoService.processAideoTask has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 9, ternaries 1 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DateTimePicker.DateTimePicker (cognitive 37) · ×1
  • DateTimePicker.DateTimePicker (cognitive 37) project/aitoearn-web/src/components/PublishDialog/compoents/PublishDatePicker/DateTimePicker.tsx:26 — DateTimePicker.DateTimePicker has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 19, if/else 7 (9 pts), ternaries 6, loops 3 (nesting depth added 2). Most of this is not in the body itself: 13 of the 37 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 193, a function literal at line 62, a function literal at line 71, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.DateRangeCalendar (cognitive 37) · ×1
  • index.DateRangeCalendar (cognitive 37) project/aitoearn-web/src/components/ui/date-range-picker/index.tsx:38 — index.DateRangeCalendar has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 20, if/else 6 (7 pts), ternaries 4 (6 pts), loops 4 (nesting depth added 3). Most of this is not in the body itself: 4 of the 37 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 177, 121, 95, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PublishTaskService.processPublishJob (cognitive 36) · ×1
  • PublishTaskService.processPublishJob (cognitive 36) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:58 — PublishTaskService.processPublishJob has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 5 (13 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProfileTab.ProfileTab (cognitive 35) · ×1
  • ProfileTab.ProfileTab (cognitive 35) project/aitoearn-web/src/app/layout/SettingsModal/tabs/ProfileTab.tsx:25 — ProfileTab.ProfileTab has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 13, ternaries 5 (6 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 11 of the 35 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSaveName, handleCropComplete, handleFileSelect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.ChatMessage (cognitive 35) · ×1
  • index.ChatMessage (cognitive 35) project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:357 — index.ChatMessage has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 24, ternaries 4 (6 pts), if/else 4 (5 pts) (nesting depth added 3). Of this number, 22 points are the body's own statements and 13 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ChannelSidebar.ChannelSidebar (cognitive 34) · ×1
  • ChannelSidebar.ChannelSidebar (cognitive 34) project/aitoearn-web/src/components/ChannelManager/components/ChannelSidebar.tsx:25 — ChannelSidebar.ChannelSidebar has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 16, ternaries 9 (10 pts), if/else 6 (7 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 34 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 163, handlePlatformClick, a function literal at line 54, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.PublishDetailCard (cognitive 34) · ×1
  • index.PublishDetailCard (cognitive 34) project/aitoearn-web/src/components/Chat/ChatMessage/PublishDetailCard/index.tsx:60 — index.PublishDetailCard has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 18, if/else 11, ternaries 2 (3 pts), error handling 1, match/switch 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.UserLogsModal (cognitive 33) · ×1
  • index.UserLogsModal (cognitive 33) project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:61 — index.UserLogsModal has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 11, ternaries 4 (10 pts), if/else 8 (9 pts), match/switch 2, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (loadLogs, a function literal at line 208, handleLoadMore, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AccountsTab.AccountsTab (cognitive 33) · ×1
  • AccountsTab.AccountsTab (cognitive 33) project/aitoearn-web/src/components/Plugin/PluginReady/AccountsTab.tsx:161 — AccountsTab.AccountsTab has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 9 (13 pts), boolean chains 9, if/else 9, error handling 2 (nesting depth added 4). None of this is in the body itself: all 33 points belong to 8 function items inside it that branch (a function literal at line 330, a function literal at line 219, a function literal at line 196, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useCreateMaterialForm.useCreateMaterialForm (cognitive 33) · ×1
  • useCreateMaterialForm.useCreateMaterialForm (cognitive 33) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:40 — useCreateMaterialForm.useCreateMaterialForm has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 12, ternaries 2 (4 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 174, 89, 76, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.GenerationParamsCard (cognitive 33) · ×1
  • index.GenerationParamsCard (cognitive 33) project/aitoearn-web/src/components/draft-box/components/GenerationParamsCard/index.tsx:226 — index.GenerationParamsCard has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 14, if/else 14, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 20 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VolcengineVideoService.createFromRequest (cognitive 32) · ×1
  • VolcengineVideoService.createFromRequest (cognitive 32) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:49 — VolcengineVideoService.createFromRequest has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 15, ternaries 6 (8 pts), if/else 4 (5 pts), loops 3 (4 pts) (nesting depth added 4). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AideoMcp.createGetAideoTaskStatusTool (cognitive 32) · ×1
  • AideoMcp.createGetAideoTaskStatusTool (cognitive 32) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/aideo.mcp.ts:69 — AideoMcp.createGetAideoTaskStatusTool has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 4 (nesting depth added 16). None of this is in the body itself: all 32 points belong to 2 function literals inside it that branch (lines 82, 110). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · page.ChatDetailPage (cognitive 32) · ×1
  • page.ChatDetailPage (cognitive 32) project/aitoearn-web/src/app/[lng]/chat/[taskId]/page.tsx:25 — page.ChatDetailPage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 9, error handling 4, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 112, 198, 273, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TaskHistoryList.TaskHistoryList (cognitive 32) · ×1
  • TaskHistoryList.TaskHistoryList (cognitive 32) project/aitoearn-web/src/components/Chat/TaskHistoryList.tsx:29 — TaskHistoryList.TaskHistoryList has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 8 (15 pts), if/else 8 (10 pts), boolean chains 5, error handling 2 (nesting depth added 9). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 9 function items inside it that branch (handleDelete, a function literal at line 87, a function literal at line 90, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · build-docker.createDepsWorkspace (cognitive 31) · ×1
  • build-docker.createDepsWorkspace (cognitive 31) project/aitoearn-backend/scripts/build-docker.mjs:152 — build-docker.createDepsWorkspace has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 3 (4 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TasksHistoryPageContent.TasksHistoryPageContent (cognitive 31) · ×1
  • TasksHistoryPageContent.TasksHistoryPageContent (cognitive 31) project/aitoearn-web/src/app/[lng]/tasks-history/TasksHistoryPageContent.tsx:24 — TasksHistoryPageContent.TasksHistoryPageContent has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 14, ternaries 5 (11 pts), if/else 5, error handling 1 (nesting depth added 6). Of this number, 19 points are the body's own statements and 12 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.GeneratingTaskCard (cognitive 31) · ×1
  • index.GeneratingTaskCard (cognitive 31) project/aitoearn-web/src/components/draft-box/components/GeneratingCard/index.tsx:109 — index.GeneratingTaskCard has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 17, ternaries 9 (14 pts) (nesting depth added 5). Of this number, 30 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · load-file-from-env.util.loadFilesFromEnvSync (cognitive 30) · ×1
  • load-file-from-env.util.loadFilesFromEnvSync (cognitive 30) project/aitoearn-backend/libs/common/src/utils/load-file-from-env.util.ts:11 — load-file-from-env.util.loadFilesFromEnvSync has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 3 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useChatState.useChatState (cognitive 30) · ×1
  • useChatState.useChatState (cognitive 30) project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useChatState.ts:46 — useChatState.useChatState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 10, ternaries 2, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 167, 220, 230, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · usePubParamsVerify.usePubParamsVerify.warningParamsMap (cognitive 30) · ×1
  • usePubParamsVerify.usePubParamsVerify.warningParamsMap (cognitive 30) project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:699 — usePubParamsVerify.usePubParamsVerify.warningParamsMap has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 2, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.TransferDraftDialog (cognitive 30) · ×1
  • index.TransferDraftDialog (cognitive 30) project/aitoearn-web/src/components/draft-box/components/TransferDraftDialog/index.tsx:58 — index.TransferDraftDialog has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 7, ternaries 3 (5 pts), error handling 2 (nesting depth added 4). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 128, 220, 88, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · publish-content.utils.validatePublishContent (cognitive 29) · ×1
  • publish-content.utils.validatePublishContent (cognitive 29) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:36 — publish-content.utils.validatePublishContent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PublishRecordReadService.updateWorkLink (cognitive 29) · ×1
  • PublishRecordReadService.updateWorkLink (cognitive 29) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/records/publish-record-read.service.ts:92 — PublishRecordReadService.updateWorkLink has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SharePreviewModal.SharePreviewModal (cognitive 29) · ×1
  • SharePreviewModal.SharePreviewModal (cognitive 29) project/aitoearn-web/src/components/Chat/Share/SharePreviewModal.tsx:50 — SharePreviewModal.SharePreviewModal has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 18, if/else 6, error handling 3, loops 1, ternaries 1. Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 121, 82, 57, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useCreateMaterialForm.useCreateMaterialForm.handleSubmit (cognitive 29) · ×1
  • useCreateMaterialForm.useCreateMaterialForm.handleSubmit (cognitive 29) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:250 — useCreateMaterialForm.useCreateMaterialForm.handleSubmit has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 10, error handling 1, ternaries 1 (nesting depth added 3). Of this number, 27 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · searchable-select.SearchableSelect (cognitive 29) · ×1
  • searchable-select.SearchableSelect (cognitive 29) project/aitoearn-web/src/components/ui/searchable-select.tsx:71 — searchable-select.SearchableSelect has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 17, if/else 7, ternaries 4 (5 pts) (nesting depth added 1). Of this number, 18 points are the body's own statements and 11 belong to 7 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.MessageStepContent (cognitive 28) · ×1
  • index.MessageStepContent (cognitive 28) project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:111 — index.MessageStepContent has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 10, ternaries 4 (10 pts), if/else 7 (8 pts) (nesting depth added 7). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 124, 262, 204, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.PlatformSelector (cognitive 28) · ×1
  • index.PlatformSelector (cognitive 28) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/PlatformSelector/index.tsx:34 — index.PlatformSelector has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 10, if/else 9 (10 pts), ternaries 7 (8 pts) (nesting depth added 2). Most of this is not in the body itself: 7 of the 28 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 202, 47, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · RatingModal.RatingModal (cognitive 27) · ×1
  • RatingModal.RatingModal (cognitive 27) project/aitoearn-web/src/components/Chat/Rating/RatingModal.tsx:26 — RatingModal.RatingModal has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (8 pts), ternaries 3 (4 pts), error handling 2 (nesting depth added 2). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 46, handleSubmit, canSubmit, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.TaskItem (cognitive 27) · ×1
  • index.TaskItem (cognitive 27) project/aitoearn-web/src/components/draft-box/components/GenerationDetailDialog/index.tsx:104 — index.TaskItem has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 15, ternaries 9 (12 pts) (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · workDetail.transformToWorkDetail (cognitive 27) · ×1
  • workDetail.transformToWorkDetail (cognitive 27) project/aitoearn-web/src/store/plugin/plats/douyin/workDetail.ts:62 — workDetail.transformToWorkDetail has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 17, if/else 5 (7 pts), ternaries 3 (nesting depth added 2). Of this number, 23 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AideoService.getAideoTaskResult (cognitive 26) · ×1
  • AideoService.getAideoTaskResult (cognitive 26) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/aideo.service.ts:121 — AideoService.getAideoTaskResult has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (9 pts), ternaries 2 (9 pts), error handling 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · agent.utils.sanitizeMessage (cognitive 26) · ×1
  • agent.utils.sanitizeMessage (cognitive 26) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.utils.ts:129 — agent.utils.sanitizeMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 4 (nesting depth added 13). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 141, 151, 132, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · EngagementService.callFunction (cognitive 26) · ×1
  • EngagementService.callFunction (cognitive 26) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:102 — EngagementService.callFunction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CalendarToolbar.CalendarToolbar (cognitive 26) · ×1
  • CalendarToolbar.CalendarToolbar (cognitive 26) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarToolbar.tsx:41 — CalendarToolbar.CalendarToolbar has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 2, ternaries 2, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 59). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.BilibiliPartitionCascader (cognitive 26) · ×1
  • index.BilibiliPartitionCascader (cognitive 26) project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/BilibiliPartitionCascader/index.tsx:155 — index.BilibiliPartitionCascader has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 10, ternaries 5 (6 pts) (nesting depth added 1). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 199, 229, 335, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · platformLimits.calcEffectiveLimitsDetailed (cognitive 26) · ×1
  • platformLimits.calcEffectiveLimitsDetailed (cognitive 26) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/utils/platformLimits.ts:48 — platformLimits.calcEffectiveLimitsDetailed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeminiService.generateImage (cognitive 25) · ×1
  • GeminiService.generateImage (cognitive 25) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:49 — GeminiService.generateImage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (8 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to one function literal inside it that branches (line 51). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · VolcengineVideoService.extractInput (cognitive 25) · ×1
  • VolcengineVideoService.extractInput (cognitive 25) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:377 — VolcengineVideoService.extractInput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, ternaries 3, match/switch 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 12 of the 25 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 393, 415). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AitoearnAuthGuard.canActivate (cognitive 25) · ×1
  • AitoearnAuthGuard.canActivate (cognitive 25) project/aitoearn-backend/libs/aitoearn-auth/src/aitoearn-auth.guard.ts:24 — AitoearnAuthGuard.canActivate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConnectChannelList.ConnectChannelList (cognitive 25) · ×1
  • ConnectChannelList.ConnectChannelList (cognitive 25) project/aitoearn-web/src/components/ChannelManager/components/ConnectChannelList.tsx:28 — ConnectChannelList.ConnectChannelList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 9, ternaries 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 2 function items inside it that branch (handlePlatformClick, a function literal at line 148). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · VideoCoverSeting.VideoCoverSeting (cognitive 25) · ×1
  • VideoCoverSeting.VideoCoverSeting (cognitive 25) project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:57 — VideoCoverSeting.VideoCoverSeting has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, boolean chains 9, error handling 2, ternaries 2. Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 176, 75, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useUploadSync.useUploadSync (cognitive 25) · ×1
  • useUploadSync.useUploadSync (cognitive 25) project/aitoearn-web/src/components/PublishDialog/hooks/useUploadSync.ts:25 — useUploadSync.useUploadSync has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 7 (nesting depth added 7). None of this is in the body itself: all 25 points belong to 3 function literals inside it that branch (lines 39, 31, 81). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.ModelSelect (cognitive 25) · ×1
  • index.ModelSelect (cognitive 25) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/components/ModelSelect/index.tsx:8 — index.ModelSelect has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 9 (15 pts), boolean chains 8, if/else 2 (nesting depth added 6). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 90, 57, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.usePlanTabStore (cognitive 25) · ×1
  • index.usePlanTabStore (cognitive 25) project/aitoearn-web/src/store/draft-box/planTabStore/index.ts:31 — index.usePlanTabStore has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 10, error handling 3, ternaries 2. None of this is in the body itself: all 25 points belong to 8 function items inside it that branch (syncTabs, a function literal at line 117, a function literal at line 163, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · VideoTaskStatusScheduler.processTask (cognitive 24) · ×1
  • VideoTaskStatusScheduler.processTask (cognitive 24) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/video-task-status.scheduler.ts:66 — VideoTaskStatusScheduler.processTask has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · setup-nats-pattern.util.setupNatsPattern (cognitive 24) · ×1
  • setup-nats-pattern.util.setupNatsPattern (cognitive 24) project/aitoearn-backend/libs/common/src/utils/setup-nats-pattern.util.ts:5 — setup-nats-pattern.util.setupNatsPattern has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). Of this number, 19 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.CalendarFestivalDetailDialog (cognitive 24) · ×1
  • index.CalendarFestivalDetailDialog (cognitive 24) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:64 — index.CalendarFestivalDetailDialog has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (7 pts), ternaries 5, loops 1 (nesting depth added 2). Of this number, 13 points are the body's own statements and 11 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · PhoneLoginForm.PhoneLoginForm (cognitive 24) · ×1
  • PhoneLoginForm.PhoneLoginForm (cognitive 24) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/PhoneLoginForm.tsx:37 — PhoneLoginForm.PhoneLoginForm has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 7, ternaries 3 (4 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 2 function items inside it that branch (handleSubmit, handleSendCode). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NavSection.NavItem (cognitive 24) · ×1
  • NavSection.NavItem (cognitive 24) project/aitoearn-web/src/app/layout/LayoutSidebar/components/NavSection.tsx:47 — NavSection.NavItem has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, ternaries 9 (11 pts), if/else 1 (nesting depth added 2). Of this number, 23 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · WorkflowComponents.WorkflowStepItem (cognitive 24) · ×1
  • WorkflowComponents.WorkflowStepItem (cognitive 24) project/aitoearn-web/src/components/Chat/ChatMessage/WorkflowComponents.tsx:29 — WorkflowComponents.WorkflowStepItem has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 11 (14 pts), boolean chains 6, if/else 3 (4 pts) (nesting depth added 4). Of this number, 20 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.MediaStackCard (cognitive 24) · ×1
  • index.MediaStackCard (cognitive 24) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ImageStack/components/MediaStackCard/index.tsx:22 — index.MediaStackCard has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 10, if/else 2 (nesting depth added 4). Of this number, 19 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · steps.Steps (cognitive 24) · ×1
  • steps.Steps (cognitive 24) project/aitoearn-web/src/components/ui/steps.tsx:32 — steps.Steps has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (8 pts), boolean chains 6, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 83, a function literal at line 132, getStepIcon, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · VideoStyleTransferService.processVCreativeTask (cognitive 23) · ×1
  • VideoStyleTransferService.processVCreativeTask (cognitive 23) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/video-style-transfer.service.ts:177 — VideoStyleTransferService.processVCreativeTask has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (8 pts), error handling 3 (7 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draft-generation-platforms.getCompatibleAccountTypes (cognitive 23) · ×1
  • draft-generation-platforms.getCompatibleAccountTypes (cognitive 23) project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation-platforms.ts:127 — draft-generation-platforms.getCompatibleAccountTypes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 4 (nesting depth added 9). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 130). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · publish.schema.getFieldLabel (cognitive 23) · ×1
  • publish.schema.getFieldLabel (cognitive 23) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/publish.schema.ts:117 — publish.schema.getFieldLabel has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 11 (22 pts), match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FacebookPublishProvider.validate (cognitive 23) · ×1
  • FacebookPublishProvider.validate (cognitive 23) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-publish.provider.ts:57 — FacebookPublishProvider.validate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstagramPublishProvider.validateMediaType (cognitive 23) · ×1
  • InstagramPublishProvider.validateMediaType (cognitive 23) REDACTED:536 — InstagramPublishProvider.validateMediaType has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · api-doc.decorator.ApiDoc (cognitive 23) · ×1
  • api-doc.decorator.ApiDoc (cognitive 23) project/aitoearn-backend/libs/common/src/decorators/api-doc.decorator.ts:42 — api-doc.decorator.ApiDoc has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.AvatarCropModal (cognitive 23) · ×1
  • index.AvatarCropModal (cognitive 23) project/aitoearn-web/src/app/layout/SettingsModal/tabs/components/AvatarCropModal/index.tsx:161 — index.AvatarCropModal has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 16, if/else 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 6 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MainPage.MainPage (cognitive 23) · ×1
  • MainPage.MainPage (cognitive 23) project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:29 — MainPage.MainPage has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12, boolean chains 4, ternaries 3 (4 pts), error handling 3 (nesting depth added 1). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 153, 112, 82, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentRuntimeService.claudeQuery (cognitive 22) · ×1
  • AgentRuntimeService.claudeQuery (cognitive 22) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:195 — AgentRuntimeService.claudeQuery has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 5 (8 pts), error handling 1, loops 1, ternaries 1 (nesting depth added 3). Of this number, 12 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · client.useTransClient (cognitive 22) · ×1
  • client.useTransClient (cognitive 22) project/aitoearn-web/src/app/i18n/client.ts:57 — client.useTransClient has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 9). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 87, 80, 99, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DraftBoxCore.DraftBoxCore (cognitive 22) · ×1
  • DraftBoxCore.DraftBoxCore (cognitive 22) project/aitoearn-web/src/app/[lng]/draft-box/DraftBoxCore.tsx:21 — DraftBoxCore.DraftBoxCore has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 8, ternaries 1. Of this number, 11 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.PluginPublishingFloatButton (cognitive 22) · ×1
  • index.PluginPublishingFloatButton (cognitive 22) project/aitoearn-web/src/components/Plugin/PluginPublishingFloatButton/index.tsx:77 — index.PluginPublishingFloatButton has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, ternaries 4 (6 pts), if/else 4 (nesting depth added 2). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 106, a function literal at line 135, handleOpenDetail). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · validation.getTwitterPublishValidationMessages (cognitive 22) · ×1
  • validation.getTwitterPublishValidationMessages (cognitive 22) project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/TwitterParams/validation.ts:5 — validation.getTwitterPublishValidationMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · usePublishDialogStorageStore.usePublishDialogStorageStore (cognitive 22) · ×1
  • usePublishDialogStorageStore.usePublishDialogStorageStore (cognitive 22) project/aitoearn-web/src/components/PublishDialog/usePublishDialogStorageStore.tsx:244 — usePublishDialogStorageStore.usePublishDialogStorageStore has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 7 (8 pts), ternaries 2 (3 pts) (nesting depth added 2). Of this number, 17 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CropOverlay.CropOverlay (cognitive 22) · ×1
  • CropOverlay.CropOverlay (cognitive 22) project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/CropOverlay.tsx:39 — CropOverlay.CropOverlay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 2 (nesting depth added 5). None of this is in the body itself: all 22 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.
D2 · Cognitive Complexity · useDouyinPublishSession.useDouyinPublishSession.pollOnce (cognitive 22) · ×1
  • useDouyinPublishSession.useDouyinPublishSession.pollOnce (cognitive 22) project/aitoearn-web/src/hooks/useDouyinPublishSession.ts:82 — useDouyinPublishSession.useDouyinPublishSession.pollOnce has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DraftGenerationService.generateImagesWithGemini (cognitive 21) · ×1
  • DraftGenerationService.generateImagesWithGemini (cognitive 21) project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:1076 — DraftGenerationService.generateImagesWithGemini has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 3 (6 pts), loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 11). 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 into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · configFieldMeta.countModifiedLeafFields (cognitive 21) · ×1
  • configFieldMeta.countModifiedLeafFields (cognitive 21) project/aitoearn-web/src/app/layout/ConfigManagerDialog/utils/configFieldMeta.ts:46 — configFieldMeta.countModifiedLeafFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.MediaMentionThumbnail (cognitive 21) · ×1
  • index.MediaMentionThumbnail (cognitive 21) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/MediaMentionPromptInput/components/MediaMentionThumbnail/index.tsx:18 — index.MediaMentionThumbnail has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 6, if/else 3 (nesting depth added 6). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.CreatePlanModal (cognitive 21) · ×1
  • index.CreatePlanModal (cognitive 21) project/aitoearn-web/src/components/draft-box/components/CreatePlanModal/index.tsx:25 — index.CreatePlanModal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 63, 52, 100). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · modal.Modal (cognitive 21) · ×1
  • modal.Modal (cognitive 21) project/aitoearn-web/src/components/ui/modal.tsx:84 — modal.Modal has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 12 (14 pts), boolean chains 5, if/else 2 (nesting depth added 2). Of this number, 19 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.
D2 · Cognitive Complexity · number-input.NumberInput (cognitive 21) · ×1
  • number-input.NumberInput (cognitive 21) project/aitoearn-web/src/components/ui/number-input.tsx:28 — number-input.NumberInput has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (9 pts), if/else 7 (8 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (resolveBlurValue, a function literal at line 33, a function literal at line 74, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sse.handler.handleStreamEvent (cognitive 21) · ×1
  • sse.handler.handleStreamEvent (cognitive 21) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:110 — sse.handler.handleStreamEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 7 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · draftBoxConfigStore.useDraftBoxConfigStore (cognitive 21) · ×1
  • draftBoxConfigStore.useDraftBoxConfigStore (cognitive 21) project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:209 — draftBoxConfigStore.useDraftBoxConfigStore has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 13, boolean chains 5, if/else 3. Of this number, 20 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.
D2 · Cognitive Complexity · GeminiService.extractGeminiModalityTokenDetails (cognitive 20) · ×1
  • GeminiService.extractGeminiModalityTokenDetails (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:163 — GeminiService.extractGeminiModalityTokenDetails has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OpenAIVideoService.callback (cognitive 20) · ×1
  • OpenAIVideoService.callback (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/openai/openai.service.ts:169 — OpenAIVideoService.callback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 3 (4 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VideoEditMcp.createGetVideoEditTaskStatusTool (cognitive 20) · ×1
  • VideoEditMcp.createGetVideoEditTaskStatusTool (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/video-edit.mcp.ts:162 — VideoEditMcp.createGetVideoEditTaskStatusTool has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 6). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 175). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentRuntimeService.transformMessage (cognitive 20) · ×1
  • AgentRuntimeService.transformMessage (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:796 — AgentRuntimeService.transformMessage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (11 pts), if/else 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 9). Of this number, 19 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DraftGenerationService.generateContentImageText (cognitive 20) · ×1
  • DraftGenerationService.generateContentImageText (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:806 — DraftGenerationService.generateContentImageText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 1 (3 pts), loops 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DraftGenerationService.generateImagesWithOpenAI (cognitive 20) · ×1
  • DraftGenerationService.generateImagesWithOpenAI (cognitive 20) project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:1150 — DraftGenerationService.generateImagesWithOpenAI has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), ternaries 1 (3 pts), error handling 1 (2 pts) (nesting depth added 11). Of this number, 15 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PublishTaskService.processFinalizeJob (cognitive 20) · ×1
  • PublishTaskService.processFinalizeJob (cognitive 20) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:205 — PublishTaskService.processFinalizeJob has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · publish.api.normalizeChannelPublishRecord (cognitive 20) · ×1
  • publish.api.normalizeChannelPublishRecord (cognitive 20) project/aitoearn-web/src/api/platforms/publish.api.ts:9 — publish.api.normalizeChannelPublishRecord has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 20. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useCalendarTiming.normalizePublishRecord (cognitive 20) · ×1
  • useCalendarTiming.normalizePublishRecord (cognitive 20) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/useCalendarTiming.ts:84 — useCalendarTiming.normalizePublishRecord has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 20. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AuthLoadingPage.AuthLoadingPage (cognitive 20) · ×1
  • AuthLoadingPage.AuthLoadingPage (cognitive 20) project/aitoearn-web/src/components/ChannelManager/components/AuthLoadingPage.tsx:17 — AuthLoadingPage.AuthLoadingPage has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (9 pts), boolean chains 7, if/else 4 (nesting depth added 4). Of this number, 18 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convertMessages.processAssistantMessage (cognitive 20) · ×1
  • convertMessages.processAssistantMessage (cognitive 20) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:452 — convertMessages.processAssistantMessage has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 463). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.DraftContentModule (cognitive 20) · ×1
  • index.DraftContentModule (cognitive 20) project/aitoearn-web/src/components/draft-box/components/DraftContentModule/index.tsx:52 — index.DraftContentModule has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 7, if/else 7, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 10 points are the body's own statements and 10 belong to 7 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AideoService.transformToResponseVo (cognitive 19) · ×1
  • AideoService.transformToResponseVo (cognitive 19) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:459 — AideoService.transformToResponseVo has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 4, if/else 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DashscopeVideoService.buildPayload (cognitive 19) · ×1
  • DashscopeVideoService.buildPayload (cognitive 19) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/dashscope/dashscope.service.ts:145 — DashscopeVideoService.buildPayload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · prompt-parser.extractLanguage (cognitive 19) · ×1
  • prompt-parser.extractLanguage (cognitive 19) REDACTED:145 — prompt-parser.extractLanguage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaService.validateImage (cognitive 19) · ×1
  • MediaService.validateImage (cognitive 19) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:238 — MediaService.validateImage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 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.
D2 · Cognitive Complexity · AccountSelector.AccountSelector (cognitive 19) · ×1
  • AccountSelector.AccountSelector (cognitive 19) project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx:44 — AccountSelector.AccountSelector has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (14 pts), boolean chains 4, if/else 1 (nesting depth added 7). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.TaskPreview (cognitive 19) · ×1
  • index.TaskPreview (cognitive 19) project/aitoearn-web/src/app/[lng]/ai-social/components/TaskPreview/index.tsx:40 — index.TaskPreview has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 2, match/switch 1, ternaries 1. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 104, a function literal at line 78, a function literal at line 151, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SpaceItem.SpaceItem (cognitive 19) · ×1
  • SpaceItem.SpaceItem (cognitive 19) project/aitoearn-web/src/components/ChannelManager/components/SpaceItem.tsx:71 — SpaceItem.SpaceItem has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 4 (6 pts), if/else 2 (4 pts) (nesting depth added 4). Of this number, 14 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedChannelSpaceList.UnifiedChannelSpaceList (cognitive 19) · ×1
  • UnifiedChannelSpaceList.UnifiedChannelSpaceList (cognitive 19) project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx:26 — UnifiedChannelSpaceList.UnifiedChannelSpaceList has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 4, error handling 3, ternaries 2 (3 pts) (nesting depth added 1). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 141, 97, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · WorkflowComponents.WorkflowSection (cognitive 19) · ×1
  • WorkflowComponents.WorkflowSection (cognitive 19) project/aitoearn-web/src/components/Chat/ChatMessage/WorkflowComponents.tsx:99 — WorkflowComponents.WorkflowSection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 5 (6 pts) (nesting depth added 2). Of this number, 11 points are the body's own statements and 8 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.TaskCard (cognitive 19) · ×1
  • index.TaskCard (cognitive 19) project/aitoearn-web/src/components/Chat/TaskCard/index.tsx:105 — index.TaskCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 6, ternaries 4. Of this number, 12 points are the body's own statements and 7 belong to 5 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PublishDetailModal.PlatformTaskCard (cognitive 19) · ×1
  • PublishDetailModal.PlatformTaskCard (cognitive 19) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:356 — PublishDetailModal.PlatformTaskCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · PublishDetailModal.PublishDetailModal (cognitive 19) · ×1
  • PublishDetailModal.PublishDetailModal (cognitive 19) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:493 — PublishDetailModal.PublishDetailModal has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 3. Of this number, 10 points are the body's own statements and 9 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.
D2 · Cognitive Complexity · index.ConditionalDeleteDialogContent (cognitive 19) · ×1
  • index.ConditionalDeleteDialogContent (cognitive 19) project/aitoearn-web/src/components/draft-box/components/ConditionalDeleteDialog/index.tsx:53 — index.ConditionalDeleteDialogContent has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 8, error handling 1. Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 123, 83, 104, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.MediaMentionChip (cognitive 19) · ×1
  • index.MediaMentionChip (cognitive 19) project/aitoearn-web/src/components/draft-box/components/MediaMentionPromptText/index.tsx:77 — index.MediaMentionChip has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 7 (16 pts), boolean chains 3 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.DatePicker (cognitive 19) · ×1
  • index.DatePicker (cognitive 19) project/aitoearn-web/src/components/ui/date-picker/index.tsx:31 — index.DatePicker has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, loops 4, if/else 2, ternaries 2. Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 162, 55, 83, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · message.handler.updateMessageContentWithMedias (cognitive 19) · ×1
  • message.handler.updateMessageContentWithMedias (cognitive 19) project/aitoearn-web/src/store/agent/task-instance/message.handler.ts:177 — message.handler.updateMessageContentWithMedias has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 4 (10 pts), boolean chains 5, if/else 2 (4 pts) (nesting depth added 8). None of this is in the body itself: all 19 points belong to 3 function literals inside it that branch (lines 184, 196, 187). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · workflow.handler.handleToolResult (cognitive 19) · ×1
  • workflow.handler.handleToolResult (cognitive 19) project/aitoearn-web/src/store/agent/task-instance/workflow.handler.ts:241 — workflow.handler.handleToolResult has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 286, 248, 272, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AgentRuntimeService.downloadAgentSession (cognitive 18) · ×1
  • AgentRuntimeService.downloadAgentSession (cognitive 18) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:945 — AgentRuntimeService.downloadAgentSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AuthService.getValidCredential (cognitive 18) · ×1
  • AuthService.getValidCredential (cognitive 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:506 — AuthService.getValidCredential has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (5 pts), ternaries 2 (5 pts), error handling 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstagramAnalyticsProvider.fetchAccountAnalytics (cognitive 18) · ×1
  • InstagramAnalyticsProvider.fetchAccountAnalytics (cognitive 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-analytics.provider.ts:20 — InstagramAnalyticsProvider.fetchAccountAnalytics has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PublishFlowService.enqueueQueuedRecords (cognitive 18) · ×1
  • PublishFlowService.enqueueQueuedRecords (cognitive 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/flows/publish-flow.service.ts:370 — PublishFlowService.enqueueQueuedRecords has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 2 (8 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RelayExceptionFilter.handleRelay (cognitive 18) · ×1
  • RelayExceptionFilter.handleRelay (cognitive 18) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-exception.filter.ts:51 — RelayExceptionFilter.handleRelay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), error handling 2, loops 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · build-docker.resetDependencies · ×1
  • build-docker.resetDependencies::processPackage (cognitive 18) project/aitoearn-backend/scripts/build-docker.mjs:296 — build-docker.resetDependencies::processPackage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · generateShareImages.forceOpaqueStyles (cognitive 18) · ×1
  • generateShareImages.forceOpaqueStyles (cognitive 18) project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:403 — generateShareImages.forceOpaqueStyles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, loops 2 (nesting depth added 3). None of this is in the body itself: all 18 points belong to 3 function literals inside it that branch (lines 456, 427, 447). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PublishDetailModal.UserActionPanel (cognitive 18) · ×1
  • PublishDetailModal.UserActionPanel (cognitive 18) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:175 — PublishDetailModal.UserActionPanel has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 7, ternaries 2. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (handleCancelPublish, a function literal at line 210, a function literal at line 233, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DraftDetailDialog.DraftDetailContent (cognitive 18) · ×1
  • DraftDetailDialog.DraftDetailContent (cognitive 18) project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:188 — DraftDetailDialog.DraftDetailContent has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 7. Of this number, 12 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · device.detectClientDeviceType (cognitive 18) · ×1
  • device.detectClientDeviceType (cognitive 18) project/aitoearn-web/src/store/user/utils/device.ts:36 — device.detectClientDeviceType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · publish.schema.getLimitMessage (cognitive 17) · ×1
  • publish.schema.getLimitMessage (cognitive 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/publish.schema.ts:218 — publish.schema.getLimitMessage has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (13 pts), if/else 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PinterestAnalyticsProvider.fetchWorkAnalytics (cognitive 17) · ×1
  • PinterestAnalyticsProvider.fetchWorkAnalytics (cognitive 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest-analytics.provider.ts:49 — PinterestAnalyticsProvider.fetchWorkAnalytics has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (6 pts), ternaries 2 (6 pts), if/else 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.
D2 · Cognitive Complexity · ThreadsAnalyticsProvider.fetchAccountAnalytics (cognitive 17) · ×1
  • ThreadsAnalyticsProvider.fetchAccountAnalytics (cognitive 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-analytics.provider.ts:20 — ThreadsAnalyticsProvider.fetchAccountAnalytics has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (5 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PublishTaskService.updatePublishAt (cognitive 17) · ×1
  • PublishTaskService.updatePublishAt (cognitive 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:511 — PublishTaskService.updatePublishAt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · starter.startApplication (cognitive 17) · ×1
  • starter.startApplication (cognitive 17) project/aitoearn-backend/libs/common/src/starter.ts:61 — starter.startApplication has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (3 pts) (nesting depth added 3). Of this number, 11 points are the body's own statements and 6 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · material.api.uploadToOss (cognitive 17) · ×1
  • material.api.uploadToOss (cognitive 17) project/aitoearn-web/src/api/materials/material.api.ts:102 — material.api.uploadToOss has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 148, 133). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MobileWeekView.MobileWeekView (cognitive 17) · ×1
  • MobileWeekView.MobileWeekView (cognitive 17) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/MobileWeekView.tsx:26 — MobileWeekView.MobileWeekView has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 4, loops 1 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 4 function items inside it that branch (a function literal at line 113, handleTouchEnd, a function literal at line 97, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.MediaCard (cognitive 17) · ×1
  • index.MediaCard (cognitive 17) project/aitoearn-web/src/components/draft-box/components/MediaCard/index.tsx:50 — index.MediaCard has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 3, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · pagination.Pagination · ×1
  • pagination.Pagination::getPageNumbers (cognitive 17) project/aitoearn-web/src/components/ui/pagination.tsx:215 — pagination.Pagination::getPageNumbers has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 5 (6 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · sse.handler.handleUserMessage (cognitive 17) · ×1
  • sse.handler.handleUserMessage (cognitive 17) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:201 — sse.handler.handleUserMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3 (nesting depth added 8). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 205, 209). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · message.createMessageUtils.updateMessageContentWithMedias (cognitive 17) · ×1
  • message.createMessageUtils.updateMessageContentWithMedias (cognitive 17) project/aitoearn-web/src/store/agent/utils/message.ts:229 — message.createMessageUtils.updateMessageContentWithMedias has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 2 (4 pts), boolean chains 3 (nesting depth added 8). None of this is in the body itself: all 17 points belong to 3 function literals inside it that branch (lines 234, 245, 237). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · homeFeed.transformToHomeFeedItem (cognitive 17) · ×1
  • homeFeed.transformToHomeFeedItem (cognitive 17) project/aitoearn-web/src/store/plugin/plats/douyin/homeFeed.ts:174 — homeFeed.transformToHomeFeedItem has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 1, ternaries 1. Of this number, 15 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GrokVideoService.callback (cognitive 16) · ×1
  • GrokVideoService.callback (cognitive 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/grok/grok.service.ts:145 — GrokVideoService.callback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), ternaries 3 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agent.utils.enhancePrompt (cognitive 16) · ×1
  • agent.utils.enhancePrompt (cognitive 16) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.utils.ts:21 — agent.utils.enhancePrompt has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaService.preparePublishImage (cognitive 16) · ×1
  • MediaService.preparePublishImage (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:630 — MediaService.preparePublishImage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PublishStateService.markPublished (cognitive 16) · ×1
  • PublishStateService.markPublished (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts:203 — PublishStateService.markPublished has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · meta-graph-error.util.categoryFromMetaGraphError (cognitive 16) · ×1
  • meta-graph-error.util.categoryFromMetaGraphError (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/meta-graph-error.util.ts:23 — meta-graph-error.util.categoryFromMetaGraphError has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FacebookAnalyticsProvider.fetchWorkAnalytics (cognitive 16) · ×1
  • FacebookAnalyticsProvider.fetchWorkAnalytics (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-analytics.provider.ts:54 — FacebookAnalyticsProvider.fetchWorkAnalytics has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstagramAnalyticsProvider.fetchWorkAnalytics (cognitive 16) · ×1
  • InstagramAnalyticsProvider.fetchWorkAnalytics (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-analytics.provider.ts:91 — InstagramAnalyticsProvider.fetchWorkAnalytics has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ThreadsAnalyticsProvider.fetchWorkAnalytics (cognitive 16) · ×1
  • ThreadsAnalyticsProvider.fetchWorkAnalytics (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-analytics.provider.ts:89 — ThreadsAnalyticsProvider.fetchWorkAnalytics has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PublishRecordService.updateWorkLinkById (cognitive 16) · ×1
  • PublishRecordService.updateWorkLinkById (cognitive 16) project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts:360 — PublishRecordService.updateWorkLinkById has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AssetsService.confirmUploadByUser (cognitive 16) · ×1
  • AssetsService.confirmUploadByUser (cognitive 16) project/aitoearn-backend/libs/assets/src/assets.service.ts:349 — AssetsService.confirmUploadByUser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, ternaries 2 (3 pts), error handling 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.CalendarHolidayBadge (cognitive 16) · ×1
  • index.CalendarHolidayBadge (cognitive 16) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarHolidayBadge/index.tsx:72 — index.CalendarHolidayBadge has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 2, ternaries 2. Of this number, 10 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.PCWeekView (cognitive 16) · ×1
  • index.PCWeekView (cognitive 16) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/PCWeekView/index.tsx:217 — index.PCWeekView has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 5, ternaries 2. None of this is in the body itself: all 16 points belong to 8 function literals inside it that branch (lines 331, 246, 412, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · agentAssetsPageCore.AgentAssetsPageCore (cognitive 16) · ×1
  • agentAssetsPageCore.AgentAssetsPageCore (cognitive 16) project/aitoearn-web/src/app/[lng]/agent-assets/agentAssetsPageCore.tsx:46 — agentAssetsPageCore.AgentAssetsPageCore has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4, ternaries 3 (4 pts), error handling 2 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 91, 67, 128, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AiSocialPageContent.AiSocialPageContent (cognitive 16) · ×1
  • AiSocialPageContent.AiSocialPageContent (cognitive 16) project/aitoearn-web/src/app/[lng]/ai-social/AiSocialPageContent.tsx:22 — AiSocialPageContent.AiSocialPageContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 3, error handling 2, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 157, a function literal at line 131, BackToTop, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · page.SharedChatPage (cognitive 16) · ×1
  • page.SharedChatPage (cognitive 16) project/aitoearn-web/src/app/[lng]/chat/page.tsx:84 — page.SharedChatPage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, error handling 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 110, 103, 164). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · UserDropdownMenu.UserDropdownMenu (cognitive 16) · ×1
  • UserDropdownMenu.UserDropdownMenu (cognitive 16) project/aitoearn-web/src/app/layout/LayoutSidebar/components/UserDropdownMenu.tsx:195 — UserDropdownMenu.UserDropdownMenu has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 4 (6 pts), ternaries 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.SettingsModal (cognitive 16) · ×1
  • index.SettingsModal (cognitive 16) project/aitoearn-web/src/app/layout/SettingsModal/index.tsx:49 — index.SettingsModal has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 4, ternaries 3 (4 pts), match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 76, renderContent, a function literal at line 58, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ChannelItem.ChannelItem (cognitive 16) · ×1
  • ChannelItem.ChannelItem (cognitive 16) project/aitoearn-web/src/components/ChannelManager/components/ChannelItem.tsx:39 — ChannelItem.ChannelItem has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index.DraftListToolbar (cognitive 16) · ×1
  • index.DraftListToolbar (cognitive 16) project/aitoearn-web/src/components/draft-box/components/DraftListToolbar/index.tsx:26 — index.DraftListToolbar has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, ternaries 4 (5 pts), if/else 4 (nesting depth added 1). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DraftListSection.DraftCard (cognitive 16) · ×1
  • DraftListSection.DraftCard (cognitive 16) project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:89 — DraftListSection.DraftCard has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 3, ternaries 2 (3 pts) (nesting depth added 1). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useMediaUpload.useMediaUpload.handleMediasChange (cognitive 16) · ×1
  • useMediaUpload.useMediaUpload.handleMediasChange (cognitive 16) project/aitoearn-web/src/hooks/useMediaUpload.ts:55 — useMediaUpload.useMediaUpload.handleMediasChange has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4 (5 pts), boolean chains 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 68, 99, 110, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · sse.handler.handleSSEMessage (cognitive 16) · ×1
  • sse.handler.handleSSEMessage (cognitive 16) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:37 — sse.handler.handleSSEMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · sse.handler.handleResultMessage (cognitive 16) · ×1
  • sse.handler.handleResultMessage (cognitive 16) project/aitoearn-web/src/store/agent/task-instance/sse.handler.ts:230 — sse.handler.handleResultMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • Skeleton type — most members are unfinished project/aitoearn-backend/apps/aitoearn-ai/src/core/ai-availability/ai-availability.service.ts:13 — `AiAvailabilityService` has 3 unfinished members out of 5 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented.
IC1 · Incompleteness & stubs · Empty method body · ×1
  • Empty method body — does nothing with its inputs project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/models-config/models-config.service.ts:15 — `saveConfig` takes parameters but its body is empty — it accepts inputs and does nothing. Either implement it or remove it.
P5 · DR & Backup · No DR/backup evidence · ×1
  • No DR/backup evidence — A persistence guard (data volume / purge-protection) was found, but no backup, geo-recovery or RTO/RPO controls were evidenced — a volume that survives a container recreate is not a tested restore from catastrophic loss.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×1
  • Outbound HTTP without resilience project/aitoearn-backend/libs/common/src/loggers/feishu.logger.ts:30 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
R10 · Code Duplication · Forked directory tree (56 identical files, ~7125 lines × 2 trees) · ×1
  • Forked directory tree (56 identical files, ~7125 lines × 2 trees) skills/qwen-skill-aitoearn/aitoearn/references/video-generation/references/seedance-2-0-guide.md:1 — skills/qwen-skill-aitoearn/aitoearn/ and skills/qwenwork-plugin-aitoearn/skills/aitoearn/ are near-verbatim copies of each other: 56 files are byte-identical under the same relative paths (~7125 lines; the trees hold 56 and 56 files). That is one structural fact, not 56 local ones: every edit made to one tree and not the other drifts silently, which is the failure whole-tree forks guarantee. Pick one tree as the single source and produce the other from it (generated, copied at build or release time, or re-exported) — or, if the copy is a stale snapshot nothing produces any more, delete it. Check first whether the copy is a deliberately published deliverable (a template consumers copy verbatim, a released sample frozen at a version); where it is, keep it produced from the source tree rather than edited in place.
R10 · Code Duplication · Duplication concentrated across 14 sibling directories (136 clone groups) · ×1
  • Duplication concentrated across 14 sibling directories (136 clone groups) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10 — 136 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/ have copies in at least two of the sibling directories bilibili, douyin, facebook, google-business, instagram, kwai (+8 more sibling(s) not listed) — 99 of them are reported below, and 37 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 136 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 136 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 136 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 · Duplication concentrated across 5 sibling directories (43 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (43 clone groups) project/aitoearn-web/src/app/[lng]/ai-social/components/TaskPreview/components/MediaPreviewCard/index.tsx:28 — 43 duplicated blocks under project/aitoearn-web/src/ have copies in at least two of the sibling directories api, app, components, hooks, store — 21 of them are reported below, and 22 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 43 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 43 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 43 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 · Duplication concentrated across 2 sibling directories (30 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (30 clone groups) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.dto.ts:9 — 30 duplicated blocks under project/aitoearn-backend/ have copies in at least two of the sibling directories apps, libs — 10 of them are reported below, and 20 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 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 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 30 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 · Duplication concentrated across 13 sibling directories (26 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (26 clone groups) project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1 — 26 duplicated blocks under project/aitoearn-backend/libs/ have copies in at least two of the sibling directories aitoearn-ai-shared, aitoearn-auth, aitoearn-queue, aitoearn-server-shared, ali-oss, aws-s3 (+7 more sibling(s) not listed) — 11 of them are reported below, and 15 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 26 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 26 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 26 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 · Duplication concentrated across 2 sibling directories (25 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (25 clone groups) project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:35 — 25 duplicated blocks under project/aitoearn-backend/apps/ have copies in at least two of the sibling directories aitoearn-ai, aitoearn-server — 6 of them are reported below, and 19 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 25 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 25 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 25 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 · Duplication concentrated across 6 sibling directories (23 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (23 clone groups) project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236 — 23 duplicated blocks under project/aitoearn-web/src/components/ have copies in at least two of the sibling directories ChannelManager, Chat, Plugin, PublishDialog, draft-box, ui — 11 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 23 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 23 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 23 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 · Duplication concentrated across 10 sibling directories (20 clone groups) · ×1
  • Duplication concentrated across 10 sibling directories (20 clone groups) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/analytics/analytics.service.ts:113 — 20 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/channels/ have copies in at least two of the sibling directories accounts, analytics, auth, engagement, mcp, platforms (+4 more sibling(s) not listed) — 13 of them are reported below, and 7 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 20 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 20 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 20 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 · Duplication concentrated across 8 sibling directories (11 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (11 clone groups) project/aitoearn-web/src/app/[lng]/tasks-history/page.tsx:14 — 11 duplicated blocks under project/aitoearn-web/src/app/[lng]/ have copies in at least two of the sibling directories accounts, agent-assets, ai-social, auth, chat, draft-box (+2 more sibling(s) not listed) — 4 of them are reported below, and 7 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 · Duplication concentrated across 7 sibling directories (11 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (11 clone groups) project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:192 — 11 duplicated blocks under project/aitoearn-web/src/app/[lng]/websit/ have copies in at least two of the sibling directories data-deletion, data-protection-agreement, extension-privacy-policy, plugin-guide, plugin-update-docs, privacy-policy (+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 · Duplication concentrated across 7 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (10 clone groups) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.controller.ts:31 — 10 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/ have copies in at least two of the sibling directories aideo, assets, chat, image, libs, logs (+1 more sibling(s) not listed) — 4 of them are reported below, and 6 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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 · Duplication concentrated across 13 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 13 sibling directories (10 clone groups) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177 — 10 duplicated blocks under project/aitoearn-web/src/components/draft-box/components/ have copies in at least two of the sibling directories AiBatchGenerateBar, AllListSection, BatchActionBar, CreateMaterialModal, CreatePlanModal, DraftListToolbar (+7 more sibling(s) not listed) — 6 of them are reported below, and 4 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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 · Duplication concentrated across 5 sibling directories (9 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (9 clone groups) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/grok/grok.service.ts:120 — 9 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/ have copies in at least two of the sibling directories dashscope, grok, openai, relay, volcengine — 7 of them are reported below, and 2 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 9 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 9 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 9 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 · Duplication concentrated across 5 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (8 clone groups) REDACTED:10 — 8 duplicated blocks under project/aitoearn-backend/apps/aitoearn-server/src/core/ have copies in at least two of the sibling directories api-key, channels, content, publish-record, user — 4 of them are reported below, and 4 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 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 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 8 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 · Duplication concentrated across 5 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 5 sibling directories (7 clone groups) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337 — 7 duplicated blocks under project/aitoearn-web/src/components/PublishDialog/compoents/ have copies in at least two of the sibling directories AccountSelector, DesktopPublishContent, PlatParamsSetting, PubParmasTextarea, mobile — 4 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 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 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 7 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 · Duplication concentrated across 3 sibling directories (6 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (6 clone groups) project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:94 — 6 duplicated blocks under project/aitoearn-backend/apps/aitoearn-ai/src/core/ have copies in at least two of the sibling directories agent, ai, draft-generation — 1 of them are reported below, and 5 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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 (269 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (269 matched lines × 2 locations) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177 — project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:177 · project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:83 — the two spans are one implementation copied and then locally edited — 1500 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 (198 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (198 matched lines × 2 locations) project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:51 — project/aitoearn-web/src/app/[lng]/tasks-history/components/UserLogsModal/index.tsx:51 · project/aitoearn-web/src/app/[lng]/tasks-history/components/VideoHistoryModal/index.tsx:26 — the two spans are one implementation copied and then locally edited — 1057 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 · Wholesale file copy (177 identical lines × 5 files) · ×1
  • Wholesale file copy (177 identical lines × 5 files) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 — skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/dsh-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/qwen-skill-aitoearn/aitoearn/scripts/aitoearn-bridge.mjs:25 · skills/qwenwork-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:25 · +1 more site(s) not listed — these 5 files are line-for-line copies of one another — 177 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 (174 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (174 matched lines × 2 locations) project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236 — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:236 · project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/MobileContent.tsx:116 — the two spans are one implementation copied and then locally edited — 922 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) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337 — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:337 · project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:267 — the two spans are one implementation copied and then locally edited — 876 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 (159 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (159 matched lines × 2 locations) project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:39 — project/aitoearn-web/src/components/ChannelManager/components/MainPage.tsx:39 · project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx:27 — the two spans are one implementation copied and then locally edited — 972 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 (150 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (150 matched lines × 2 locations) project/aitoearn-web/src/store/agent/task-instance/message.handler.ts:14 — project/aitoearn-web/src/store/agent/task-instance/message.handler.ts:14 · project/aitoearn-web/src/store/agent/utils/message.ts:80 — the two spans are one implementation copied and then locally edited — 836 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 (136 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (136 matched lines × 2 locations) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/drama-recap.service.ts:27 — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/drama-recap.service.ts:27 · project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/video-style-transfer.service.ts:27 — the two spans are one implementation copied and then locally edited — 690 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 (128 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (128 matched lines × 2 locations) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:49 — project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/EmailLoginForm.tsx:49 · project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/PhoneLoginForm.tsx:37 — the two spans are one implementation copied and then locally edited — 691 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 · Wholesale file copy (108 identical lines × 2 files) · ×1
  • Wholesale file copy (108 identical lines × 2 files) project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1 — project/aitoearn-backend/libs/channel-db/src/schemas/engagement-task.schema.ts:1 · project/aitoearn-backend/libs/mongodb/src/schemas/engagement.task.schema.ts:1 — these 2 files are line-for-line copies of one another — 108 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 (91 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (91 matched lines × 2 locations) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-work.provider.ts:10 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-work.provider.ts:9 — the two spans are one implementation copied and then locally edited — 552 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 (88 lines × 3 locations) · ×1
  • Duplicated block (88 lines × 3 locations) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.module.ts:19 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.module.ts:19 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.module.ts:19 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.module.ts:19 — the 3 copies are spread across 3 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.
R10 · Code Duplication · Duplicated block with local edits (83 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (83 matched lines × 2 locations) project/aitoearn-web/src/components/ui/date-picker/index.tsx:42 — project/aitoearn-web/src/components/ui/date-picker/index.tsx:42 · project/aitoearn-web/src/components/ui/date-range-picker/index.tsx:54 — the two spans are one implementation copied and then locally edited — 540 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:51 — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalDetailDialog/index.tsx:51 · project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/CalendarFestivalSummary/index.tsx:65 — the two spans are one implementation copied and then locally edited — 442 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 (77 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (77 matched lines × 2 locations) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.service.ts:54 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram.service.ts:54 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads.service.ts:55 — the two spans are one implementation copied and then locally edited — 373 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 146, cognitive 265) · ×1
  • Complex function (anonymous) (cyclomatic 146, cognitive 265) project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:264 — (anonymous) has cyclomatic complexity 146 and cognitive complexity 265; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 59, cognitive 108) · ×1
  • Complex function (anonymous) (cyclomatic 59, cognitive 108) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useLocalUploadHandler.ts:67 — (anonymous) has cyclomatic complexity 59 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 56, cognitive 55) · ×1
  • Complex function (anonymous) (cyclomatic 56, cognitive 55) project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:256 — (anonymous) has cyclomatic complexity 56 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function RecordContent (cyclomatic 54, cognitive 49) · ×1
  • Complex function RecordContent (cyclomatic 54, cognitive 49) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:700 — RecordContent has cyclomatic complexity 54 and cognitive complexity 49; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (top-level) (cyclomatic 53, cognitive 50) · ×1
  • Complex function (top-level) (cyclomatic 53, cognitive 50) project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:8 — (top-level) has cyclomatic complexity 53 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function migrate (cyclomatic 49, cognitive 94) · ×1
  • Complex function migrate (cyclomatic 49, cognitive 94) project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:329 — migrate has cyclomatic complexity 49 and cognitive complexity 94; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 39, cognitive 36) · ×1
  • Complex function (anonymous) (cyclomatic 39, cognitive 36) project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:61 — (anonymous) has cyclomatic complexity 39 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 38, cognitive 37) · ×1
  • Complex function (anonymous) (cyclomatic 38, cognitive 37) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:728 — (anonymous) has cyclomatic complexity 38 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ConfigManagerDialog (cyclomatic 37, cognitive 29) · ×1
  • Complex function ConfigManagerDialog (cyclomatic 37, cognitive 29) project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:207 — ConfigManagerDialog has cyclomatic complexity 37 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validatePublishContent (cyclomatic 33, cognitive 30) · ×1
  • Complex function validatePublishContent (cyclomatic 33, cognitive 30) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:36 — validatePublishContent has cyclomatic complexity 33 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function processAideoTask (cyclomatic 32, cognitive 37) · ×1
  • Complex function processAideoTask (cyclomatic 32, cognitive 37) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:135 — processAideoTask has cyclomatic complexity 32 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 32, cognitive 33) · ×1
  • Complex function (anonymous) (cyclomatic 32, cognitive 33) project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:81 — (anonymous) has cyclomatic complexity 32 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function applyGenerationParams (cyclomatic 32, cognitive 30) · ×1
  • Complex function applyGenerationParams (cyclomatic 32, cognitive 30) project/aitoearn-web/src/store/draft-box/draftBoxConfigStore.ts:221 — applyGenerationParams has cyclomatic complexity 32 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 32, cognitive 28) · ×1
  • Complex function (anonymous) (cyclomatic 32, cognitive 28) project/aitoearn-web/src/components/draft-box/components/GenerationParamsCard/index.tsx:226 — (anonymous) has cyclomatic complexity 32 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 32, cognitive 26) · ×1
  • Complex function (anonymous) (cyclomatic 32, cognitive 26) project/aitoearn-web/src/components/draft-box/components/GenerationDetailDialog/index.tsx:104 — (anonymous) has cyclomatic complexity 32 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ChatMessage (cyclomatic 32, cognitive 21) · ×1
  • Complex function ChatMessage (cyclomatic 32, cognitive 21) project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:357 — ChatMessage has cyclomatic complexity 32 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 31, cognitive 39) · ×1
  • Complex function (anonymous) (cyclomatic 31, cognitive 39) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1155 — (anonymous) has cyclomatic complexity 31 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 31, cognitive 28) · ×1
  • Complex function (anonymous) (cyclomatic 31, cognitive 28) project/aitoearn-web/src/components/draft-box/components/GeneratingCard/index.tsx:109 — (anonymous) has cyclomatic complexity 31 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getMaterialValidationIssues (cyclomatic 30, cognitive 43) · ×1
  • Complex function getMaterialValidationIssues (cyclomatic 30, cognitive 43) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useMaterialValidation.ts:56 — getMaterialValidationIssues has cyclomatic complexity 30 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function categoryFromMetaGraphError (cyclomatic 30, cognitive 17) · ×1
  • Complex function categoryFromMetaGraphError (cyclomatic 30, cognitive 17) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/meta-graph-error.util.ts:23 — categoryFromMetaGraphError has cyclomatic complexity 30 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 29, cognitive 52) · ×1
  • Complex function (anonymous) (cyclomatic 29, cognitive 52) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchSubmitHandler.ts:108 — (anonymous) has cyclomatic complexity 29 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function createFromRequest (cyclomatic 29, cognitive 31) · ×1
  • Complex function createFromRequest (cyclomatic 29, cognitive 31) project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts:49 — createFromRequest has cyclomatic complexity 29 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 29, cognitive 29) · ×1
  • Complex function (anonymous) (cyclomatic 29, cognitive 29) project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:206 — (anonymous) has cyclomatic complexity 29 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 29, cognitive 27) · ×1
  • Complex function (anonymous) (cyclomatic 29, cognitive 27) project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:176 — (anonymous) has cyclomatic complexity 29 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function transformToWorkDetail (cyclomatic 29, cognitive 23) · ×1
  • Complex function transformToWorkDetail (cyclomatic 29, cognitive 23) project/aitoearn-web/src/store/plugin/plats/douyin/workDetail.ts:62 — transformToWorkDetail has cyclomatic complexity 29 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 25) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 25) project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:96 — (anonymous) has cyclomatic complexity 28 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function pollTask (cyclomatic 27, cognitive 47) · ×1
  • Complex function pollTask (cyclomatic 27, cognitive 47) project/aitoearn-web/src/app/[lng]/chat/[taskId]/hooks/useTaskPolling.ts:95 — pollTask has cyclomatic complexity 27 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function processResultMessage (cyclomatic 27, cognitive 37) · ×1
  • Complex function processResultMessage (cyclomatic 27, cognitive 37) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:513 — processResultMessage has cyclomatic complexity 27 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 27, cognitive 34) · ×1
  • Complex function (anonymous) (cyclomatic 27, cognitive 34) project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:86 — (anonymous) has cyclomatic complexity 27 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 27, cognitive 22) · ×1
  • Complex function (anonymous) (cyclomatic 27, cognitive 22) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:260 — (anonymous) has cyclomatic complexity 27 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.
R2 · Cyclomatic Complexity · Complex function NavItem (cyclomatic 27, cognitive 21) · ×1
  • Complex function NavItem (cyclomatic 27, cognitive 21) project/aitoearn-web/src/app/layout/LayoutSidebar/components/NavSection.tsx:47 — NavItem has cyclomatic complexity 27 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.
R2 · Cyclomatic Complexity · Complex function PlatformTaskCard (cyclomatic 27, cognitive 18) · ×1
  • Complex function PlatformTaskCard (cyclomatic 27, cognitive 18) project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:356 — PlatformTaskCard has cyclomatic complexity 27 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 26, cognitive 27) · ×1
  • Complex function (anonymous) (cyclomatic 26, cognitive 27) project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts:250 — (anonymous) has cyclomatic complexity 26 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function callFunction (cyclomatic 26, cognitive 26) · ×1
  • Complex function callFunction (cyclomatic 26, cognitive 26) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts:102 — callFunction has cyclomatic complexity 26 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 26, cognitive 18) · ×1
  • Complex function (anonymous) (cyclomatic 26, cognitive 18) project/aitoearn-web/src/components/Chat/ActionCard/index.tsx:94 — (anonymous) has cyclomatic complexity 26 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 25, cognitive 30) · ×1
  • Complex function (anonymous) (cyclomatic 25, cognitive 30) project/aitoearn-web/src/store/plugin/store.ts:1081 — (anonymous) has cyclomatic complexity 25 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 25, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 25, cognitive 16) project/aitoearn-web/src/components/Chat/MediaUpload/index.tsx:204 — (anonymous) has cyclomatic complexity 25 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function categoryFromGoogleApiError (cyclomatic 25, cognitive 15) · ×1
  • Complex function categoryFromGoogleApiError (cyclomatic 25, cognitive 15) project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/google-api-error.util.ts:48 — categoryFromGoogleApiError has cyclomatic complexity 25 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 24, cognitive 37) · ×1
  • Complex function (anonymous) (cyclomatic 24, cognitive 37) project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:82 — (anonymous) has cyclomatic complexity 24 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleMessage (cyclomatic 24, cognitive 37) · ×1
  • Complex function handleMessage (cyclomatic 24, cognitive 37) skills/codex-plugin-aitoearn/skills/aitoearn/scripts/aitoearn-bridge.mjs:173 — handleMessage has cyclomatic complexity 24 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts · ×1
  • project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts: 1615 lines of code project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts:1 — project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/hooks/useAiBatchGenerateBarController.ts has 1615 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 · project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts: 1247 lines of code project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts:1 — project/aitoearn-backend/apps/aitoearn-ai/src/core/draft-generation/draft-generation.service.ts has 1247 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 · project/aitoearn-web/src/store/plugin/store.ts · ×1
  • project/aitoearn-web/src/store/plugin/store.ts: 1115 lines of code project/aitoearn-web/src/store/plugin/store.ts:1 — project/aitoearn-web/src/store/plugin/store.ts has 1115 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 · project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx · ×1
  • project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx: 1081 lines of code project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx:1 — project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTimingItem/components/RecordCore.tsx has 1081 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 · project/aitoearn-web/src/store/draft-box/planDetailStore.ts · ×1
  • project/aitoearn-web/src/store/draft-box/planDetailStore.ts: 1006 lines of code project/aitoearn-web/src/store/draft-box/planDetailStore.ts:1 — project/aitoearn-web/src/store/draft-box/planDetailStore.ts has 1006 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 · project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts: 933 lines of code project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:1 — project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts has 933 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts: 918 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts has 918 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts: 906 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/platforms.interface.ts has 906 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts: 900 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts has 900 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 · project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts · ×1
  • project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts: 884 lines of code project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts:1 — project/aitoearn-backend/libs/mongodb/src/repositories/publish-record.repository.ts has 884 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts: 879 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts has 879 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts: 815 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/auth/auth.service.ts has 815 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 · project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts · ×1
  • project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts: 802 lines of code project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts:1 — project/aitoearn-web/src/components/draft-box/components/ContentTabs/mediaTabStore.ts has 802 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts: 798 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts has 798 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 · project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx · ×1
  • project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx: 796 lines of code project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:1 — project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx has 796 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 · project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx · ×1
  • project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx: 768 lines of code project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx:1 — project/aitoearn-web/src/components/Chat/ChatMessage/PluginPublishCard/index.tsx has 768 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 · project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx · ×1
  • project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx: 712 lines of code project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx:1 — project/aitoearn-web/src/app/layout/ConfigManagerDialog/components/ConfigField/index.tsx has 712 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 · project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts · ×1
  • project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts: 707 lines of code project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts:1 — project/aitoearn-web/src/components/PublishDialog/PublishDialog.util.ts has 707 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 · project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx · ×1
  • project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx: 700 lines of code project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx:1 — project/aitoearn-web/src/app/layout/ConfigManagerDialog/index.tsx has 700 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts: 687 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts has 687 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 · project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx · ×1
  • project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx: 679 lines of code project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx:1 — project/aitoearn-web/src/components/PublishDialog/hooks/usePubParamsVerify.tsx has 679 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts: 661 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/youtube/youtube.service.ts has 661 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 · project/aitoearn-backend/libs/common/src/i18n/messages.ts · ×1
  • project/aitoearn-backend/libs/common/src/i18n/messages.ts: 660 lines of code project/aitoearn-backend/libs/common/src/i18n/messages.ts:1 — project/aitoearn-backend/libs/common/src/i18n/messages.ts has 660 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 · project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx · ×1
  • project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx: 644 lines of code project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:1 — project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx has 644 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 · project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx · ×1
  • project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx: 620 lines of code project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx:1 — project/aitoearn-web/src/app/[lng]/websit/plugin-guide/PluginGuideContent.tsx has 620 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts: 616 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/publish-record/publish-record.service.ts has 616 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 · project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx · ×1
  • project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx: 615 lines of code project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx:1 — project/aitoearn-web/src/components/Chat/ChatMessage/index.tsx has 615 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 · project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts · ×1
  • project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts: 615 lines of code project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts:1 — project/aitoearn-web/src/components/Chat/Share/generateShareImages.ts has 615 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts: 611 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.service.ts 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 · project/aitoearn-web/src/store/agent/handlers/action.handlers.ts · ×1
  • project/aitoearn-web/src/store/agent/handlers/action.handlers.ts: 609 lines of code project/aitoearn-web/src/store/agent/handlers/action.handlers.ts:1 — project/aitoearn-web/src/store/agent/handlers/action.handlers.ts has 609 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 · project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts · ×1
  • project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts: 586 lines of code project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts:1 — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-state.service.ts 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 · project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx · ×1
  • project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx: 577 lines of code project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:1 — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx has 577 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 · project/aitoearn-web/src/components/Chat/utils/convertMessages.ts · ×1
  • project/aitoearn-web/src/components/Chat/utils/convertMessages.ts: 563 lines of code project/aitoearn-web/src/components/Chat/utils/convertMessages.ts:1 — project/aitoearn-web/src/components/Chat/utils/convertMessages.ts has 563 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 · project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx · ×1
  • project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx: 561 lines of code project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx:1 — project/aitoearn-web/src/components/Plugin/PublishDetailModal.tsx has 561 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 · project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx · ×1
  • project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx: 556 lines of code project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:1 — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx has 556 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 554 lines of code REDACTED:1 — REDACTED has 554 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 · project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts · ×1
  • project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts: 544 lines of code project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts:1 — project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts has 544 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 · project/aitoearn-web/src/components/common/MediaPreview/index.tsx · ×1
  • project/aitoearn-web/src/components/common/MediaPreview/index.tsx: 543 lines of code project/aitoearn-web/src/components/common/MediaPreview/index.tsx:1 — project/aitoearn-web/src/components/common/MediaPreview/index.tsx has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx · ×1
  • project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx: 528 lines of code project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx:1 — project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/index.tsx has 528 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 · project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx · ×1
  • project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx: 525 lines of code project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx:1 — project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~556 LoC) · ×1
  • Dead file (~556 LoC) REDACTED — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~332 LoC) · ×1
  • Dead file (~332 LoC) project/aitoearn-web/src/components/ui/date-range-picker/index.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~263 LoC) · ×1
  • Dead file (~263 LoC) project/aitoearn-web/src/components/ChannelManager/components/UnifiedChannelSpaceList.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~240 LoC) · ×1
  • Dead file (~240 LoC) project/aitoearn-web/src/components/ui/carousel.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~233 LoC) · ×1
  • Dead file (~233 LoC) project/aitoearn-web/src/components/Chat/Share/SharePreviewModal.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~215 LoC) · ×1
  • Dead file (~215 LoC) project/aitoearn-backend/apps/aitoearn-server/src/common/utils/file.util.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-backend/apps/aitoearn-server/src/common/utils/index.ts) — 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
R7 · Dead Code · Dead file (~197 LoC) · ×1
  • Dead file (~197 LoC) project/aitoearn-web/src/components/ui/date-picker/index.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~188 LoC) · ×1
  • Dead file (~188 LoC) project/aitoearn-web/src/app/[lng]/auth/login/components/LoginContent/PhoneLoginForm.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~178 LoC) · ×1
  • Dead file (~178 LoC) project/aitoearn-web/src/components/ui/steps.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~164 LoC) · ×1
  • Dead file (~164 LoC) project/aitoearn-backend/libs/mongodb/src/schemas/engagement.task.schema.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~146 LoC) · ×1
  • Dead file (~146 LoC) project/aitoearn-web/src/store/user/utils/device.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~113 LoC) · ×1
  • Dead file (~113 LoC) project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~111 LoC) · ×1
  • Dead file (~111 LoC) project/aitoearn-web/src/utils/currency.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~108 LoC) · ×1
  • Dead file (~108 LoC) project/aitoearn-web/src/components/ui/sheet.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~101 LoC) · ×1
  • Dead file (~101 LoC) project/aitoearn-web/src/app/config/tagConfig.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~94 LoC) · ×1
  • Dead file (~94 LoC) project/aitoearn-backend/libs/mongodb/src/schemas/interaction-record.schema.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~90 LoC) · ×1
  • Dead file (~90 LoC) scripts/init.mjs — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~89 LoC) · ×1
  • Dead file (~89 LoC) project/aitoearn-web/src/components/common/FavoriteButton/index.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~84 LoC) · ×1
  • Dead file (~84 LoC) project/aitoearn-web/src/components/ui/radio.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~83 LoC) · ×1
  • Dead file (~83 LoC) project/aitoearn-backend/apps/aitoearn-server/src/common/utils/list2tree.util.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~77 LoC) · ×1
  • Dead file (~77 LoC) project/aitoearn-web/src/app/hooks/useCssVariables.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~74 LoC) · ×1
  • Dead file (~74 LoC) project/aitoearn-web/src/api/_server/server-fetch.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-web/src/api/channels/channel.server.ts) — 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
R7 · Dead Code · Dead file (~72 LoC) · ×1
  • Dead file (~72 LoC) project/aitoearn-web/src/components/ui/list.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~67 LoC) · ×1
  • Dead file (~67 LoC) project/aitoearn-web/src/api/channels/channel.server.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~64 LoC) · ×1
  • Dead file (~64 LoC) project/aitoearn-web/src/components/ui/table.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~63 LoC) · ×1
  • Dead file (~63 LoC) project/aitoearn-backend/apps/aitoearn-server/src/common/utils/ip.util.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (project/aitoearn-backend/apps/aitoearn-server/src/common/utils/index.ts) — 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
R7 · Dead Code · Dead file (~47 LoC) · ×1
  • Dead file (~47 LoC) project/aitoearn-web/src/components/ui/password-input.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~45 LoC) · ×1
  • Dead file (~45 LoC) project/aitoearn-backend/apps/aitoearn-server/src/common/utils/index.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~44 LoC) · ×1
  • Dead file (~44 LoC) project/aitoearn-web/src/utils/download.ts — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~42 LoC) · ×1
  • Dead file (~42 LoC) project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/AllPlatIcon.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~41 LoC) · ×1
  • Dead file (~41 LoC) project/aitoearn-web/src/components/Plugin/PluginDownloadContent.tsx — no import path from any entry point (86 application, 70 tooling, 162 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import '@nestjs/mongoose' · ×1
  • Unlisted import '@nestjs/mongoose' project/aitoearn-backend/apps/aitoearn-ai/test/setup.ts:42 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unlisted import 'ali-oss' · ×1
  • Unlisted import 'ali-oss' project/aitoearn-backend/libs/assets/src/adapters/ali-oss.adapter.ts:1 — Imported only as a TYPE and declared in no reachable REDACTED. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning REDACTED.
R8 · Dependency Hygiene · Unused dependency '@eslint/js' · ×1
  • Unused dependency '@eslint/js' REDACTED:22 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nestjs/schematics' · ×1
  • Unused dependency '@nestjs/schematics' REDACTED:23 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nx/nest' · ×1
  • Unused dependency '@nx/nest' REDACTED:28 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nx/node' · ×1
  • Unused dependency '@nx/node' REDACTED:29 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nx/workspace' · ×1
  • Unused dependency '@nx/workspace' REDACTED:32 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'git-commit-msg-linter' · ×1
  • Unused dependency 'git-commit-msg-linter' REDACTED:39 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'reflect-metadata' · ×1
  • Unused dependency 'reflect-metadata' REDACTED:15 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'uuid' · ×1
  • Unused dependency 'uuid' REDACTED:53 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@nestjs/mongoose' · ×1
  • Unused dependency '@nestjs/mongoose' REDACTED:13 — Declared in REDACTED but never imported anywhere in that package or its workspace members — while project/aitoearn-backend/apps/aitoearn-ai/test/setup.ts DOES import it and no REDACTED above that file declares it, so the import resolves through the copy this declaration installs. The declaration is misplaced rather than dead: removing it breaks that import. Move it to the REDACTED that owns the importing file (or, if the two packages are meant to share it, hoist it to the workspace root) rather than deleting it.
R8 · Dependency Hygiene · Unused dependency 'data-urls' · ×1
  • Unused dependency 'data-urls' REDACTED:37 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'qs' · ×1
  • Unused dependency 'qs' REDACTED:54 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@annotorious/react' · ×1
  • Unused dependency '@annotorious/react' REDACTED:36 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@ant-design/colors' · ×1
  • Unused dependency '@ant-design/colors' REDACTED:37 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@ant-design/nextjs-registry' · ×1
  • Unused dependency '@ant-design/nextjs-registry' REDACTED:39 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@egjs/react-infinitegrid' · ×1
  • Unused dependency '@egjs/react-infinitegrid' REDACTED:40 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@eslint/eslintrc' · ×1
  • Unused dependency '@eslint/eslintrc' REDACTED:154 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@hello-pangea/dnd' · ×1
  • Unused dependency '@hello-pangea/dnd' REDACTED:44 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@lexical/html' · ×1
  • Unused dependency '@lexical/html' REDACTED:47 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@lexical/link' · ×1
  • Unused dependency '@lexical/link' REDACTED:48 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@lexical/list' · ×1
  • Unused dependency '@lexical/list' REDACTED:49 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@lexical/rich-text' · ×1
  • Unused dependency '@lexical/rich-text' REDACTED:51 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@szhsin/react-menu' · ×1
  • Unused dependency '@szhsin/react-menu' REDACTED:74 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-image' · ×1
  • Unused dependency '@tiptap/extension-image' REDACTED:76 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-link' · ×1
  • Unused dependency '@tiptap/extension-link' REDACTED:77 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-placeholder' · ×1
  • Unused dependency '@tiptap/extension-placeholder' REDACTED:78 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/extension-underline' · ×1
  • Unused dependency '@tiptap/extension-underline' REDACTED:79 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/react' · ×1
  • Unused dependency '@tiptap/react' REDACTED:81 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@tiptap/starter-kit' · ×1
  • Unused dependency '@tiptap/starter-kit' REDACTED:82 — Declared in REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'country-state-city' · ×1
  • Unused dependency 'country-state-city' REDACTED:94 — Declared in REDACTED but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity project/aitoearn-web/src/app/[lng]/layout.tsx:81 — `https://r.wdfl.co/rw.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository.
X1 · Async correctness · `async` Promise executor · ×1
  • `async` Promise executor project/aitoearn-web/src/utils/request/FetchService.ts:37 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) skills/dsh-plugin-aitoearn/lib/index.js:36 — `catch` 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, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Minor — 228 finding(s)
D10 · Test Quality · Mock-dominated test · ×60
  • Mock-dominated test: acks messages without invoking handlers when the topic does not match project/aitoearn-backend/libs/redis/src/event-stream.explorer.spec.ts:95 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: continues listing expiring credentials from the previous expiry cursor project/aitoearn-backend/libs/mongodb/src/repositories/oauth2-credential.repository.spec.ts:55 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: 记录 pm2 异步重启失败 project/aitoearn-backend/libs/config-editor/src/config-restart.service.spec.ts:47 — This test sets up 3 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: loads credentials for oauth platform link info project/aitoearn-backend/apps/aitoearn-server/src/core/channels/works/work.service.spec.ts:253 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: verifies stale publishing tasks when finalize is unavailable project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:181 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: retries finalize with a refreshed credential when finalize fails with an auth platform error project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:235 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: marks an update failed when the provider returns a failed result project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:273 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: keeps platform exception details when an update throws project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:294 — This test sets up 3 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: requeues retryable publish failures instead of failing the task immediately project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:328 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: persists the platform work id from retryable publish exceptions before requeueing project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:363 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: still requeues when persisting the platform work id from a retryable publish exception fails project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:404 — This test sets up 5 test doubles (for example `vi.fn`) against 2 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: retries publish with a refreshed credential when publish fails with an auth platform error project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:441 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: marks the account offline when publish auth failure remains after credential refresh project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:481 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not retry publish auth failures when the credential has no refresh token project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:516 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not treat retryable publish failures as retried when retry state transition fails project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:580 — This test sets up 6 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: requeues retryable finalize failures instead of failing the task immediately project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:616 — This test sets up 4 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: retries failed submitted tasks through finalize without publishing again project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:665 — This test sets up 4 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 6 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: retries failed tasks without platform work id through publish queue project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:684 — This test sets up 3 test doubles (for example `vi.mock/jest.mock of an imported module`) against 0 real object(s) of its own, and its only verification is 5 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not enqueue finalize polling for synchronous completed publishes project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:743 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: enqueues Douyin user action finalize polling after handoff publish project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:771 — This test sets up 5 test doubles (for example `vi.fn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: keeps Douyin user action waiting while only item_id is available project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:810 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: marks Douyin user action published when fallback polling returns video_id project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:857 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: fails expired Douyin user action polling when no final video_id is available project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:900 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses localized platform fallback for exhausted Bilibili -500 failures instead of raw platform message project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:936 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: persists parsed update options from the platform option schema project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.spec.ts:978 — This test sets up 4 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • + 35 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts:514 — `!account || !isPluginPlatformAccountReady(account)` appears character-identically in 2 files — project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts, project/aitoearn-web/src/store/plugin/store.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:313 — `!accountList || accountList.length === 0` appears character-identically in 2 files — project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx, project/aitoearn-web/src/components/Chat/Share/SharePreviewModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/components/draft-box/components/BatchActionBar/index.tsx:41 — `!currentPlan || selectedMaterialIds.length === 0` appears character-identically in 2 files — project/aitoearn-web/src/components/draft-box/components/BatchActionBar/index.tsx, project/aitoearn-web/src/components/draft-box/components/DraftListToolbar/index.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx:161 — `!isDefaultGroup && currentIndex < sortedGroups.length - 1` appears character-identically in 2 files — project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/AccountSelector.tsx, project/aitoearn-web/src/app/[lng]/accounts/components/AccountsTopNav/components/ContextMenu.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/hooks/useDouyinPublishSession.ts:50 — `!record || record.expiresAt <= Date.now()` appears character-identically in 2 files — project/aitoearn-web/src/hooks/useDouyinPublishSession.ts, project/aitoearn-web/src/store/douyinPublishSession.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1977 — `!rel || rel.startsWith('..') || path.isAbsolute(rel)` appears character-identically in 2 files — REDACTED, project/aitoearn-web/.agents/skills/impeccable/scripts/live-svelte-component.mjs. 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 project/aitoearn-web/.agents/skills/impeccable/scripts/live-commit-manual-edits.mjs:228 — `!relative || relative.startsWith('..') || path.isAbsolute(relative)` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-commit-manual-edits.mjs, 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 project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-webhook.provider.ts:160 — `!signature?.startsWith('sha256=') || !rawBody || !this.config.clientSecret` appears character-identically in 2 files — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-webhook.provider.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/instagram/instagram-webhook.provider.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:99 — `!targetGroup || targetGroup.userId !== token.id` appears character-identically in 2 files — 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 project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-webhook.provider.ts:170 — `!this.publishRecordRepo || !this.stateService` appears character-identically in 2 files — project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili-webhook.provider.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook-webhook.provider.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts:38 — `!user || user.isDelete || user.status !== UserStatus.OPEN` appears character-identically in 2 files — project/aitoearn-backend/apps/aitoearn-ai/src/app.module.ts, project/aitoearn-backend/apps/aitoearn-server/src/app.module.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/components/PublishDialog/hooks/useUploadSync.ts:49 — `!video.ossUrl && video.uploadTaskIds?.video` appears character-identically in 2 files — project/aitoearn-web/src/components/PublishDialog/hooks/useUploadSync.ts, project/aitoearn-web/src/components/draft-box/components/CreateMaterialModal/useCreateMaterialForm.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:1447 — `Array.isArray(comments) && comments.length > 0` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js, project/aitoearn-web/.agents/skills/impeccable/scripts/live-insert-ui.mjs. 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 project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:1449 — `Array.isArray(s?.points) && s.points.length >= 2` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js, project/aitoearn-web/.agents/skills/impeccable/scripts/live-insert-ui.mjs. 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 project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:1292 — `a.rect.top - b.rect.top || a.rect.left - b.rect.left` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js, project/aitoearn-web/.agents/skills/impeccable/scripts/live-insert-ui.mjs. 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 project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx:319 — `acc.status !== 0 && plat?.pubTypes?.has(PubType.ImageText)` appears character-identically in 2 files — project/aitoearn-web/src/components/Chat/Share/ShareModal.tsx, project/aitoearn-web/src/components/Chat/Share/SharePreviewModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx:68 — `accountLoading && !accountListInitialized` appears character-identically in 2 files — project/aitoearn-web/src/app/[lng]/accounts/accountCore.tsx, project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/index.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx:510 — `activeSpaceId === group.id && 'bg-accent'` appears character-identically in 2 files — project/aitoearn-web/src/components/PublishDialog/compoents/DesktopPublishContent/index.tsx, project/aitoearn-web/src/components/PublishDialog/compoents/mobile/MobilePublishContent.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/openai/openai.service.ts:247 — `aiLogStatus === AiLogStatus.Success || aiLogStatus === AiLogStatus.Failed` appears character-identically in 2 files — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/openai/openai.service.ts, project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/video/volcengine/volcengine.service.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:1398 — `anchorFlex && anchorFlex !== 'none' && anchorFlex !== '0 1 auto'` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js, project/aitoearn-web/.agents/skills/impeccable/scripts/live-insert-ui.mjs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:36 — `args.includes('--help') || args.includes('-h')` appears character-identically in 9 files — REDACTED, project/aitoearn-web/.agents/skills/impeccable/scripts/live-commit-manual-edits.mjs, project/aitoearn-web/.agents/skills/impeccable/scripts/live-discard-manual-edits.mjs, 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 project/aitoearn-web/src/store/plugin/plats/douyin/homeFeed.ts:177 — `author.avatar_thumb?.url_list || author.avatar_medium?.url_list || []` appears character-identically in 2 files — project/aitoearn-web/src/store/plugin/plats/douyin/homeFeed.ts, project/aitoearn-web/src/store/plugin/plats/douyin/workDetail.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:101 — `batchMode && selected && 'rounded-xl shadow-lg'` appears character-identically in 2 files — project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx, project/aitoearn-web/src/components/draft-box/components/MediaCard/index.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/relay-media/relay-media-resolver.service.ts:112 — `cdnPrefix && endpointPrefix && localUrl.startsWith(cdnPrefix)` appears character-identically in 2 files — project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/relay-media/relay-media-resolver.service.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-exception.filter.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js:1334 — `clientX >= aRight - slop && clientX <= bLeft + slop` appears character-identically in 2 files — project/aitoearn-web/.agents/skills/impeccable/scripts/live-browser.js, project/aitoearn-web/.agents/skills/impeccable/scripts/live-insert-ui.mjs. 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.
  • + 15 more in this group — see findings.md.
X7 · Silent fallback defaults · Pending state with no failure state · ×26
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/DraftDetailDialog.tsx:446 — The view draws `<Loader2 class="h-4 w-4 animate-spin mr-2"/>` under `isSubmitting`, but `isSubmitting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/DraftListSection.tsx:470 — The view draws `<LoadingIndicator label= />` under `materialsLoading`, but `materialsLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/VideoCreateDraftTaskWidget/index.tsx:70 — The view draws `<button type="button" onClick= className= >` under `draftCreationWidgetMinimized`, but `draftCreationWidgetMinimized` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/VideoCreateDraftAction/index.tsx:110 — The view draws `<Loader2 class="h-4 w-4 animate-spin"/>` under `isCreating`, but `isCreating` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/VideoCreateDraftAction/index.tsx:148 — The view draws `<Loader2 class="h-4 w-4 animate-spin"/>` under `isCreating`, but `isCreating` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/TransferDraftDialog/index.tsx:243 — The view draws `<div class="flex h-10 items-center justify-center rounded-md border border-border bg-muted/20">` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/TransferDraftDialog/index.tsx:281 — The view draws `<Loader2 class="h-4 w-4 animate-spin"/>` under `submitting`, but `submitting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/PlanTabBar/MorePanel/index.tsx:152 — The view draws `<div class="flex justify-center py-3">` under `morePlansLoading`, but `morePlansLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/PlanTabBar/MorePanel/index.tsx:206 — The view draws `<div class="flex justify-center py-3">` under `morePlansLoading`, but `morePlansLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:366 — The view draws `<LoadingIndicator/>` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/MediaListSection/index.tsx:411 — The view draws `<Loader2 class="h-3.5 w-3.5 animate-spin"/>` under `batchDeleting`, but `batchDeleting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/CreatePlanModal/index.tsx:139 — The view draws `<Loader2 class="mr-2 h-4 w-4 animate-spin"/>` under `isSubmitting`, but `isSubmitting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/ConditionalDeleteDialog/index.tsx:179 — The view draws `<span class="text-muted-foreground flex items-center gap-2">` under `hasCondition && querying`, but `querying` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/ConditionalDeleteDialog/index.tsx:203 — The view draws `<Loader2 class="h-3.5 w-3.5 animate-spin"/>` under `deleting`, but `deleting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/BatchActionBar/index.tsx:110 — The view draws `<Loader2 class="h-3.5 w-3.5 animate-spin"/>` under `batchDeleting`, but `batchDeleting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:487 — The view draws `<LoadingIndicator label= />` under `loading`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/draft-box/components/AllListSection/index.tsx:532 — The view draws `<Loader2 class="h-3.5 w-3.5 animate-spin"/>` under `batchDeleting`, but `batchDeleting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/common/MediaPreview/BrushEditor/index.tsx:228 — The view draws `<>` under `isSaving`, but `isSaving` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:254 — The view draws `<Loader2 class="h-4 w-4 animate-spin mr-1"/>` under `uploadLoading`, but `uploadLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/PublishDialog/compoents/PubParmasTextarea/VideoCoverSeting.tsx:265 — The view draws `<div class="absolute inset-0 bg-black/60 flex flex-col items-center justify-center z-10 gap-2">` under `videoCoverLoading`, but `videoCoverLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/PublishDialog/compoents/PlatParamsSetting/plats/PinterestParams.tsx:236 — The view draws `<Loader2 class="h-4 w-4 animate-spin"/>` under `creatingBoard`, but `creatingBoard` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/Plugin/PluginNoPermission.tsx:79 — The view draws `<Loader2 class="h-4 w-4 animate-spin"/>` under `checking`, but `checking` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/Chat/TaskCard/index.tsx:295 — The view draws `<Loader2 class="w-4 h-4 animate-spin"/>` under `isDeleting`, but `isDeleting` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/components/ChannelManager/components/CreateSpaceSection.tsx:73 — The view draws `<Loader2 class="h-4 w-4 animate-spin mr-1"/>` under `creatingSpace`, but `creatingSpace` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state project/aitoearn-web/src/app/layout/SettingsModal/tabs/GeneralTab.tsx:128 — The view draws `<div class="flex items-center gap-2">` under `isChangingLanguage`, but `isChangingLanguage` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • + 1 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×11
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/common/src/starter.ts:245 — `log` at line 245 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/common/src/starter.ts:250 — `log` at line 250 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/common/src/starter.ts:252 — `log` at line 252 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/common/src/interceptors/response.interceptor.ts:64 — `debug` at line 64 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.debug({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.debug('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/common/src/interceptors/response.interceptor.ts:70 — `verbose` at line 70 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.verbose({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.verbose('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:85 — `warn` at line 85 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:88 — `log` at line 88 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:150 — `warn` at line 150 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/queue-metrics.service.ts:154 — `log` at line 154 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.log({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.log('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/decorators/queue-processor.decorator.ts:69 — `error` at line 69 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
  • Interpolated log message defeats structured logging project/aitoearn-backend/libs/aitoearn-queue/src/decorators/queue-processor.decorator.ts:72 — `error` at line 72 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way.
D19 · Documentation Quality · Documentation · ×10
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/aitoearn-ai-client/README.md:1 — `aitoearn-ai-client` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/aitoearn-ai-client/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/aitoearn-auth/README.md:1 — `aitoearn-auth` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/aitoearn-auth/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/aws-s3/README.md:1 — `aws-s3` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/aws-s3/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/channel-db/README.md:1 — `channel-db` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/channel-db/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/common/README.md:1 — `common` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/common/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/mongodb/README.md:1 — `mongodb` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/mongodb/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/redis/README.md:1 — `redis` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/redis/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-backend/libs/redlock/README.md:1 — `redlock` is a published package (`REDACTED` without `"private": true`) and neither `project/aitoearn-backend/libs/redlock/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example project/aitoearn-web/README.md:1 — `aitoearn-web` is runnable (a `start` script in `REDACTED`) and neither `project/aitoearn-web/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
  • Documentation: no build, run or usage example skills/dsh-plugin-aitoearn/README.md:1 — `dsh-plugin-aitoearn` is a published package (`REDACTED` without `"private": true`) and neither `skills/dsh-plugin-aitoearn/README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D21 · Naming Consistency · `baseURL` spells `URL` where 380 names in the project spell it `Url` · ×10
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/bilibili/bilibili.exception.ts:296 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/douyin/douyin.exception.ts:118 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/kwai/kwai.exception.ts:75 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/pinterest/pinterest.exception.ts:73 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok.exception.ts:213 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/twitter/twitter.exception.ts:181 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:21 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat.service.ts:1005 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-web/src/utils/request/FetchService.ts:8 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
  • `baseURL` spells `URL` where 380 names in the project spell it `Url` project/aitoearn-web/src/utils/request/types.ts:16 — 380 of 390 names in project repository spell the token `Url` (380 of 390; unit: names in project repository containing `Url`). Peers: image-edit.mcp.loadImageFromUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/image-edit.mcp.ts:118); mcp.utils.assertSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.assertSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:21); mcp.utils.resolveSafeMediaUrl (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90); mcp.utils.resolveSafeMediaUrl(mediaUrl) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts:90). Rename to `baseUrl`. [rule N6]
D24 · Comment Value · redundant comment · ×10
  • redundant comment project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.vo.ts:106 — "FullContent single element union" repeats the code it sits on: 4 of its 5 words (full, content, element, union) are already in `const FullContentElementSchema = z.discriminatedUnion('action', [`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/volcengine/common.ts:45 — 11 comments in this file only repeat the code they sit on (lines 45, 54, 61, 67, 77, 88, 110, 123, 131, 149, 196), for example "CropFilter - Area Crop". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/kwai/kwai-auth.provider.ts:62 — "Kwai does not support token revocation via API" repeats the code it sits on: 8 of its 8 words (kwai, does, not, support, token, revocation, via, api) are already in `this.logger.warn('Kwai does not support token revocation via API')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/threads/threads-auth.provider.ts:37 — "Exchange short-lived token for long-lived token" repeats the code it sits on: 6 of its 6 words (exchange, short, lived, token, for, long) are already in `const longLivedResult = await this.threadsService.exchangeForLongLivedToken(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:85 — "Total text length" repeats the code it sits on: 3 of its 3 words (total, text, length) are already in `if (limits.maxTotalTextLength !== undefined)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/libs/nest-mcp/src/services/mcp-sse.service.ts:37 — "Configure ping service with options" repeats the code it sits on: 4 of its 4 words (configure, ping, service, options) are already in `this.pingService.configure({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/libs/nest-mcp/src/services/mcp-sse.service.ts:56 — "Create a new SSE transport instance" repeats the code it sits on: 4 of its 5 words (create, new, sse, transport) are already in `const transport = new SSEServerTransport(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/libs/nest-mcp/src/services/mcp-sse.service.ts:86 — "Register the connection with the ping service" repeats the code it sits on: 4 of its 4 words (register, connection, ping, service) are already in `this.pingService.registerConnection(sessionId, transport, res)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:221 — "Create MCP server" repeats the code it sits on: 3 of its 3 words (create, mcp, server) are already in `const mcpServer = new McpServer(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:261 — "Connect transport to server" repeats the code it sits on: 3 of its 3 words (connect, transport, server) are already in `await mcpServer.connect(transport)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D12 · Dependency Hygiene · Outdated (npm) · ×9
  • Outdated (npm): @nestjs/axios REDACTED:16 — @nestjs/axios is pinned at 4.0.1; registry.npmjs.org publishes 12.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @nestjs/schedule REDACTED:23 — @nestjs/schedule is pinned at 6.1.1; registry.npmjs.org publishes 12.0.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): data-urls REDACTED:39 — data-urls is pinned at 5.0.0; registry.npmjs.org publishes 8.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): glob REDACTED:104 — glob is pinned at 11.1.0; registry.npmjs.org publishes 14.0.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): googleapis REDACTED:44 — googleapis is pinned at 173.0.0; registry.npmjs.org publishes 190.0.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): i18next REDACTED:106 — i18next is pinned at 24.2.3; registry.npmjs.org publishes 27.1.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-i18next REDACTED:127 — react-i18next is pinned at 15.4.1; registry.npmjs.org publishes 18.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): swiper REDACTED:144 — swiper is pinned at 11.2.10; registry.npmjs.org publishes 14.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): uuid REDACTED:53 — uuid is pinned at 11.1.0; registry.npmjs.org publishes 14.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×7
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:57 — `debug` at line 57 is called with an argument built by `JSON.stringify(capabilities)` (line 58), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/libs/nest-mcp/src/services/mcp-streamable-http.service.ts:101 — `debug` at line 101 is called with an argument built by `JSON.stringify(body)` (line 102), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/aideo.service.ts:103 — `debug` at line 103 is called with an argument built by `map(i => i.Vid)` (line 108), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/upload.service.ts:47 — `debug` at line 47 is called with an argument built by `URLSets?.map(u => u.SourceUrl)` (line 50), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/upload.service.ts:58 — `debug` at line 58 is called with an argument built by `Data?.map(d => d.JobId)` (line 59), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:111 — `debug` at line 111 is called with an argument built by `images.reduce((sum, img) => sum + img.imageData.length, 0)` (line 113), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
  • Diagnostic log message is built whether or not it is wanted project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/aideo/aideo.service.ts:104 — `debug` at line 104 is called with an argument built by `videoInputs.map(v => (typeof v === 'string' ? v : v.type === 'stream' ? 'stream' : v.url))` (line 108), whose cost grows with the collection it walks. JavaScript evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because debug is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isLevelEnabled`/`isDebugEnabled` test, no debug flag, no `NODE_ENV` build switch.
D12 · Dependency Hygiene · Deprecated · ×6
  • Deprecated: glob REDACTED:5469 — glob 10.5.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:5474 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:5643 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: lodash.get REDACTED:6272 — lodash.get 4.4.2 is resolved in REDACTED and is marked deprecated by its publisher: "This package is deprecated. Use the optional chaining (?.) operator instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: node-domexception REDACTED:6713 — node-domexception 1.0.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use your platform's native DOMException instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: stable REDACTED:6332 — stable 0.1.8 is resolved in REDACTED and is marked deprecated by its publisher: "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D30 · Dependency Vulnerabilities · Low CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×3
  • Projects may be oversized for their cohesion REDACTED:1 — `project/aitoearn-web` (89228 LoC, 1116 module-visible types across 251 directories) overshoots its size bounds. 3 of 20 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 7.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `project/aitoearn-backend/apps/aitoearn-server` (39215 LoC, 795 module-visible types across 48 directories) overshoots its size bounds. 3 of 20 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 7.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion REDACTED:1 — `project/aitoearn-backend/apps/aitoearn-ai` (19699 LoC, 391 module-visible types across 31 directories) overshoots its size bounds. 3 of 20 build unit(s) (npm) overshoot their size bounds, lowering Project Cohesion to 7.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch project/aitoearn-backend/apps/aitoearn-server/src/core/channels/utils/publish-content.utils.ts:172 — `getExtension` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch project/aitoearn-backend/libs/nest-mcp/src/utils/normalize-endpoint.ts:30 — `normalizeEndpoint` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch project/aitoearn-web/src/components/PublishDialog/usePublishDialogStorageStore.tsx:72 — `getMediaUrlExtension` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D27 · Navigability · Pass-through layer · ×2
  • Pass-through layer project/aitoearn-backend/apps/aitoearn-server/src/core/content/material-group.service.ts:7 — MaterialGroupService: all 8 public methods forward their arguments unchanged to materialGroupRepository and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call materialGroupRepository directly, or give the layer a job.
  • Pass-through layer project/aitoearn-backend/libs/nest-mcp/src/transport/streamable-http.controller.factory.ts:32 — StreamableHttpController: all 3 public methods forward their arguments unchanged to mcpStreamableHttpService and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call mcpStreamableHttpService directly, or give the layer a job.
M4 · Documentation accuracy · README/code drift · ×2
  • README/code drift project/aitoearn-web/src/store/plugin/docs/README.md:420 — project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/docs/WEB_API.md`, but `project/aitoearn-web/src/demo/docs/WEB_API.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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 project/aitoearn-web/src/store/plugin/docs/README.md:421 — project/aitoearn-web/src/store/plugin/docs/README.md links to `../../../demo/PublishType/`, but `project/aitoearn-web/src/demo/PublishType` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, 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.
AX6 · Interface segregation · Fat interface · ×1
  • Fat interface: ToolBarInlineActions (16 required operations) project/aitoearn-web/src/components/draft-box/components/AiBatchGenerateBar/components/ToolBarInline/types/base.ts:7 — `ToolBarInlineActions` declares 16 required operations: `onDraftModeChange`, `onContentTypeChange`, `onVideoModelsChange`, `onVideoModelSelectionModeChange`, `onVideoModelParamChange`, `onResolutionChange`, `onAspectRatioChange`, `onDurationChange`, `onQuantityChange`, `onImageModelsChange`, `onImageModelSelectionModeChange`, `onImageCountChange`, `onImageSizeChange`, `onPlatformsChange`, `onMoreOptionsChange`, `onSubmit`. Counted over its REQUIRED operations — a method signature or a function-typed property with no `?`, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies project/aitoearn-backend/apps/aitoearn-server/src/app.module.ts:47 — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 11 significant file(s) lose their only recent owner: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/publish/tasks/publish-task.service.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/media/media.service.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/tiktok/tiktok-publish.provider.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/facebook/facebook.service.ts, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/video-utils.mcp.ts, project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/mcp/mcp.utils.ts, project/aitoearn-backend/libs/assets/src/video-metadata.service.ts, project/aitoearn-backend/apps/aitoearn-server/src/core/channels/relay/relay-exception.filter.ts (+3 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (12 single-owned of 664 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 664 of the 1447 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: project/aitoearn-web/src/components/ChannelManager/channelManagerStore.ts.
D21 · Naming Consistency · `FancyTextID` spells `ID` where 1708 names in the project spell it `Id` · ×1
  • `FancyTextID` spells `ID` where 1708 names in the project spell it `Id` project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1917 — 1708 of 1710 names in project repository spell the token `Id` (1708 of 1710; unit: names in project repository containing `Id`). Peers: AgentController.getContentGenerationTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:97); AgentController.getTaskMessages(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:111); AgentController.deleteTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:127); AgentController.updateTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:139); AgentController.createRating(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:153). Rename to `FancyTextId`. [rule N6]
D21 · Naming Consistency · `FontID` spells `ID` where 1708 names in the project spell it `Id` · ×1
  • `FontID` spells `ID` where 1708 names in the project spell it `Id` project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1919 — 1708 of 1710 names in project repository spell the token `Id` (1708 of 1710; unit: names in project repository containing `Id`). Peers: AgentController.getContentGenerationTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:97); AgentController.getTaskMessages(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:111); AgentController.deleteTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:127); AgentController.updateTask(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:139); AgentController.createRating(taskId) (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/agent.controller.ts:153). Rename to `FontId`. [rule N6]
D21 · Naming Consistency · `formatJSON` spells `JSON` where 28 names in the project spell it `Json` · ×1
  • `formatJSON` spells `JSON` where 28 names in the project spell it `Json` project/aitoearn-web/src/components/Chat/ChatMessage/ToolDetailModal.tsx:33 — 28 of 29 names in project repository spell the token `Json` (28 of 29; unit: names in project repository containing `Json`). Peers: AgentRuntimeService.resolveRelayJson (project/aitoearn-backend/apps/aitoearn-ai/src/core/agent/services/agent-runtime.service.ts:909); ChatService.resolveRelayJson (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/chat/chat.service.ts:495); GeminiService.resolveRelayJson (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/gemini/gemini.service.ts:229); OpenaiService.resolveRelayJson (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/openai/openai.service.ts:186); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.VCreativeParamJson (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1215). Rename to `formatJson`. [rule N6]
D21 · Naming Consistency · `buildPromptForAPI` spells `API` where 88 names in the project spell it `Api` · ×1
  • `buildPromptForAPI` spells `API` where 88 names in the project spell it `Api` project/aitoearn-web/src/store/agent/utils/buildPrompt.ts:58 — 88 of 90 names in project repository spell the token `Api` (88 of 90; unit: names in project repository containing `Api`). Peers: BaseService.checkApiResponseError (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/base.service.ts:49); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.AITranslationApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1290); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.EraseApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1309); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.HighlightApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1326); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.VisionApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1343). Rename to `buildPromptForApi`. [rule N6]
D21 · Naming Consistency · `AIToEarnPluginAPI` spells `API` where 88 names in the project spell it `Api` · ×1
  • `AIToEarnPluginAPI` spells `API` where 88 names in the project spell it `Api` project/aitoearn-web/src/store/plugin/types/baseTypes.ts:243 — 88 of 90 names in project repository spell the token `Api` (88 of 90; unit: names in project repository containing `Api`). Peers: BaseService.checkApiResponseError (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/services/base.service.ts:49); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.AITranslationApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1290); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.EraseApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1309); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.HighlightApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1326); project.aitoearn-backend.apps.aitoearn-ai.src.core.ai.libs.volcengine.volcengine_interface.VisionApiResponse (project/aitoearn-backend/apps/aitoearn-ai/src/core/ai/libs/volcengine/volcengine.interface.ts:1343). Rename to `AIToEarnPluginApi`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low vulnerability · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 15/16 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `project/aitoearn-web`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 6 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.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:5 — `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
S1 · Web-Security Posture · No security response headers detected · ×1
  • No security response headers detected nginx/nginx.conf:66 — 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 `nginx.conf` is committed to this repository and declares the server that serves it, 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 async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 13/45 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 20/21 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~1.0 `!` null assertions per 1k TypeScript source lines — 191 assertion(s) across the 187045 source line(s) of the 1402 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: project/aitoearn-backend/apps/aitoearn-server/src/core/channels/engagement/engagement.service.ts (14), project/aitoearn-web/src/store/plugin/plats/douyin/index.ts (10), project/aitoearn-web/src/store/plugin/plats/xhs/index.ts (9). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat-msg-crypto.service.ts:157 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Minor — 133 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×126
  • Outdated (npm): @ai-sdk/google — @ai-sdk/google is pinned at 3.0.64; registry.npmjs.org publishes 4.0.121 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @ai-sdk/openai — @ai-sdk/openai is pinned at 3.0.53; registry.npmjs.org publishes 4.0.118 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @annotorious/react — @annotorious/react is pinned at 3.8.6; registry.npmjs.org publishes 3.9.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @ant-design/colors — @ant-design/colors is pinned at 7.2.1; registry.npmjs.org publishes 8.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @ant-design/icons — @ant-design/icons is pinned at 6.2.5; registry.npmjs.org publishes 6.3.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @anthropic-ai/claude-agent-sdk — @anthropic-ai/claude-agent-sdk is pinned at 0.2.33; registry.npmjs.org publishes 0.3.325 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @anthropic-ai/sdk — @anthropic-ai/sdk is pinned at 0.71.2; registry.npmjs.org publishes 1.9.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @aws-sdk/client-cloudwatch-logs — @aws-sdk/client-cloudwatch-logs is pinned at 3.1013.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @aws-sdk/client-s3 — @aws-sdk/client-s3 is pinned at 3.1013.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @aws-sdk/lib-storage — @aws-sdk/lib-storage is pinned at 3.1013.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @aws-sdk/s3-presigned-post — @aws-sdk/s3-presigned-post is pinned at 3.1013.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @aws-sdk/s3-request-presigner — @aws-sdk/s3-request-presigner is pinned at 3.1013.0; registry.npmjs.org publishes 3.1169.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @egjs/react-infinitegrid — @egjs/react-infinitegrid is pinned at 4.13.0; registry.npmjs.org publishes 4.13.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @fullcalendar/core — @fullcalendar/core is pinned at 6.1.21; registry.npmjs.org publishes 7.1.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @fullcalendar/daygrid — @fullcalendar/daygrid is pinned at 6.1.21; registry.npmjs.org publishes 6.1.22 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @fullcalendar/react — @fullcalendar/react is pinned at 6.1.21; registry.npmjs.org publishes 7.1.5 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @google/genai — @google/genai is pinned at 1.46.0; registry.npmjs.org publishes 3.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @hello-pangea/dnd — @hello-pangea/dnd is pinned at 16.6.0; registry.npmjs.org publishes 18.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @hookform/resolvers — @hookform/resolvers is pinned at 5.4.0; registry.npmjs.org publishes 7.0.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @langchain/core — @langchain/core is pinned at 1.1.41; registry.npmjs.org publishes 1.4.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @langchain/google-genai — @langchain/google-genai is pinned at 2.1.28; registry.npmjs.org publishes 2.3.6 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @langchain/openai — @langchain/openai is pinned at 1.4.4; registry.npmjs.org publishes 1.8.4 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/html — @lexical/html is pinned at 0.37.0; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/link — @lexical/link is pinned at 0.37.0; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @lexical/list — @lexical/list is pinned at 0.37.0; registry.npmjs.org publishes 0.53.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 101 more in this group — see findings.md.
D24 · Comment Value · doc comments repeat the names · ×5
  • doc comments repeat the names project/aitoearn-backend/libs/mongodb/src/repositories/account.repository.ts:188 — 0 of 35 documented parameters and 2 of 14 summaries in `@yikart/mongodb` only repeat the member or parameter name (e.g. "Get all accounts" for `getUserAccounts`). 32 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names project/aitoearn-backend/libs/nest-mcp/src/services/mcp-executor.service.ts:42 — 2 of 13 documented parameters and 3 of 76 summaries in `@yikart/nest-mcp` only repeat the member or parameter name (e.g. "The MCP server instance" for `mcpServer`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names REDACTED:282 — 0 of 17 documented parameters and 1 of 13 summaries in `aitoearn-ai` only repeat the member or parameter name (e.g. "Parse translation prompt" for `parseTranslationPrompt`). 17 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names project/aitoearn-backend/apps/aitoearn-server/src/core/channels/platforms/wechat/wechat-msg-crypto.service.ts:130 — 2 of 30 documented parameters and 1 of 15 summaries in `aitoearn-server` only repeat the member or parameter name (e.g. "Build encrypted reply XML." for `buildEncryptedReplyXml`). 18 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names project/aitoearn-web/src/app/[lng]/accounts/components/CalendarTiming/MobileCalendar/mobileCalendar.types.ts:18 — 0 of 4 documented parameters and 4 of 52 summaries in `aitoearn-web` only repeat the member or parameter name (e.g. "MobileCalendarHeader Props" for `IMobileCalendarHeaderProps`). 4 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: @yikart/common — @yikart/common: abstractness 0.07, instability 0.00, distance 0.93 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.
  • Off the main sequence: @yikart/aitoearn-ai-shared — @yikart/aitoearn-ai-shared: abstractness 0.00, instability 0.17, distance 0.83 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

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

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

Run 01a1e560-1651-754d-9ef0-0f191098e15e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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